|
From: | Dave Calkins |
Subject: | Re: [ft] problem with "MS Sans Serif" font |
Date: | Fri, 29 Jan 2010 11:17:54 -0500 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 |
On 1/29/2010 11:14 AM, Werner LEMBERG wrote:
Don't mix up pixel size (which is absolute) and point size (which is relative to the selected DPI value). 11pt for 72dpi means a glyph height of 11 pixels; 11pt for 96dpi, however, is 15 pixels (rounded), and this size isn't available in the font. At 72dpi, the font contains faces for 11pt, 13pt, 16pt, 19pt, 24pt, and 32pt. At 96dpi, you get faces for 8pt, 10pt, 12pt, 14pt, 18pt, and 24pt.Understood. So is ftview only able to show the first font face in the file?Well, there is no command line option to directly select the face (you are welcome to add it). Instead, you have to press the `n' key repeatedly in the ftview window to walk over all available faces.
ah, ok, sorry you mentioned the 'n' key thing before. Sure enough, hitting 'n' got it to the right face and it worked, so my bad.
If you select a font size in WordPad which is not in the font (e.g. 11pt at 96dpi), you either get glyphs from a different, scalable font, or Windows does indeed apply scaling to a bitmap font which should produce horrible optical results.Is there any way to tell FreeType to scale if necessary to get the size I'm asking for?No. FreeType doesn't scale bitmap fonts.The bottom line is that we want to allow the user to pick a font and have it work. If it doesn't look as good, then they can decide to pick something else. But we want to still be able to render the requested face at the requested size.I suggest to disable bitmap fonts altogether since their use is very limited; IMHO they only make sense as console fonts. Use the FT_IS_SCALABLE macro to check for that. Werner
ok, maybe thats the best way to go then. If they pick a font which is not scalable, then we just override it and use a "safe" fallback font we know to be scalable.
Thanks!
[Prev in Thread] | Current Thread | [Next in Thread] |