1 <!-- ##### SECTION Title ##### -->
2 Xft Fonts and Rendering
4 <!-- ##### SECTION Short_Description ##### -->
5 Font handling and rendering with the Xft backend
7 <!-- ##### SECTION Long_Description ##### -->
9 The Xft library is a library for displaying fonts on the X window
10 system; internally it uses the fontconfig library to locate font
11 files, and the FreeType library to load and render fonts. The
12 Xft backend is the recommended Pango font backend for screen
13 display with X. (The <link linkend="pango-Cairo-Rendering">Cairo back end</link> is another possibility.)
16 Using the Xft backend is generally straightforward;
17 pango_xft_get_context() creates a context for a specified display
18 and screen. You can then create a #PangoLayout with that context
19 and render it with pango_xft_render_layout(). At a more advanced
20 level, the low-level fontconfig options used for rendering fonts
21 can be affected using pango_xft_set_default_substitute(), and
22 pango_xft_substitute_changed().
25 A range of functions for drawing pieces of a layout, such as
26 individual layout lines and glyphs strings are provided. You can also
27 directly create a #PangoXftRenderer. Finally, in some advanced cases, it
28 is useful to derive from #PangoXftRenderer. Deriving from
29 #PangoXftRenderer is useful for two reasons. One reason is be to
30 support custom attributes by overriding #PangoRendererClass virtual
31 functions like 'prepare_run' or 'draw_shape'. The reason is to
32 customize exactly how the final bits are drawn to the destination by
33 overriding the #PangoXftRendererClass virtual functions
34 'composite_glyphs' and 'composite_trapezoids'.
37 <!-- ##### SECTION See_Also ##### -->
42 <!-- ##### SECTION Stability_Level ##### -->
45 <!-- ##### STRUCT PangoXftFont ##### -->
47 #PangoXftFont is an implementation of #PangoFcFont using the Xft
48 library for rendering. It is used in conjunction with #PangoXftFontMap.
52 <!-- ##### STRUCT PangoXftFontMap ##### -->
54 #PangoXftFontMap is an implementation of #PangoFcFontMap suitable for
55 the Xft library as the renderer. It is used in to create fonts of
60 <!-- ##### MACRO PANGO_RENDER_TYPE_XFT ##### -->
62 A string constant that was used to identify shape engines that work
63 with the Xft backend. See %PANGO_RENDER_TYPE_FC for the replacement.
68 <!-- ##### FUNCTION pango_xft_get_context ##### -->
78 <!-- ##### FUNCTION pango_xft_get_font_map ##### -->
88 <!-- ##### FUNCTION pango_xft_set_default_substitute ##### -->
100 <!-- ##### USER_FUNCTION PangoXftSubstituteFunc ##### -->
102 Function type for doing final config tweaking on prepared FcPatterns.
105 @pattern: the FcPattern to tweak.
109 <!-- ##### FUNCTION pango_xft_substitute_changed ##### -->
118 <!-- ##### FUNCTION pango_xft_shutdown_display ##### -->
127 <!-- ##### FUNCTION pango_xft_font_get_font ##### -->
136 <!-- ##### FUNCTION pango_xft_font_get_display ##### -->
145 <!-- ##### FUNCTION pango_xft_font_has_char ##### -->
155 <!-- ##### FUNCTION pango_xft_font_lock_face ##### -->
164 <!-- ##### FUNCTION pango_xft_font_unlock_face ##### -->
172 <!-- ##### FUNCTION pango_xft_font_get_glyph ##### -->
182 <!-- ##### FUNCTION pango_xft_font_get_unknown_glyph ##### -->
192 <!-- ##### STRUCT PangoXftRenderer ##### -->
198 <!-- ##### ARG PangoXftRenderer:display ##### -->
203 <!-- ##### ARG PangoXftRenderer:screen ##### -->
208 <!-- ##### STRUCT PangoXftRendererClass ##### -->
213 @composite_trapezoids:
216 <!-- ##### FUNCTION pango_xft_renderer_new ##### -->
226 <!-- ##### FUNCTION pango_xft_renderer_set_draw ##### -->
235 <!-- ##### FUNCTION pango_xft_renderer_set_default_color ##### -->
244 <!-- ##### FUNCTION pango_xft_render ##### -->
257 <!-- ##### FUNCTION pango_xft_picture_render ##### -->
271 <!-- ##### FUNCTION pango_xft_render_transformed ##### -->
285 <!-- ##### FUNCTION pango_xft_render_layout_line ##### -->
297 <!-- ##### FUNCTION pango_xft_render_layout ##### -->