latest freetype patch severly breaks Wine: - behavior between Windows TT fonts and X11 font isn't orthogonal. For example, EnumFont can return X11 fonts, while realizing a font never let you use a X11 font - this leads to very interesting effects like asking for a fixed pitch font and getting a variable pitch one
so what would be the best fix ? either remove all X11 fonts in enum, or allow X11 fonts to be realized even if freetype is enabled ? any volunteer to fix it ?
A+
On Sat, Feb 09, 2002 at 05:44:55PM +0100, Eric Pouech wrote:
latest freetype patch severly breaks Wine:
- behavior between Windows TT fonts and X11 font isn't orthogonal. For example, EnumFont can return X11 fonts, while realizing a font never let you use a X11 font
- this leads to very interesting effects like asking for a fixed pitch font and getting a variable pitch one
so what would be the best fix ? either remove all X11 fonts in enum, or allow X11 fonts to be realized even if freetype is enabled ? any volunteer to fix it ?
Yes, we shouldn't enum X11 fonts if freetype/xrender is enabled. I'll submit a patch for this soon.
Huw.
Yes, we shouldn't enum X11 fonts if freetype/xrender is enabled. I'll submit a patch for this soon.
there's more than that. requesting a fixed pitch font should really return such a font... here's what I get (for the default fixed pitch hard wired to Courier New), widths gottent from GetCharExtent32 and compared to average width Char 1 (!) has wrong width: 10 Char 2 (") has wrong width: 10 Char 4 ($) has wrong width: 12 Char 5 (%) has wrong width: 12 Char 7 (') has wrong width: 10 Char 10 (*) has wrong width: 10 Char 11 (+) has wrong width: 12 Char 14 (.) has wrong width: 10 Char 15 (/) has wrong width: 10 Char 16 (0) has wrong width: 10 Char 17 (1) has wrong width: 10 Char 21 (5) has wrong width: 12 Char 23 (7) has wrong width: 10 Char 24 (8) has wrong width: 10
I tested it on windows 98 & nt2K and their TT fixed font really have a fixed pitch... (this the main reason for current rather strange output in wineconsole) however, the max char width is (at least on the fonts I tested on Windows) he average + 1 (which I don't really understand)
finally, when returing a fixed pitch font, it would be better to set the family to Modern rather than Roman
A+
On Sun, Feb 10, 2002 at 12:26:42PM +0100, Eric Pouech wrote:
Yes, we shouldn't enum X11 fonts if freetype/xrender is enabled. I'll submit a patch for this soon.
there's more than that. requesting a fixed pitch font should really return such a font... here's what I get (for the default fixed pitch hard wired to Courier New), widths gottent from GetCharExtent32 and compared to average width Char 1 (!) has wrong width: 10 Char 2 (") has wrong width: 10 Char 4 ($) has wrong width: 12 Char 5 (%) has wrong width: 12 Char 7 (') has wrong width: 10 Char 10 (*) has wrong width: 10 Char 11 (+) has wrong width: 12 Char 14 (.) has wrong width: 10 Char 15 (/) has wrong width: 10 Char 16 (0) has wrong width: 10 Char 17 (1) has wrong width: 10 Char 21 (5) has wrong width: 12 Char 23 (7) has wrong width: 10 Char 24 (8) has wrong width: 10
I tested it on windows 98 & nt2K and their TT fixed font really have a fixed pitch... (this the main reason for current rather strange output in wineconsole) however, the max char width is (at least on the fonts I tested on Windows) he average + 1 (which I don't really understand)
Yeah, I need to do something different with fixed pitched fonts. I'll look into it.
Incidently the font enum logic in wineconsole will need to be changed to cope with scalable fonts (you should give the user the ability to pick the font size rather than just display the enumerated values).
finally, when returing a fixed pitch font, it would be better to set the family to Modern rather than Roman
Yes, I've got a patch that correctly sets the tmPitchAndFamily field in GetTextMetrics (and also therefore in EnumFontFamiliesEx).
Huw.
Incidently the font enum logic in wineconsole will need to be changed to cope with scalable fonts (you should give the user the ability to pick the font size rather than just display the enumerated values).
yes I know. it's even more broken than that. there's some computation made to insure that font size will fit in current display size (and which is also completly broken) and wineconsole has to be fixed first (otherwise, with your patch applied, it would no longer work).
A+