freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] vertBearingY of CFF glyphs is always unscaled


From: Behdad Esfahbod
Subject: Re: [ft-devel] vertBearingY of CFF glyphs is always unscaled
Date: Thu, 04 Apr 2013 13:53:44 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4

On 13-04-04 12:14 AM, Werner LEMBERG wrote:
> 
> [CCed Behdad]
> 
>> I had an issue with vertical text layout in HarfBuzz, in short we
>> have the calculation:
>>
>>      y = metrics.horiBearingY - (-metrics.vertBearingY)
>>
>> and since horiBearingY is scaled with font size while vertBearingY
>> is not, the result was completely wrong resulting in misplaced
>> glyphs (it was "mysterious because it affected only glyphs where the
>> value of this calculation was used, and the degree of misplacement
>> changes with font size).
> 
> I fear that support for the various vertical metrics components is
> severely broken in FreeType.  In particular, values are computed
> differently for different font formats.  To fix this for all font
> formats it would be necessary to investigate the issue in great
> detail; in particular, we need a detailed comparison with the MS and
> Apple engines: Some comments in FreeType indicate that, for example,
> the OpenType specification and recommendations contradict the actual
> implementation in Windows (and/or OS X).

There's not much I can offer here.  Currently FT headers say:

   *   FT_LOAD_VERTICAL_LAYOUT ::
   *     Load the glyph for vertical text layout.  _Don't_ use it as it is
   *     problematic currently.

As such, we only use that flag to get vertical advance using FT_Get_Advance(),
and even with that I've heard issues.  For all other purposes, we don't use
that flag and use what Khaled wrote above to get the difference vector between
horizontal and vertical origins and handle things manually.


> Do you have some time to devote to this issue?  Or maybe another
> volunteer?

I don't :(.

behdad

> 
>     Werner
> 
> _______________________________________________
> Freetype-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/freetype-devel
> 

-- 
behdad
http://behdad.org/



reply via email to

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