Incorrect emulation of Bold style.
Submitted by Daniel Fishman
Assigned to Carl Worth @cworth
Description
Hello everybody.
When True Type font doesn't have a Bold style and Bold is emulated, it is done in suboptimal way, that is: when Bold style is emulated on a bitmapped font, the characters are rendered beautifully, but when emulation is done on a True Type font, characters are rendered noticeably worse - they have jagged edges, are emboldened in a non-uniform way etc.
Here is a discussion which I had on a freetype mailing list, where solution were proposed:
Question:
Generally, X renders .ttf fonts exactly as Windows does, but there is the following problem: usually .ttf file for a particular font contains a number of styles: Regular, Bold, Italic and Bold Italic, so that when application uses bold font, it uses Bold style instead of Regular. But when .ttf doesn't contain Bold style, for example, and bold font is required, boldness is emulated. Now, Windows emulates boldness perfectly, but X does it really badly. For example, see the difference between Windows and X in bold font rendering in the following screnshots:
Windows: http://xt.nm.ru/monaco-win-10pt_1.tif Linux: http://xt.nm.ru/monaco-lin-10pt.tif
The font used in a screenshot is Monaco (.ttf version), but there is the same problem with other fonts which don't have Bold style "built-in", for example Ariel Mono and others.
I use libfreetype 2.2.1 (Ubuntu Edgy).
Is it possible somehow to improve the situation?
Response (by David Turner):
The problem is in the client libraries using FreeType to render the text. 2.2.1 provides both outline and bitmap emboldening functions, and the latter is capable of generating output exactly equal to your "good" screenshot.
more precisely, the problem is that these libraries only use the vector emboldening algorithm, which only gives satisfying results with anti-aliase text.
I would provide a patch if I had time, I recommend you to file bugs against libXft, Cairo, and probably OpenOffice.org if this is a big concern to you.
As adviced, I submit that bug both to Cairo and to LibXft.
Version: 1.2.4