On Tue, Jan 22, 2013 at 04:03:20PM +0000, Tony Smith wrote: > > In the Windows API function ::CreateFont the height can be passed in two ways. > A negative height gives metrics for fit to character height and a positive > heights means fit to cell height. > Here is the MSDN page for some more details. > http://msdn.microsoft.com/en-gb/library/windows/desktop/ > dd183499%28v=vs.85%29.aspx > > Can Freetype also generate text metrics for both fit to character height and > fit to cell height?
Have a look at how it's done in Wine (www.winehq.org) load_VDMX is used if the font has a VDMX table: http://source.winehq.org/source/dlls/gdi32/freetype.c#L4212 otherwise the fallback calc_ppem_for_height: http://source.winehq.org/source/dlls/gdi32/freetype.c#L3919 Elsewhere in that file you'll find how the rest of the metrics are calculated. Huw. _______________________________________________ Freetype-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/freetype-devel
