Please help this guy.
Werner
---BeginMessage---
Hello Werner,
I have been using freetype for some time and have come to my first
stumbling block: When using the image and font face caches, how can I
get the the full metrics of a glyph (metrics.horiBearingY, etc.)? It
seems that information
Well, I am not entirely sure what you want to do. Using horiBearingY as the
ascender seems weird - do you really want to use glyph metrics for line
metrics? Or do you really need the ascender/descender info for every glyph? In
any case, you shouldn't be calling FT_Load_Glyph when using the
Again, I really don't think you want descenders per-glyph. So, say you want to
draw some text on a line. If we consider the upper-left of the screen to be 0,0
with y increasing as we go down, and you want to draw a line whose baseline is
at y=100, then you:
set x to 0
set y to 100
for every
Thanks. This may well get me moving forward. I do indeed need to
measure the horiBearingY because I am trying to line up type of
different sizes to get the presentation that we need. Measuring a few
sample characters will be adequate. Using the rendered bitmap still
won't give me a way to
Yes it does work, but there is still no way to get the descender. The
FT_GlyphRec already has some of the FT_Glyph_Metrics information in
the form of the advance. Why doesn't the FT_GlyphRec contain the
remaining information? Memory concerns? Performance?
Thanks again for help and suggestions.
Trust me, this is a very special case of character at a time rendering
with some character tops or baselines aligned to neighboring glyph top
edges, etc. as opposed to a run of text. If the bitmap height - top
will get me a descender, then I am all done.
Michael
On Wed, Sep 29, 2010 at 11:12 AM,
Ah, I see. Yeah, I am pretty sure (though mainly from memory) that you can get
the descender that way. I think you can recreate all the per-glyph metrics
available from normal font loading using some combination of advances,
top/left, and the bitmap data *except* for lsb/rsb deltas, which you
The bitmap stuff is working great. Case closed!
Michael
On Wed, Sep 29, 2010 at 12:14 PM, Brady Duga d...@ljug.com wrote:
Ah, I see. Yeah, I am pretty sure (though mainly from memory) that you can
get the descender that way. I think you can recreate all the per-glyph
metrics available from