[PATCH] gdi32: Antialias fake bold or italic fonts regardless of GASP table.
Nikolay Sivov
bunglehead at gmail.com
Tue Sep 29 04:21:26 CDT 2015
On 29.09.2015 10:27, Ken Thomases wrote:
> If the client requests a bold typeface of a font which doesn't actually provide
> a bold typeface, Wine fakes it using FT_Outline_Embolden(). Likewise, it fakes
> italic by apply a shear transform.
>
> These techniques work passably when antialiasing is in effect. However, when
> antialiasing is disabled at small sizes by the font's GASP table, the results
> are horrible. The glyphs have many spurs or appear furry.
>
> On the theory that fonts disable antialiasing via the GASP table at small sizes
> because hinting should produce pixel-perfect results and that that rationale is
> voided by the application of procedural bolding or italicizing, we ignore the
> GASP table and always antialias for fake bold or italic fonts.
Hi.
I think in some cases it makes sense to disable emboldening entirely,
because as you said rendered images are ruined, but not only by moving
outline points around. Some fonts, I think it applies to CJK fonts more
than others, have prerendered embedded bitmaps to improve legibility in
small sizes, but when we fake bold or oblique styles we disable bitmaps
explicitly, and this goes against the idea font designer had in mind.
Enabling AA could probably help, but not necessary as well as using
bitmaps. Of course this has to be tested on windows using fonts that
provide bitmaps, to see if they respond to bold simulation at all at
sizes that are supposed to use bitmaps.
P.S. unrelated but still, since faked styles effectively invalidate the
job hinting does, maybe it makes sense to try to load with
FT_LOAD_NO_HINTING in such cases as it's supposed to be faster, and I
think we disable outline caching for simulated fonts. Just a thought, I
haven't tried it myself.
>
> There is a new registry setting to disable this and revert to the previous
> behavior:
>
> [HKEY_CURRENT_USER\Software\Wine\Fonts]
> "AntialiasFakeBoldOrItalic"="n"
What's a problem of ignoring GASP and following global AA settings in
such cases? I mean are you aware of any problems that could potentially
need such switch?
>
> Signed-off-by: Ken Thomases <ken at codeweavers.com>
More information about the wine-devel
mailing list