freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] glyph metrics don't match bitmap size (2.8.1)


From: Werner LEMBERG
Subject: Re: [ft-devel] glyph metrics don't match bitmap size (2.8.1)
Date: Tue, 19 Sep 2017 07:33:24 +0200 (CEST)

> I've managed to render text correctly now using LCD filtering (the
> new 2.8.1 version). I was able to do it by ignoring the glyph
> metrics and using the bitmap size itself. This works well enough for
> now, and the text looks great, but I would like to be able to
> retrieve final dimensions of the bitmap without actually
> rendering/allocating anything, so I can calculate the layout of a
> bitmap-font/texture-atlas, and blit the glyphs afterward.  I've been
> doing this for while and only ran into a problem when I tried the
> new LCD filtering.
> 
> I understand why the padding would be needed, but why wouldn't it be
> included in the glyph metrics (width/height)?

Because the effect is not cumulative.  Regardless of the number of
glyphs you are rendering in a row, the bitmap size is always one or
two pixels larger.

> Is there any way to determine the final bitmap size without
> rendering it, or could it be added in a future version?

I don't think so.  Alexei?


    Werner



reply via email to

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