Thanks.
That looks to be exactly the information I was looking for.

-----Original Message-----
From: Huw Davies [mailto:[email protected]] 
Sent: 23 January 2013 09:23
To: Tony Smith
Cc: [email protected]
Subject: Re: [ft-devel] Generating Windows text metrics

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.
This e-mail message has been scanned and cleared by Postini / Google Message 
Security and the UNICOM Global security systems. This message is for the named 
person's use only. If you receive this message in error, please delete it and 
notify the sender. 


_______________________________________________
Freetype-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to