On Mon, Sep 18, 2017 at 10:33 PM, Werner LEMBERG <[email protected]> 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 > [email protected] > https://lists.nongnu.org/mailman/listinfo/freetype-devel > -- behdad http://behdad.org/
_______________________________________________ Freetype-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/freetype-devel
