Coherent UI  2.5.3
A modern user interface library for games
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
Font Rendering

Coherent UI uses ClearType on Microsoft Windows. This allows fonts to look the same way as they do in the operating system and the rest of applications.

However, there are fonts that look fuzzy in certain sizes when they are rendered with ClearType. Here is a screenshot of the Lato font using ClearType:

cleartype.png
Lato font with ClearType
Coherent UI has a CSS property -coherent-font-cleartype that gives you control over whether ClearType should be used or standard antialiasing. -coherent-font-cleartype has two values:

  • on - use ClearType if possible. This is the default value
  • off - do not use ClearType at all

To turn off ClearType for a certain element you can use

<p style="-coherent-font-cleartype: off">
Grumpy wizards make toxic brew for the evil Queen and Jack.
</p>

And here is the result with -coherent-font-cleartype: off:

cleartype_off.png
Lato font without ClearType

Note that the result of using or turning off ClearType depends a lot on the font itself, the font size and weight.