freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] font size error


From: Dave Calkins
Subject: Re: [ft] font size error
Date: Mon, 18 Jan 2010 17:52:47 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0

Thanks for the reply! So for this case, I need to use 96 instead of 72 for the resolution. Where do I input that value? Also, say the user chooses an arbitrary font family and point size. Is there some check I can do to see which I should be using? Or should I just always be using 96 on Windows?


On 1/18/2010 5:25 PM, Werner LEMBERG wrote:
For this particular combination of font family and point size,
though, the sizing of the font fails with an error
FNT_Err_Invalid_Pixel_Size.  We're requesting "MS Sans Serif" with a
point size of 8.  We've also tried a couple other sizes for this
same font family with no luck.

Any ideas?  Is the problem that its a ".fon" file?
I don't see a problem, because...

5) This eventually calls FT_Set_Char_Size(face =<ptr>,char_width =
0,char_height = 512,horz_resolution = 0,vert_resolution = 0).  This
function ends up setting the char_width and char_height to both be
512 and both resolutions to be 72.  It then calls FT_Request_Size.

[...]

It looks like its failing a check concerning which sizes are
available in the font.  I am able, though, to use an 8pt MS Sans
Serif font in, say, WordPad.
you are using the wrong resolution.  Windows uses 96dpi by default,
and 8pt at 96dpi is available in `sserife.fon'.

Note that in FreeType the various sizes available in `sserife.fon' are
not handled as bitmap strikes of a single face but have to be accessed
with different font indices.


     Werner






reply via email to

[Prev in Thread] Current Thread [Next in Thread]