On Fri, Nov 18, 2016 at 1:32 PM, Werner LEMBERG <[email protected]> wrote: > >> I'm using FreeType for a terminal emulator application, and I need >> some advice for calculating the appropriate size for cells in the >> terminal emulator, given a monospace font. > > Have you tried the various FT_SIZE_REQUEST_TYPE_XXX requests?
I hadn't even noticed the size request options. I'll make a note to try out FT_SIZE_REQUEST_TYPE_CELL, since it looks like that option was made for terminal emulators. >> Right now I'm just using FT_FaceRec.bbox as follows: [...] > > No time to check that in detail. If the above fails I suggest that > you get the metrics from, say, digit zero and use this to scale the > font – if the font is intended as a mono-space font, the digits *must* > fit :-) > > > Werner I ended up checking the width of the 'M' glyph and it's working fine now. Beautifully really. Thanks for the advice! Jonathan _______________________________________________ Freetype mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/freetype
