
Fonts sharper with a little modification.
Posted Thursday, 29 December, 2011 - 09:29 by migueltk| Project: | QuickFont - Text Printing and Font Generation Library |
| Version: | 0.9.2 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | open |
Jump to:
Description
Personally I appreciate small letter fonts are low-sharpening. I suggest to modify the following code:
File: Builder.cs
Row 137: gfx.TextRenderingHint = TextRenderingHint.AntiAlias;
by the following code:
if (font.Size <= 18.0f) { gfx.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; } else { gfx.TextRenderingHint = TextRenderingHint.AntiAlias; }
After changing the letters are much sharper.


Comments
#1
Thank you for brining this to my attention. This is a good suggestion, although I've noticed that some fonts do not render properly with AntiAliasGridFit (some verticals are deleted, such as the straight in the letter 'd').
Instead I've added a render option to QFontBuilderConfiguration which allows you to specify which TextRenderingHint is used, as the best hint seems to vary depending upon the font in question. This is included in 1.0.0 which I'm about to release.