freetype
[Top][All Lists]
Advanced

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

Re: Documentation vs. RV vs. CVS?


From: David Turner
Subject: Re: Documentation vs. RV vs. CVS?
Date: Mon, 30 Oct 2000 15:59:58 +0100

Hi Michael,

Michael Vance a écrit :
> 
> On Sat, Oct 21, 2000 at 10:25:46AM +0200, Werner LEMBERG wrote:
> 
> > The final size of fonts is determined by the DPI and point size values
> > only.  Where is the problem?
> 
> For a given point size and DPI, the output using the Win32
> GetGlyphOutline vs. the Freetype2 FT_Render_Glyph output is vastly
> different. This display settings applet says it's using 96 DPI in
> Win32, and my xdpyinfo says I'm using 75 DPI in X. If I set my DPI to
> 75 and the point size to 12 in Freetype2, the output is significantly
> larger in terms of bitmap dimensions than the output I get from the
> Win32 rasterizer. As a result I'm doing weird contortions to the point
> size in order to get it to match up with that on Win32 (thanks for
> fractional sizes in Freetype :) ).
> 

Do you mean that you're comparing the following ??:

  - glyphs returned by Windows, at 12 points and 96 dpi
  - glyphs returned by FreeType at 12 points and 75 dpi

the fact that you're getting different glyph heights is absolutely
normal in this case, given that the only "relevant" value regarding
the final glyph image is the character _pixel_ size, whose value
is normally :

       pixel_size =round( point_size * DPI/72 )

so:
     12 * 96 / 72 = 16.0 => 16 pixels
     12 * 75 / 72 = 12.5 => 13 pixels

note that the DPI values returned by systems like Windows and X are
generally completely bogus :-) If you want to get the same results
than Windows, you should use the same DPI than Windows uses..

note that we do not enable the TrueType interpreter by default anymore,
so expect _slight_ differences in glyph output..

> I can paste code of Win32 and Freetype implementations if anyone is
> interested.
> 
Let us know if changing your DPI doesn't solve your problem..
Code would be welcome in this case..

- David



reply via email to

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