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: Behdad Esfahbod
Subject: Re: [ft-devel] glyph metrics don't match bitmap size (2.8.1)
Date: Wed, 20 Sep 2017 10:15:32 -0700

On Mon, Sep 18, 2017 at 10:33 PM, Werner LEMBERG <address@hidden> wrote:

> 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.

Are you confusing glyph bitmap width with advance?
 
> Is there any way to determine the final bitmap size without
> rendering it, or could it be added in a future version?

Might be a good idea to add a function for that.  I agree with the pain being inflicted on the clients here.
 
I don't think so.  Alexei?


    Werner

_______________________________________________
Freetype-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/freetype-devel



--

reply via email to

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