freetype
[Top][All Lists]
Advanced

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

Re: [ft] More FT-2.4.10 Question


From: Werner LEMBERG
Subject: Re: [ft] More FT-2.4.10 Question
Date: Sun, 07 Oct 2012 22:36:39 +0200 (CEST)

Hello Sean!


Sorry for the late reply.  You might get quicker answers if you write
to one of the FreeType mailing lists (now CCed).

> I noticed that FT_GlyphSlot Metrics comes with two sets of data:
> vertical and horizontal.

Yes.

> No matter I use load flag FT_LOAD_VERTICAL_LAYOUT or not, both
> vertical and horizontal metrics data will be returned.

Correct.

> Also I noticed that the doc says:
>
>   FT_LOAD_VERTICAL_LAYOUT: Load the glyph for vertical text layout.
>   Don't use it as it is problematic currently.

I've just improved the text after some code inspection.  It now says
the following:

   FT_LOAD_VERTICAL_LAYOUT ::
     Load the glyph for vertical text layout.  In particular, the
     `advance' value in the @FT_GlyphSlotRec structure is set to the
     `vertAdvance' value of the `metrics' field.

     In case @FT_HAS_VERTICAL doesn't return true, you shouldn't use
     this flag currently.  Reason is that in this case vertical metrics
     get synthesized, and those values are not always consistent across
     various font formats.

> My question is:
>
> 1. Is vertical metrics data (metrics.vertBearingX, Y, etc.) good
> only when load flag FT_LOAD_VERTICAL_LAYOUT be used?  Or does that
> mean if load flag FT_LOAD_VERTICAL_LAYOUT is not used, the vertical
> metrics data is not good?

The vertical metrics data is only good (this is, not synthesized) if
the FT_HAS_VERTICAL macro returns true.

> 2. Should I interpret the note regarding to vertical flag to:
> Because the FT_LOAD_VERTICAL_LAYOUT is not implemented in freetype
> code, so do not use this flag, but the vertical metrics data from
> FT_GlyphSlot is good to use.  Or current version freetype doesn't
> support vertical layout at all, don't use the vertical metrics data.

FT_LOAD_VERTICAL_LAYOUT is implemented, but synthesized vertical
metrics values are not consistent.

Any tests and patches are highly welcomed :-)


    Werner



reply via email to

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