Description

This sample demonstrates sophisticated text layout using the open source HarfBuzz text shaping engine library to position glyphs for strings of Unicode text.

Screenshot

APIs Used

  • NV_path_rendering
  • EXT_direct_state_access

Shared User Interface

The Graphics samples all share a common app framework and certain user interface elements, centered around the "Tweakbar" panel on the left side of the screen which lets you interactively control certain variables in each sample.

To show and hide the Tweakbar, simply click or touch the triangular button positioned in the top-left of the view.

Technical Details

Samples of text in various languages using appropriate scripts are rendered from their resolution-independent outlines. NV_path_rendering does the work of rendering font glyphs of TrueType/OpenType, with HarfBuzz doing glyph positioning and Unicode script shaping, and FreeType2 used to load the underlying metrics for each font.

The sample relies on revision 1.3 of the NV_path_rendering extension that adds support for glyph indexed font usage. In particular, glPathGlyphIndexArrayNV and glPathMemoryGlyphIndexArrayNV.