Font issue

Huw D M Davies h.davies1 at physics.ox.ac.uk
Sun Feb 10 07:55:59 CST 2002


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.




More information about the wine-devel mailing list