> I guess you mean face->glyph->metrics.horiAdvance (because 
> face->glyph->linearHoriAdvance is there but seems to give something 
> completely different, even with >> 16).

Yes, that's right, linearHoriAdvance is something different, as explained
by the documentation.

> horiAdvance seems to be the same 
> as advance.x for several fonts I tried. Unfortunately it is not always 
> easy to relate properties in the documentation with structure members in 
> the API...
> 
It will be the same, unless you use FT_Set_Transform to set a transformation.

> That leaves the second of my original questions. advance.x = horiAdvance 
> for a space seems awfully small to me. For MS Arial I get
> 
>     'm': width=576, horiAdvance=640, advance.x=640
>     'n': width=384, horiAdvance=448, advance.x=448
>     'x': width=384, horiAdvance=384, advance.x=384
>     'i': width=128, horiAdvance=192, advance.x=192
>     '.': width=128, horiAdvance=192, advance.x=192
>     ' ': width=  0, horiAdvance=192, advance.x=192
> 
> When I use those advances t draw continuous text it is very hard to 
> discriminate where words start and end. When I look at nicely layouted 
> text (LaTeX) it seems to me that the space between words is about the 
> same as the width of the x character but not as narrow as the i or the 
> dot as the above numbers seem to apply. I therefore used 2*advance.x but 
> that seems kind of wrong...
> 

this is a font design issue. If the sapce has the same advance than an 'i',
I would say the values returned are correct. And LaTeX uses completely
different algorithms to space words on each line anyway, you shouldn't
use it to compare the result of simply using the advance of "space"

hope this helps,

- David Turner
- The FreeType Project  (www.freetype.org)



_______________________________________________
Freetype mailing list
Freetype@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype

Reply via email to