[1/4] gdi32: Fixup the internal ntmFlags for bitmap fonts.

Akihiro Sagawa sagawa.aki at gmail.com
Tue Nov 17 08:07:30 CST 2015

On Mon, 16 Nov 2015 10:57:03 +0000, Huw Davies wrote:
> > The failure caused by the potential bug that Western System font is a
> > fake bold.
> Could you explain what this bug is?

Sure. Currently, the fake bold flag is governed by ntmFlags. If ntmFlags
isn't set NTM_BOLD bit and the font weight, specified by a user, is
greater than 550 (see freetype.c, line 5555), fake bold flag is
activated (line 5601).
ntmFlags bits are set by get_ntm_flags function. If ft_face->style_flags
& FT_STYLE_FLAG_BOLD is true, then NTM_BOLD flag is set (line 1947).
For TrueType or OpenType fonts, the flag works as expected.  However,
this flag isn't set for bold Windows bitmap fonts (e.g. System; weight
600) in FreeType library unless weight >= 800[1].
Therefore, the fake_bold flag is incorrectly set for System bitmap font,
although the font is a real bold font.
[1] ... http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/src/winfonts/winfnt.c#n781

> Apart from that, while I think this series looks ok, I'm uncomfortable
> with this going in before 1.8 (the fact that is uses new FreeType
> functionality makes me especially nervous).  So I'm afraid you'll have
> to hold off until after the release.
I see. I'll resubmit the series of patches after 1.8 release.

Thanks for reviewing,
Akihiro Sagawa

More information about the wine-devel mailing list