Synopsis#define PANGO_RENDER_TYPE_X PangoContext* pango_x_get_context (Display *display); void pango_x_context_set_funcs (PangoContext *context, PangoGetGCFunc get_gc_func, PangoFreeGCFunc free_gc_func); GC (*PangoGetGCFunc) (PangoContext *context, PangoColor *color, GC base_gc); void (*PangoFreeGCFunc) (PangoContext *context, GC gc); void pango_x_render (Display *display, Drawable d, GC gc, PangoFont *font, PangoGlyphString *glyphs, gint x, gint y); void pango_x_render_layout_line (Display *display, Drawable drawable, GC gc, PangoLayoutLine *line, int x, int y); void pango_x_render_layout (Display *display, Drawable drawable, GC gc, PangoLayout *layout, int x, int y); typedef PangoXSubfont; #define PANGO_X_MAKE_GLYPH (subfont,index_) #define PANGO_X_GLYPH_SUBFONT (glyph) #define PANGO_X_GLYPH_INDEX (glyph) PangoFont* pango_x_load_font (Display *display, const gchar *spec); PangoGlyph pango_x_get_unknown_glyph (PangoFont *font); gboolean pango_x_has_glyph (PangoFont *font, PangoGlyph glyph); int pango_x_list_subfonts (PangoFont *font, char **charsets, int n_charsets, PangoXSubfont **subfont_ids, int **subfont_charsets); PangoFontMap* pango_x_font_map_for_display (Display *display); void pango_x_shutdown_display (Display *display); PangoXFontCache* pango_x_font_map_get_font_cache (PangoFontMap *font_map); char* pango_x_font_subfont_xlfd (PangoFont *font, PangoXSubfont subfont_id); gboolean pango_x_find_first_subfont (PangoFont *font, char **charsets, int n_charsets, PangoXSubfont *rfont); PangoGlyph pango_x_font_get_unknown_glyph (PangoFont *font, gunichar wc); gboolean pango_x_apply_ligatures (PangoFont *font, PangoXSubfont subfont, gunichar **glyphs, int *n_glyphs, int **clusters); void pango_x_fallback_shape (PangoFont *font, PangoGlyphString *glyphs, const char *text, int n_chars); PangoXFontCache; PangoXFontCache* pango_x_font_cache_new (Display *display); void pango_x_font_cache_free (PangoXFontCache *cache); XFontStruct* pango_x_font_cache_load (PangoXFontCache *cache, const char *xlfd); void pango_x_font_cache_unload (PangoXFontCache *cache, XFontStruct *fs); DescriptionThe functions and macros in this section are for use with the old X font backend which used server-side bitmap fonts. This font backend is no longer supported, and attempts to use it will produce unpredictable results. Use the Xft or Cairo backend instead. DetailsPANGO_RENDER_TYPE_X#define PANGO_RENDER_TYPE_X "PangoRenderX" Warning
A string constant identifying the X renderer. The associated quark (see
pango_x_get_context ()PangoContext* pango_x_get_context (Display *display); Warning
Retrieves a PangoContext appropriate for rendering with X fonts on the given display.
pango_x_context_set_funcs ()void pango_x_context_set_funcs (PangoContext *context, PangoGetGCFunc get_gc_func, PangoFreeGCFunc free_gc_func); Warning
Sets the functions that will be used to get GC's in various colors when rendering layouts with this context.
PangoGetGCFunc ()GC (*PangoGetGCFunc) (PangoContext *context, PangoColor *color, GC base_gc); Warning
Specifies the type of the function used to create a new GC for a given color.
PangoFreeGCFunc ()void (*PangoFreeGCFunc) (PangoContext *context, GC gc); Warning
Specifies the type of the function used to free a GC created with the corresponding PangoGetGCFunc function.
pango_x_render ()void pango_x_render (Display *display, Drawable d, GC gc, PangoFont *font, PangoGlyphString *glyphs, gint x, gint y); Warning
Renders a PangoGlyphString onto an X drawable.
pango_x_render_layout_line ()void pango_x_render_layout_line (Display *display, Drawable drawable, GC gc, PangoLayoutLine *line, int x, int y); Warning
Renders a PangoLayoutLine onto an X drawable.
pango_x_render_layout ()void pango_x_render_layout (Display *display, Drawable drawable, GC gc, PangoLayout *layout, int x, int y); Warning
Renders a PangoLayout onto an X drawable.
PangoXSubfonttypedef guint16 PangoXSubfont; Warning
The PangoXSubFont type is an integer ID that identifies one particular X font within the fonts referenced in a PangoFont. PANGO_X_MAKE_GLYPH()#define PANGO_X_MAKE_GLYPH(subfont,index_) ((subfont)<<16 | (index_)) Warning
Make a glyph index from a PangoXSubFont index and a index of a character with the corresponding X font.
PANGO_X_GLYPH_SUBFONT()#define PANGO_X_GLYPH_SUBFONT(glyph) ((glyph)>>16) Warning
Extract the subfont index from a glyph index.
PANGO_X_GLYPH_INDEX()#define PANGO_X_GLYPH_INDEX(glyph) ((glyph) & 0xffff) Warning
Extract the character index within the X font from a glyph index.
pango_x_load_font ()PangoFont* pango_x_load_font (Display *display, const gchar *spec); Warning
Loads up a logical font based on a "fontset" style text specification. This is not remotely useful (Pango API's generally work in terms of PangoFontDescription) and the result may not work correctly in all circumstances. Use of this function should be avoided.
pango_x_get_unknown_glyph ()PangoGlyph pango_x_get_unknown_glyph (PangoFont *font); Warning
Returns the index of a glyph suitable for drawing unknown characters;
you should generally use
pango_x_has_glyph ()gboolean pango_x_has_glyph (PangoFont *font, PangoGlyph glyph); Warning
Checks if the given glyph is present in a X font.
pango_x_list_subfonts ()int pango_x_list_subfonts (PangoFont *font, char **charsets, int n_charsets, PangoXSubfont **subfont_ids, int **subfont_charsets); Warning
Lists the subfonts of a given font. The result is ordered first by charset, and then within each charset, by the order of fonts in the font specification.
pango_x_font_map_for_display ()PangoFontMap* pango_x_font_map_for_display (Display *display); Warning
Returns a PangoXFontMap for
pango_x_shutdown_display ()void pango_x_shutdown_display (Display *display); Warning
Free cached resources for the given X display structure.
pango_x_font_map_get_font_cache ()PangoXFontCache* pango_x_font_map_get_font_cache (PangoFontMap *font_map); Warning
Obtains the font cache associated with the given font map.
pango_x_font_subfont_xlfd ()char* pango_x_font_subfont_xlfd (PangoFont *font, PangoXSubfont subfont_id); Warning
Determines the X Logical Font Description for the specified subfont.
pango_x_find_first_subfont ()gboolean pango_x_find_first_subfont (PangoFont *font, char **charsets, int n_charsets, PangoXSubfont *rfont); Warning
Looks for subfonts with the
pango_x_font_get_unknown_glyph ()PangoGlyph pango_x_font_get_unknown_glyph (PangoFont *font, gunichar wc); Warning
Returns the index of a glyph suitable for drawing
Use
pango_x_apply_ligatures ()gboolean pango_x_apply_ligatures (PangoFont *font, PangoXSubfont subfont, gunichar **glyphs, int *n_glyphs, int **clusters); Warning
Previously did subfont-specific ligation. Now a no-op.
pango_x_fallback_shape ()void pango_x_fallback_shape (PangoFont *font, PangoGlyphString *glyphs, const char *text, int n_chars); Warning
This is a simple fallback shaper, that can be used
if no subfont that supports a given script is found.
For every character in
PangoXFontCachetypedef struct _PangoXFontCache PangoXFontCache; Warning
A PangoXFontCache caches XFontStructs for a single display by their XLFD name. pango_x_font_cache_new ()PangoXFontCache* pango_x_font_cache_new (Display *display); Warning
Creates a font cache for the specified display.
pango_x_font_cache_free ()void pango_x_font_cache_free (PangoXFontCache *cache); Warning
Frees a PangoXFontCache and all associated memory. All fonts loaded through this font cache will be freed along with the cache.
pango_x_font_cache_load ()XFontStruct* pango_x_font_cache_load (PangoXFontCache *cache, const char *xlfd); Warning
Loads a XFontStruct from a X Logical Font Description. The result may be newly loaded, or it may have been previously stored.
pango_x_font_cache_unload ()void pango_x_font_cache_unload (PangoXFontCache *cache, XFontStruct *fs); Warning
Frees a font structure previously loaded with
|