freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] Typo in the documentation?


From: Werner LEMBERG
Subject: Re: [Freetype] Typo in the documentation?
Date: Mon, 17 Jun 2002 10:23:17 +0200 (CEST)

> Hello, I just noticed that in freetype 2.0.9 documentation (I don't know
> about newer ones),
> in the section /docs/reference/ft2-glyph_management.html#FT_GlyphRec
> advance is marked as 16.6 fixed point. Isn't advance really 26.6 fixed
> point? Since to get
> pixels out of it I have to right shift it by 6 and not 16... Or am I
> mistaken?

It was a typo (should be 16.16) which has been fixed meanwhile.

> Also I had a question, why is sometimes ascender a lot bigger than a
> big character like 'A' in for example arial.ttf?

This is a typographical decision done by the font developer.

> I ask this because I would like to render text in a rectangle being
> the top left corner the top of that 'A' (that I suppose in arial.ttf
> is one of the highest characters).  Anyway to do that? (given any
> text of course)

Use the bounding box values (FT_Outline_Get_BBox).

> Also why is height smaller than ascender + descender sometimes?

Again, a typographical decision.

> And my last question, what is the easiest way to translate font
> units into pixels?

I suggest you look at the programs in the ft2demos package which
handles exactly this sort of problems.


    Werner



reply via email to

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