The Rendering Pipeline
The Pango rendering pipeline takes a string of Unicode characters, converts them it into glyphs, and renders them on some output medium. This section describes the various stages of this pipeline and the APIs that implement them.
- Itemization
- breaks a piece of text into segments with consistent direction and shaping
properties. Among other things, this determines which font to use for each
character. Use
pango_itemize()
orpango_itemize_with_base_dir()
to itemize text. - Shaping
- converts characters into glyphs. Use
pango_shape()
,pango_shape_full()
orpango_shape_item()
to shape text. - Line Breaking
- determines where line breaks should be inserted into a sequence of glyphs.
The functions
pango_default_break()
,pango_tailor_break()
andpango_attr_break()
determine possible line breaks. The actual line breaking is done byPangoLayout
. - Justification
- adjusts inter-word spacing to form lines of even length. This is done by
PangoLayout
. - Rendering
- takes a string of positioned glyphs, and renders them onto a surface.
This is accomplished by a
PangoRenderer
object. The functionspango_cairo_show_glyph_string()
andpango_cairo_show_layout()
use aPangoRenderer
to draw text onto a cairo surface.