Debian Codegraph @

docs/pango_rendering.md

raw
1 ---
2 Title: The Rendering Pipeline
3 ---
4
5 # The Rendering Pipeline
6
7 The Pango rendering pipeline takes a string of Unicode characters, converts them
8 it into glyphs, and renders them on some output medium. This section describes the
9 various stages of this pipeline and the APIs that implement them.
10
11 <picture>
12 <source srcset="pipeline-dark.png" media="(prefers-color-scheme: dark)">
13 <img alt="Pango Rendering Pipeline" src="pipeline-light.png">
14 </picture>
15
16 Itemization
17 : breaks a piece of text into segments with consistent direction and shaping
18 properties. Among other things, this determines which font to use for each
19 character. Use [[email protected]] or [[email protected]_with_base_dir]
20 to itemize text.
21
22 Shaping
23 : converts characters into glyphs. Use [[email protected]],
24 [[email protected]_full] or [[email protected]_item] to shape text.
25
26 Line Breaking
27 : determines where line breaks should be inserted into a sequence of glyphs.
28 The functions [[email protected]_break], [[email protected]_break] and
29 [[email protected]_break] determine possible line breaks. The actual line
30 breaking is done by [[email protected]].
31
32 Justification
33 : adjusts inter-word spacing to form lines of even length. This is done by
34 [[email protected]].
35
36 Rendering
37 : takes a string of positioned glyphs, and renders them onto a surface.
38 This is accomplished by a [[email protected]] object. The functions
39 pango_cairo_show_glyph_string() and pango_cairo_show_layout() use a
40 [[email protected]] to draw text onto a cairo surface.