mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1000370 - Call SetupCairoFont at the beginning of gfxFont::GetGlyphHAdvance. r=jfkthame
This commit is contained in:
parent
ccd7a0f0fe
commit
4fd5dc7a93
@ -2031,6 +2031,9 @@ gfxFont::~gfxFont()
|
||||
gfxFloat
|
||||
gfxFont::GetGlyphHAdvance(gfxContext *aCtx, uint16_t aGID)
|
||||
{
|
||||
if (!SetupCairoFont(aCtx)) {
|
||||
return 0;
|
||||
}
|
||||
if (ProvidesGlyphWidths()) {
|
||||
return GetGlyphWidth(aCtx, aGID) / 65536.0;
|
||||
}
|
||||
@ -2044,7 +2047,7 @@ gfxFont::GetGlyphHAdvance(gfxContext *aCtx, uint16_t aGID)
|
||||
}
|
||||
gfxHarfBuzzShaper* shaper =
|
||||
static_cast<gfxHarfBuzzShaper*>(mHarfBuzzShaper.get());
|
||||
if (!shaper->Initialize() || !SetupCairoFont(aCtx)) {
|
||||
if (!shaper->Initialize()) {
|
||||
return 0;
|
||||
}
|
||||
return shaper->GetGlyphHAdvance(aCtx, aGID) / 65536.0;
|
||||
|
Loading…
Reference in New Issue
Block a user