Anti-Aliasing Fonts

Pyroka's picture

Hey all, I'm currently working on a project using your brillant font library, however I would like to know if its possible to turn off anti-aliasing on a font to bring out its true pixelness

Cygon's picture

Possible

It's possible, but you'll have to change the C++ code in the importer.

Specifically, in BitmapFontProcessor.cpp (found in Sources\Nuclex.Fonts.Content.Pipeline.TrueTypeImporter\Source), in addition to FT_LOAD_RENDER the flag FT_LOAD_MONOCHROME needs to be passed to FT_Load_Char().

This will, however, output the character data in packed form (eg. 1 byte stores 8 pixels), so instead of glyph->Bitmap[index + 3] = *pixelAddress; you'd have to isolate the specific bit there (rather trivial using an std::vector<bool>).

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <br> <a> <em> <strong> <u> <i> <b> <cite> <blockcode> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <pre> <span>
  • You can highlight code with any of the following tags: <blockcode>

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.