Checking the type of a font.

Posted By: Uhrwerk

Checking the type of a font. - 02/06/13 19:26

Hello Mr. Lotter,

acknex.h containes the following line in its definition of the FONT struct:
Code:
int cpl; // characters per bitmap line, or -1 for a TTF font


I'm wondering if it is safe to rely on the comment or if this is subject to future change? I'd like to write a macro or a function that checks the type of the font like:
Code:
#define FONT_IS_BITMAP_TYPE(f) (f->cpl >= 0)

Posted By: jcl

Re: Checking the type of a font. - 02/07/13 13:34

This is safe, the meaning of cpl won't change.
Posted By: Uhrwerk

Re: Checking the type of a font. - 02/07/13 13:52

Thank you very much!
© 2024 lite-C Forums