mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 758120: Block attempts to do manual subpixel-AA on bitmap fonts. r=jfkthame
This commit is contained in:
parent
bef0f6ea46
commit
d15827520e
@ -35,6 +35,8 @@ public:
|
||||
|
||||
virtual bool SetupCairoFont(gfxContext *aContext);
|
||||
|
||||
virtual bool AllowSubpixelAA() { return mAllowManualShowGlyphs; }
|
||||
|
||||
virtual bool IsValid();
|
||||
|
||||
gfxFloat GetAdjustedSize() {
|
||||
|
@ -1788,6 +1788,12 @@ gfxFont::Draw(gfxTextRun *aTextRun, PRUint32 aStart, PRUint32 aEnd,
|
||||
return;
|
||||
}
|
||||
|
||||
bool oldSubpixelAA = dt->GetPermitSubpixelAA();
|
||||
|
||||
if (!AllowSubpixelAA()) {
|
||||
dt->SetPermitSubpixelAA(false);
|
||||
}
|
||||
|
||||
GlyphBufferAzure glyphs;
|
||||
Glyph *glyph;
|
||||
|
||||
@ -1950,6 +1956,8 @@ gfxFont::Draw(gfxTextRun *aTextRun, PRUint32 aStart, PRUint32 aEnd,
|
||||
renderingOptions, aContext, passedInvMatrix, true);
|
||||
|
||||
dt->SetTransform(oldMat);
|
||||
|
||||
dt->SetPermitSubpixelAA(oldSubpixelAA);
|
||||
}
|
||||
|
||||
// Restore matrix for stroke pattern
|
||||
|
@ -1457,6 +1457,8 @@ public:
|
||||
// This is called by the default Draw() implementation above.
|
||||
virtual bool SetupCairoFont(gfxContext *aContext) = 0;
|
||||
|
||||
virtual bool AllowSubpixelAA() { return true; }
|
||||
|
||||
bool IsSyntheticBold() { return mApplySyntheticBold; }
|
||||
|
||||
// Amount by which synthetic bold "fattens" the glyphs: 1/16 of the em-size
|
||||
|
Loading…
Reference in New Issue
Block a user