freetype
[Top][All Lists]
Advanced

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

Re: [ft] Question about vertical text ascender and descender


From: Werner LEMBERG
Subject: Re: [ft] Question about vertical text ascender and descender
Date: Sun, 04 Nov 2012 08:05:29 +0100 (CET)

Hello Tom!


> The ascender and descender fields of FT_FaceRec provide distances
> relating to the font as rendered horizontally.

Correct.

> I am unable to find how to access the equivalent ascender /
> descender values to be used when dealing with text rendered
> vertically, in a font face which specifically supports vertical
> positioning. (The intended use of the values is for the correct
> position and size of the flashing text cursor in a text input
> field).
>
> Does FreeType expose these two values?

I assume that you are talking about a TrueType font, and you want to
access `vertTypoAscender' and `vertTypoDescender' in the `vhea' table,
right?

To get a pointer to the vertical header data, use

  TT_VertHeader* vert_header =
    (TT_VertHeader*)FT_Get_Sfnt_Table(face, ft_sfnt_vhea);

I've just added an example to the documentation of the
`FT_Get_Sfnt_Table' function.


    Werner



reply via email to

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