freetype
[Top][All Lists]
Advanced

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

RE: [ft] Origin and Line spacing


From: Sebastien LEIX
Subject: RE: [ft] Origin and Line spacing
Date: Mon, 2 Apr 2007 11:34:14 +0200

>Have a look at the new ftdiff demo program which shows how to position
>multi-line text with FreeType.

>Using `vertAdvance' is bad.  This is a metrics for scripts written
>vertically (and it is documented as such).  Most fonts don't contain
>info about the line spacing -- additionally, it's really a matter of
>taste.

For line spacing, i used "height" and it seems to be good with many fonts.

I look at the ftdiff for the corner origin and you use the "ascender" to
define the top position. That works with some fonts, but not with others.
I tried to position ten fonts :
For the top positionning :
- 5 was good by using "ascender"
- 5 was good by using "bbox.yMax"
How can i know if i must use ascender or yMax ?

For the left positionning :
- All works fine with my magic formula : (FontSize * 16) / 72
I dont know why my formula works, but my text is exactly positionned as
under Windows C# .NET GDI+

I got a new problem with symbol fonts like "webdings, wingdings, etc.", the
caracters is not the same as under windows.

For example with Wingdings with the 'A' character :
- Windows C# .NET GDI+ : A hand with 2 fingers.
- Freetype : A moon with a star.

Regards

Sebastien





reply via email to

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