freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Correct way to calculate line gap/external leading


From: Collyer, Oliver, SI
Subject: Re: [ft-devel] Correct way to calculate line gap/external leading
Date: Wed, 13 Apr 2011 04:21:27 +0000

>> 64 looks wrong... surely /64 or >>6 assuming those are in 26.6.

Sent from my iPigeon

On 13 Apr 2011, at 05:44, "Jjgod Jiang" <address@hidden> wrote:

> Hi,
> 
> I can't find in FreeType's docs on how to calculate the line gap,
> currently we are using:
> 
>    FT_Size_Metrics metrics = face->size->metrics;
>    leading = (metrics.height - metrics.ascender + metrics.descender) >> 64;
> 
> but sometimes I get -1 as the leading (Lucida Grande from Mac OS X, Ubuntu
> fonts, Inconsolata, DejaVu Sans). Is it fine to have negative leading? or
> is there anything wrong with my code? Thanks.
> 
> Attached my code to test.
> 
> - Jiang
> <main.c>
> _______________________________________________
> Freetype-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/freetype-devel



reply via email to

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