[Bug 30798] New: gdiplus: GdipNewInstalledFontCollection fails in case system have got at least one OTF font installed
wine-bugs at winehq.org
wine-bugs at winehq.org
Wed May 30 01:54:44 CDT 2012
Bug #: 30798
Summary: gdiplus: GdipNewInstalledFontCollection fails in case
system have got at least one OTF font installed
AssignedTo: wine-bugs at winehq.org
ReportedBy: mooroon2 at mail.ru
CC: dmitry at baikal.ru
Recently I had been investigating Wine testcase failures on my linux box and
one of them being gdiplus testcase failing two tests at lines font.c:396 and
Wine tests results database have results from other linux boxes where this test
does succeed so I was wondering what's wrong with it on my system. After
digging into the code for about an hour it turned out that gdiplus
implementation is flawed in a way that it doesn't expect font type to be
anything other than RASTER_FONTTYPE or TRUETYPE_FONTTYPE. It is not the case
with current Wine's freetype-based font engine driver for OpenType fonts (OTF)
- they are treated to be DEVICE_FONTTYPE.
It results in situation when add_font_proc() callback trying to add/process OTF
fonts followed by is_font_installed_proc() terminating enumeration process as
soon as it encounters a font with type != TRUETYPE_FONTTYPE.
Trivial patch as I attach to this bug report workarounds the problem and makes
testcase pass these tests. I'm not sure that there are no bad consequences in
treating DEVICE_FONTTYPE fonts the same way it treats TRUETYPE_FONTTYPE in
gdiplus, but looking through Wine's freetype font driver makes me believe that
the only font type that gets assigned DEVICE_FONTTYPE is the OTF format - and
AFAIK it is pretty much the same as TTF WRT its properties and capabilities.
Another way to "fix" the thing is to skip fonts which have type other than
TRUETYPE_FONTTYPE in add_font_proc() callback or rewrite Wine's freetype font
engine driver to report TRUETYPE_FONTTYPE for OTF fonts (and make sure that the
behavior for these font types is just the same). I don't gave enough knowledge
in this area so we need someone competent it this question to fix this bug.
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the wine-bugs