THN logo

THN Solutions

Glyph Renderer

Quality

Before talking about quality of font rendering, you should read following articles
By these articles, you will know about two ways to display fonts on computer displays. And SunFire get believe that philosophy of Apple more suitable for a vector graphic engine:
  • * Keep font as the design of typeface, even at the cost of a little bit of blurriness.
  • * All dimensions and text appearance are accurate as expectation. While apply grid-fitting as Microsoft, measure text function and draw text function have a small different. So when printing (high DPI eviroment), SunFire keeps your document as your expectation.

Built-in and software format

In some case you need rendering bold text of specified font. Some fonts have their own fonts for this task. For example, you can find that there are two separated file:Arial and Arial Bold in system’s font folder (in MS Windows is C:\Windows\Fonts).
Arial file
Arial font files in System Font folder

So, when you format your text, SunFire (and system API) will find suitable font for you. But when font doesn’t have built-in file for that format, SunFire will using software algorithm to simulate these format.
Look at example image for bold by algorithm apply for Century font.
Century Normal
Century Software Format
Normal and bold Century font

Besides, SunFire has supported following software format algorithms:
  • Bold : built-in and software
  • Italic : built-in and software
  • Condense: built-in and software. Almost fonts are not support this format.
  • Underline: using information in font for rendering.
  • Strike through: using information in font for rendering.
  • Subscript: using information in font for rendering.
  • Superscript: using information in font for rendering.

Font renderer

This component performs tasks:
  • Rasterize text and filling text
  • Transformation
  • Clipping and alpha masking
  • Measure string
  • Post process: kerning, base shifting , character spacing, character rotation …

This component is not support layout text: alignment, new line, tab, paragraph …. These tasks are performed by text composer.

Kerning

One interesting feature of this component is kerning5. Kerning is special information provided by font. When two character is support kerning (for example “A” and “V”), go side by side, their spacing is modified for closer (left image).

Kerning