mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 544617 - ensure Cairo font is set up in gfxGDIFont::InitTextRun. r=jdaggett
This commit is contained in:
parent
f99bfbc516
commit
7a650852b8
@ -155,6 +155,10 @@ gfxGDIFont::InitTextRun(gfxContext *aContext,
|
||||
|
||||
PRBool ok = PR_FALSE;
|
||||
|
||||
// ensure the cairo font is set up, so there's no risk it'll fall back to
|
||||
// creating a "toy" font internally (see bug 544617)
|
||||
SetupCairoFont(aContext);
|
||||
|
||||
if (mHarfBuzzShaper) {
|
||||
if (gfxPlatform::GetPlatform()->UseHarfBuzzLevel() >=
|
||||
gfxUnicodeProperties::ScriptShapingLevel(aRunScript)) {
|
||||
@ -484,7 +488,7 @@ gfxGDIFont::GetGlyphWidth(gfxContext *aCtx, PRUint16 aGID)
|
||||
}
|
||||
|
||||
DCFromContext dc(aCtx);
|
||||
AutoSelectFont fs(dc, GetHFONT());
|
||||
AutoSelectFont fs(dc, GetHFONT());
|
||||
|
||||
int devWidth;
|
||||
if (GetCharWidthI(dc, aGID, 1, NULL, &devWidth)) {
|
||||
|
@ -57,7 +57,6 @@ gfxGDIShaper::InitTextRun(gfxContext *aContext,
|
||||
PRUint32 aRunLength,
|
||||
PRInt32 aRunScript)
|
||||
{
|
||||
mFont->SetupCairoFont(aContext);
|
||||
DCFromContext dc(aContext);
|
||||
|
||||
nsAutoTArray<WORD,500> glyphArray;
|
||||
|
@ -466,7 +466,6 @@ gfxUniscribeShaper::InitTextRun(gfxContext *aContext,
|
||||
PRUint32 aRunLength,
|
||||
PRInt32 aRunScript)
|
||||
{
|
||||
mFont->SetupCairoFont(aContext);
|
||||
DCFromContext aDC(aContext);
|
||||
|
||||
PRBool result = PR_TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user