Debian Codegraph @

docs/pango_xft.md

raw
1 Title: Xft Fonts and Rendering
2
3 The Xft library is a library for displaying fonts on the X window
4 system; internally it uses the fontconfig library to locate font
5 files, and the FreeType library to load and render fonts. The
6 Xft backend is the recommended Pango font backend for screen
7 display with X. (The Cairo back end is another possibility.)
8
9 Using the Xft backend is generally straightforward;
10 [[email protected]_context] creates a context for a specified display
11 and screen. You can then create a [[email protected]] with that context
12 and render it with [[email protected]_layout]. At a more advanced
13 level, the low-level fontconfig options used for rendering fonts
14 can be affected using [[email protected]_default_substitute], and
15 [[email protected]_changed].
16
17 A range of functions for drawing pieces of a layout, such as individual
18 layout lines and glyphs strings are provided. You can also directly
19 create a [[email protected]]. Finally, in some advanced cases,
20 it is useful to derive from [[email protected]]. Deriving from
21 [[email protected]] is useful for two reasons. One reason is be
22 to support custom attributes by overriding `PangoRendererClass` virtual
23 functions like 'prepare_run' or 'draw_shape'. The other reason is to
24 customize exactly how the final bits are drawn to the destination by
25 overriding the `PangoXftRendererClass` virtual functions
26 'composite_glyphs' and 'composite_trapezoids'.