[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] Origin and Line spacing
From: |
Werner LEMBERG |
Subject: |
Re: [ft] Origin and Line spacing |
Date: |
Wed, 11 Apr 2007 06:05:49 +0200 (CEST) |
Sorry for the late reply.
> For line spacing, i used "height" and it seems to be good with many
> fonts.
I assume the `height' field of the FT_FaceRec field (or
FT_Size_Metrics). Yes, this is the standard choice. Typographical
applications often use even bigger values.
> 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?
You can't, I think. David has apparently just uses a heuristical
value to avoid a gap at the top. Typographical applications like
groff by default simply move down by `height', then write the top text
line. However, such programs have plenty of whitespace above the top
line (this is, the top margin). If you need tight typesetting (say,
within a small box), the only choice is to scan the real height of all
affected glyphs.
> For the left positioning:
> - All works fine with my magic formula : (FontSize * 16) / 72
> I dont know why my formula works, but my text is exactly positioned
> as under Windows C# .NET GDI+
I can't comment on this.
> I got a new problem with symbol fonts like "webdings, wingdings,
> etc.", the characters are 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.
Look up the FreeType mailing list archive for problems with such
fonts. Windows maps symbol fonts to PUA Unicode values, IIRC.
Werner