Pango Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
PangoContext* pango_ft2_get_context (void); |
Retrieves a PangoContext appropriate for rendering with the PangoFT2 backend.
Returns : | the new PangoContext |
PangoFont* pango_ft2_load_font (PangoFontMap *fontmap, FT_Open_Args **open_args, FT_Long *face_indices, int n_fonts, int size); |
Loads a logical font based on XXX
fontmap : | a PangoFontmap |
open_args : | parameters that control loading |
face_indices : | |
n_fonts : | |
size : | |
Returns : | a new PangoFont |
void pango_ft2_render (FT_Bitmap *bitmap, PangoFont *font, PangoGlyphString *glyphs, gint x, gint y); |
Renders a PangoGlyphString onto a FreeType2 bitmap.
void pango_ft2_render_layout_line (FT_Bitmap *bitmap, PangoLayoutLine *line, int x, int y); |
Render a PangoLayoutLine onto a FreeType2 bitmap
bitmap : | a FT_Bitmap to render the line onto |
line : | a PangoLayoutLine |
x : | the x position of start of string (in pixels) |
y : | the y position of baseline (in pixels) |
void pango_ft2_render_layout (FT_Bitmap *bitmap, PangoLayout *layout, int x, int y); |
Render a PangoLayoutLine onto a FreeType2 bitmap
bitmap : | a FT_Bitmap to render the line onto |
layout : | a PangoLayout |
x : | the X position of the left of the layout (in pixels) |
y : | the Y position of the top of the layout (in pixels) |
int pango_ft2_n_subfonts (PangoFont *font); |
Returns the number of subfonts in a PangoFT2Font.
font : | a PangoFont |
Returns : | the number of subfonts in font |
PangoGlyph pango_ft2_get_unknown_glyph (PangoFont *font); |
Return the index of a glyph suitable for drawing unknown characters.
font : | a PangoFont |
Returns : | a glyph index into font |
int pango_ft2_font_get_kerning (PangoFont *font, PangoGlyph left, PangoGlyph right); |
Retrieves kerning information for a combination of two glyphs.
font : | a PangoFont |
left : | the left PangoGlyph |
right : | the right PangoGlyph |
Returns : | The amount of kerning (in Pango units) to apply for the given combination of glyphs. |
PangoCoverage* pango_ft2_get_coverage (PangoFont *font, PangoLanguage *language); |
FT_Face pango_ft2_get_face (PangoFont *font, PangoFT2Subfont subfont_index); |
Looks up a subfont in a PangoFT2Font and returns a pointer to the native FreeType2 FT_Face structure. This may be useful if you want to use FreeType2 functions directly.
font : | a PangoFont |
subfont_index : | the index of a subfont |
Returns : | a pointer to a FT_Face structure. |
PangoFT2FontCache* pango_ft2_font_cache_new (FT_Library library); |
Create a font cache.
library : | |
Returns : | The new font cache. This must be freed with pango_ft2_font_cache_free(). |
void pango_ft2_font_cache_free (PangoFT2FontCache *cache); |
Free a PangoFT2FontCache and all associated memory. All fonts loaded through this font cache will be freed along with the cache.
cache : | a PangoFT2FontCache |
FT_Face pango_ft2_font_cache_load (PangoFT2FontCache *cache, FT_Open_Args *args, FT_Long face_index); |
Load a FT_Face from FT_Open_Args and a face index. The result may be newly loaded, or it may have been previously stored
cache : | a PangoFT2FontCache |
args : | |
face_index : | |
Returns : | The FT_Face, or NULL if the font could not be loaded. In order to free this structure, you must call pango_ft2_font_cache_unload(). |
void pango_ft2_font_cache_unload (PangoFT2FontCache *cache, FT_Face face); |
Free a font structure previously loaded with pango_ft2_font_cache_load()
cache : | a PangoFT2FontCache |
face : | the face to unload |
PangoFT2FontCache* pango_ft2_font_map_get_font_cache (PangoFontMap *font_map); |
void pango_ft2_font_subfont_open_args (PangoFont *font, PangoFT2Subfont subfont_id, FT_Open_Args **open_args, FT_Long *face_index); |
Determine the FT_Open_Args and face index for the specified subfont.
font : | a PangoFont which must be from the FT2 backend |
subfont_id : | the id of a subfont within the font |
open_args : | pointer where to store the FT_Open_Args for this subfont |
face_index : | pointer where to store the face index for this subfont |