SynopsisPangoFontDescription; #define PANGO_TYPE_FONT_DESCRIPTION enum PangoStyle; #define PANGO_TYPE_STYLE enum PangoWeight; #define PANGO_TYPE_WEIGHT enum PangoVariant; #define PANGO_TYPE_VARIANT enum PangoStretch; #define PANGO_TYPE_STRETCH enum PangoFontMask; #define PANGO_TYPE_FONT_MASK PangoFontDescription* pango_font_description_new (void); PangoFontDescription* pango_font_description_copy (const PangoFontDescription *desc); PangoFontDescription* pango_font_description_copy_static (const PangoFontDescription *desc); guint pango_font_description_hash (const PangoFontDescription *desc); gboolean pango_font_description_equal (const PangoFontDescription *desc1, const PangoFontDescription *desc2); void pango_font_description_free (PangoFontDescription *desc); void pango_font_descriptions_free (PangoFontDescription **descs, int n_descs); void pango_font_description_set_family (PangoFontDescription *desc, const char *family); void pango_font_description_set_family_static (PangoFontDescription *desc, const char *family); const char* pango_font_description_get_family (const PangoFontDescription *desc); void pango_font_description_set_style (PangoFontDescription *desc, PangoStyle style); PangoStyle pango_font_description_get_style (const PangoFontDescription *desc); void pango_font_description_set_variant (PangoFontDescription *desc, PangoVariant variant); PangoVariant pango_font_description_get_variant (const PangoFontDescription *desc); void pango_font_description_set_weight (PangoFontDescription *desc, PangoWeight weight); PangoWeight pango_font_description_get_weight (const PangoFontDescription *desc); void pango_font_description_set_stretch (PangoFontDescription *desc, PangoStretch stretch); PangoStretch pango_font_description_get_stretch (const PangoFontDescription *desc); void pango_font_description_set_size (PangoFontDescription *desc, gint size); gint pango_font_description_get_size (const PangoFontDescription *desc); void pango_font_description_set_absolute_size (PangoFontDescription *desc, double size); gboolean pango_font_description_get_size_is_absolute (const PangoFontDescription *desc); void pango_font_description_set_gravity (PangoFontDescription *desc, PangoGravity gravity); PangoGravity pango_font_description_get_gravity (const PangoFontDescription *desc); PangoFontMask pango_font_description_get_set_fields (const PangoFontDescription *desc); void pango_font_description_unset_fields (PangoFontDescription *desc, PangoFontMask to_unset); void pango_font_description_merge (PangoFontDescription *desc, const PangoFontDescription *desc_to_merge, gboolean replace_existing); void pango_font_description_merge_static (PangoFontDescription *desc, const PangoFontDescription *desc_to_merge, gboolean replace_existing); gboolean pango_font_description_better_match (const PangoFontDescription *desc, const PangoFontDescription *old_match, const PangoFontDescription *new_match); PangoFontDescription* pango_font_description_from_string (const char *str); char* pango_font_description_to_string (const PangoFontDescription *desc); char* pango_font_description_to_filename (const PangoFontDescription *desc); PangoFontMetrics; #define PANGO_TYPE_FONT_METRICS PangoFontMetrics* pango_font_metrics_ref (PangoFontMetrics *metrics); void pango_font_metrics_unref (PangoFontMetrics *metrics); int pango_font_metrics_get_ascent (PangoFontMetrics *metrics); int pango_font_metrics_get_descent (PangoFontMetrics *metrics); int pango_font_metrics_get_approximate_char_width (PangoFontMetrics *metrics); int pango_font_metrics_get_approximate_digit_width (PangoFontMetrics *metrics); int pango_font_metrics_get_underline_thickness (PangoFontMetrics *metrics); int pango_font_metrics_get_underline_position (PangoFontMetrics *metrics); int pango_font_metrics_get_strikethrough_thickness (PangoFontMetrics *metrics); int pango_font_metrics_get_strikethrough_position (PangoFontMetrics *metrics); PangoFont; #define PANGO_TYPE_FONT #define PANGO_FONT (object) #define PANGO_IS_FONT (object) PangoEngineShape* pango_font_find_shaper (PangoFont *font, PangoLanguage *language, guint32 ch); PangoFontDescription* pango_font_describe (PangoFont *font); PangoFontDescription* pango_font_describe_with_absolute_size (PangoFont *font); PangoCoverage* pango_font_get_coverage (PangoFont *font, PangoLanguage *language); void pango_font_get_glyph_extents (PangoFont *font, PangoGlyph glyph, PangoRectangle *ink_rect, PangoRectangle *logical_rect); PangoFontMetrics* pango_font_get_metrics (PangoFont *font, PangoLanguage *language); PangoFontMap* pango_font_get_font_map (PangoFont *font); PangoFontFamily; #define PANGO_TYPE_FONT_FAMILY #define PANGO_FONT_FAMILY (object) #define PANGO_IS_FONT_FAMILY (object) const char* pango_font_family_get_name (PangoFontFamily *family); gboolean pango_font_family_is_monospace (PangoFontFamily *family); void pango_font_family_list_faces (PangoFontFamily *family, PangoFontFace ***faces, int *n_faces); PangoFontFace; #define PANGO_TYPE_FONT_FACE #define PANGO_FONT_FACE (object) #define PANGO_IS_FONT_FACE (object) const char* pango_font_face_get_face_name (PangoFontFace *face); void pango_font_face_list_sizes (PangoFontFace *face, int **sizes, int *n_sizes); PangoFontDescription* pango_font_face_describe (PangoFontFace *face); gboolean pango_font_face_is_synthesized (PangoFontFace *face); PangoFontMap; #define PANGO_TYPE_FONT_MAP #define PANGO_FONT_MAP (object) #define PANGO_IS_FONT_MAP (object) PangoFontMapClass; #define PANGO_FONT_MAP_CLASS (klass) #define PANGO_IS_FONT_MAP_CLASS (klass) #define PANGO_FONT_MAP_GET_CLASS (obj) PangoContext* pango_font_map_create_context (PangoFontMap *fontmap); PangoFont* pango_font_map_load_font (PangoFontMap *fontmap, PangoContext *context, const PangoFontDescription *desc); PangoFontset* pango_font_map_load_fontset (PangoFontMap *fontmap, PangoContext *context, const PangoFontDescription *desc, PangoLanguage *language); void pango_font_map_list_families (PangoFontMap *fontmap, PangoFontFamily ***families, int *n_families); const char* pango_font_map_get_shape_engine_type (PangoFontMap *fontmap); PangoFontset; #define PANGO_TYPE_FONTSET PangoFontsetClass; PangoFont* pango_fontset_get_font (PangoFontset *fontset, guint wc); PangoFontMetrics* pango_fontset_get_metrics (PangoFontset *fontset); gboolean (*PangoFontsetForeachFunc) (PangoFontset *fontset, PangoFont *font, gpointer data); void pango_fontset_foreach (PangoFontset *fontset, PangoFontsetForeachFunc func, gpointer data); PangoFontsetSimple; #define PANGO_TYPE_FONTSET_SIMPLE PangoFontsetSimple* pango_fontset_simple_new (PangoLanguage *language); void pango_fontset_simple_append (PangoFontsetSimple *fontset, PangoFont *font); int pango_fontset_simple_size (PangoFontsetSimple *fontset); Object HierarchyGObject +----PangoFont +----PangoFcFont GObject +----PangoFontFamily GObject +----PangoFontFace GObject +----PangoFontMap +----PangoFcFontMap GObject +----PangoFontset +----PangoFontsetSimple GObject +----PangoFontset +----PangoFontsetSimple DescriptionPango supports a flexible architecture where a particular rendering architecture can supply an implementation of fonts. The PangoFont structure represents an abstract rendering-system-independent font. Pango provides routines to list available fonts, and to load a font of a given description. DetailsPangoFontDescriptiontypedef struct _PangoFontDescription PangoFontDescription; The PangoFontDescription structure represents the description of an ideal font. These structures are used both to list what fonts are available on the system and also for specifying the characteristics of a font to load. PANGO_TYPE_FONT_DESCRIPTION#define PANGO_TYPE_FONT_DESCRIPTION (pango_font_description_get_type ()) The GObject type for PangoFontDescription. enum PangoStyletypedef enum { PANGO_STYLE_NORMAL, PANGO_STYLE_OBLIQUE, PANGO_STYLE_ITALIC } PangoStyle; An enumeration specifying the various slant styles possible for a font.
enum PangoWeighttypedef enum { PANGO_WEIGHT_ULTRALIGHT = 200, PANGO_WEIGHT_LIGHT = 300, PANGO_WEIGHT_NORMAL = 400, PANGO_WEIGHT_SEMIBOLD = 600, PANGO_WEIGHT_BOLD = 700, PANGO_WEIGHT_ULTRABOLD = 800, PANGO_WEIGHT_HEAVY = 900 } PangoWeight; An enumeration specifying the weight (boldness) of a font. This is a numerical value ranging from 100 to 900, but there are some predefined values:
PANGO_TYPE_WEIGHT#define PANGO_TYPE_WEIGHT (pango_weight_get_type()) The GObject type for PangoWeight. enum PangoVarianttypedef enum { PANGO_VARIANT_NORMAL, PANGO_VARIANT_SMALL_CAPS } PangoVariant; An enumeration specifying capitalization variant of the font. PANGO_TYPE_VARIANT#define PANGO_TYPE_VARIANT (pango_variant_get_type()) The GObject type for PangoVariant. enum PangoStretchtypedef enum { PANGO_STRETCH_ULTRA_CONDENSED, PANGO_STRETCH_EXTRA_CONDENSED, PANGO_STRETCH_CONDENSED, PANGO_STRETCH_SEMI_CONDENSED, PANGO_STRETCH_NORMAL, PANGO_STRETCH_SEMI_EXPANDED, PANGO_STRETCH_EXPANDED, PANGO_STRETCH_EXTRA_EXPANDED, PANGO_STRETCH_ULTRA_EXPANDED } PangoStretch; An enumeration specifying the width of the font relative to other designs within a family.
PANGO_TYPE_STRETCH#define PANGO_TYPE_STRETCH (pango_stretch_get_type()) The GObject type for PangoStretch. enum PangoFontMasktypedef enum { PANGO_FONT_MASK_FAMILY = 1 << 0, PANGO_FONT_MASK_STYLE = 1 << 1, PANGO_FONT_MASK_VARIANT = 1 << 2, PANGO_FONT_MASK_WEIGHT = 1 << 3, PANGO_FONT_MASK_STRETCH = 1 << 4, PANGO_FONT_MASK_SIZE = 1 << 5, PANGO_FONT_MASK_GRAVITY = 1 << 6 } PangoFontMask; The bits in a PangoFontMask correspond to fields in a PangoFontDescription that have been set.
PANGO_TYPE_FONT_MASK#define PANGO_TYPE_FONT_MASK (pango_font_mask_get_type()) The GObject type for PangoFontMask. pango_font_description_new ()PangoFontDescription* pango_font_description_new (void); Creates a new font description structure with all fields unset.
pango_font_description_copy ()PangoFontDescription* pango_font_description_copy (const PangoFontDescription *desc); Make a copy of a PangoFontDescription.
pango_font_description_copy_static ()PangoFontDescription* pango_font_description_copy_static (const PangoFontDescription *desc);
Like
pango_font_description_hash ()guint pango_font_description_hash (const PangoFontDescription *desc);
Computes a hash of a PangoFontDescription structure suitable
to be used, for example, as an argument to
pango_font_description_equal ()gboolean pango_font_description_equal (const PangoFontDescription *desc1, const PangoFontDescription *desc2);
Compares two font descriptions for equality. Two font descriptions
are considered equal if the fonts they describe are provably identical.
This means that their masks do not have to match, as long as other fields
are all the same. (Two font descriptions may result in identical fonts
being loaded, but still compare
pango_font_description_free ()void pango_font_description_free (PangoFontDescription *desc); Frees a font description.
pango_font_descriptions_free ()void pango_font_descriptions_free (PangoFontDescription **descs, int n_descs);
Frees a list of font descriptions from
pango_font_description_set_family ()void pango_font_description_set_family (PangoFontDescription *desc, const char *family); Sets the family name field of a font description. The family name represents a family of related font styles, and will resolve to a particular PangoFontFamily. In some uses of PangoFontDescription, it is also possible to use a comma separated list of family names for this field.
pango_font_description_set_family_static ()void pango_font_description_set_family_static (PangoFontDescription *desc, const char *family);
Like
pango_font_description_get_family ()const char* pango_font_description_get_family (const PangoFontDescription *desc);
Gets the family name field of a font description. See
pango_font_description_set_style ()void pango_font_description_set_style (PangoFontDescription *desc, PangoStyle style); Sets the style field of a PangoFontDescription. The PangoStyle enumeration describes whether the font is slanted and the manner in which it is slanted; it can be either PANGO_STYLE_NORMAL, PANGO_STYLE_ITALIC, or PANGO_STYLE_OBLIQUE. Most fonts will either have a italic style or an oblique style, but not both, and font matching in Pango will match italic specifications with oblique fonts and vice-versa if an exact match is not found.
pango_font_description_get_style ()PangoStyle pango_font_description_get_style (const PangoFontDescription *desc);
Gets the style field of a PangoFontDescription. See
pango_font_description_set_variant ()void pango_font_description_set_variant (PangoFontDescription *desc, PangoVariant variant);
Sets the variant field of a font description. The PangoVariant
can either be
pango_font_description_get_variant ()PangoVariant pango_font_description_get_variant (const PangoFontDescription *desc);
Gets the variant field of a PangoFontDescription. See
pango_font_description_set_weight ()void pango_font_description_set_weight (PangoFontDescription *desc, PangoWeight weight); Sets the weight field of a font description. The weight field specifies how bold or light the font should be. In addition to the values of the PangoWeight enumeration, other intermediate numeric values are possible.
pango_font_description_get_weight ()PangoWeight pango_font_description_get_weight (const PangoFontDescription *desc);
Gets the weight field of a font description. See
pango_font_description_set_stretch ()void pango_font_description_set_stretch (PangoFontDescription *desc, PangoStretch stretch); Sets the stretch field of a font description. The stretch field specifies how narrow or wide the font should be.
pango_font_description_get_stretch ()PangoStretch pango_font_description_get_stretch (const PangoFontDescription *desc);
Gets the stretch field of a font description.
See
pango_font_description_set_size ()void pango_font_description_set_size (PangoFontDescription *desc, gint size);
Sets the size field of a font description in fractional points. This is mutually
exclusive with
pango_font_description_get_size ()gint pango_font_description_get_size (const PangoFontDescription *desc);
Gets the size field of a font description.
See
pango_font_description_set_absolute_size ()void pango_font_description_set_absolute_size (PangoFontDescription *desc, double size);
Sets the size field of a font description, in device units. This is mutually
exclusive with
Since 1.8 pango_font_description_get_size_is_absolute ()gboolean pango_font_description_get_size_is_absolute (const PangoFontDescription *desc);
Determines whether the size of the font is in points (not absolute) or device units (absolute).
See
Since 1.8 pango_font_description_set_gravity ()void pango_font_description_set_gravity (PangoFontDescription *desc, PangoGravity gravity);
Sets the gravity field of a font description. The gravity field
specifies how the glyphs should be rotated. If This function is seldom useful to the user. Gravity should normally be set on a PangoContext.
Since 1.16 pango_font_description_get_gravity ()PangoGravity pango_font_description_get_gravity (const PangoFontDescription *desc);
Gets the gravity field of a font description. See
Since 1.16 pango_font_description_get_set_fields ()PangoFontMask pango_font_description_get_set_fields (const PangoFontDescription *desc); Determines which fields in a font description have been set.
pango_font_description_unset_fields ()void pango_font_description_unset_fields (PangoFontDescription *desc, PangoFontMask to_unset); Unsets some of the fields in a PangoFontDescription. The unset fields will get back to their default values.
pango_font_description_merge ()void pango_font_description_merge (PangoFontDescription *desc, const PangoFontDescription *desc_to_merge, gboolean replace_existing);
Merges the fields that are set in
pango_font_description_merge_static ()void pango_font_description_merge_static (PangoFontDescription *desc, const PangoFontDescription *desc_to_merge, gboolean replace_existing);
Like
pango_font_description_better_match ()gboolean pango_font_description_better_match (const PangoFontDescription *desc, const PangoFontDescription *old_match, const PangoFontDescription *new_match);
Determines if the style attributes of
pango_font_description_from_string ()PangoFontDescription* pango_font_description_from_string (const char *str);
Creates a new font description from a string representation in the
form "[FAMILY-LIST] [STYLE-OPTIONS] [SIZE]", where FAMILY-LIST is a
comma separated list of families optionally terminated by a comma,
STYLE_OPTIONS is a whitespace separated list of words where each WORD
describes one of style, variant, weight, stretch, or gravity, and SIZE
is a decimal number (size in points) or optionally followed by the
unit modifier "px" for absolute size. Any one of the options may
be absent. If FAMILY-LIST is absent, then the family_name field of
the resulting font description will be initialized to
pango_font_description_to_string ()char* pango_font_description_to_string (const PangoFontDescription *desc);
Creates a string representation of a font description. See
pango_font_description_to_filename ()char* pango_font_description_to_filename (const PangoFontDescription *desc);
Creates a filename representation of a font description. The
filename is identical to the result from calling
PangoFontMetricstypedef struct { guint ref_count; int ascent; int descent; int approximate_char_width; int approximate_digit_width; int underline_position; int underline_thickness; int strikethrough_position; int strikethrough_thickness; } PangoFontMetrics; A PangoFontMetrics structure holds the overall metric information for a font (possibly restricted to a script). The fields of this structure are private to implementations of a font backend. See the documentation of the corresponding getters for documentation of their meaning.
PANGO_TYPE_FONT_METRICS#define PANGO_TYPE_FONT_METRICS (pango_font_metrics_get_type ()) The GObject type for PangoFontMetrics. pango_font_metrics_ref ()PangoFontMetrics* pango_font_metrics_ref (PangoFontMetrics *metrics); Increase the reference count of a font metrics structure by one.
pango_font_metrics_unref ()void pango_font_metrics_unref (PangoFontMetrics *metrics); Decrease the reference count of a font metrics structure by one. If the result is zero, frees the structure and any associated memory.
pango_font_metrics_get_ascent ()int pango_font_metrics_get_ascent (PangoFontMetrics *metrics); Gets the ascent from a font metrics structure. The ascent is the distance from the baseline to the logical top of a line of text. (The logical top may be above or below the top of the actual drawn ink. It is necessary to lay out the text to figure where the ink will be.)
pango_font_metrics_get_descent ()int pango_font_metrics_get_descent (PangoFontMetrics *metrics); Gets the descent from a font metrics structure. The descent is the distance from the baseline to the logical bottom of a line of text. (The logical bottom may be above or below the bottom of the actual drawn ink. It is necessary to lay out the text to figure where the ink will be.)
pango_font_metrics_get_approximate_char_width ()int pango_font_metrics_get_approximate_char_width (PangoFontMetrics *metrics); Gets the approximate character width for a font metrics structure. This is merely a representative value useful, for example, for determining the initial size for a window. Actual characters in text will be wider and narrower than this.
pango_font_metrics_get_approximate_digit_width ()int pango_font_metrics_get_approximate_digit_width (PangoFontMetrics *metrics);
Gets the approximate digit width for a font metrics structure.
This is merely a representative value useful, for example, for
determining the initial size for a window. Actual digits in
text can be wider or narrower than this, though this value
is generally somewhat more accurate than the result of
pango_font_metrics_get_underline_thickness ()int pango_font_metrics_get_underline_thickness (PangoFontMetrics *metrics); Gets the suggested thickness to draw for the underline.
Since 1.6 pango_font_metrics_get_underline_position ()int pango_font_metrics_get_underline_position (PangoFontMetrics *metrics); Gets the suggested position to draw the underline. The value returned is the distance above the baseline of the top of the underline. Since most fonts have underline positions beneath the baseline, this value is typically negative.
Since 1.6 pango_font_metrics_get_strikethrough_thickness ()int pango_font_metrics_get_strikethrough_thickness (PangoFontMetrics *metrics); Gets the suggested thickness to draw for the strikethrough.
Since 1.6 pango_font_metrics_get_strikethrough_position ()int pango_font_metrics_get_strikethrough_position (PangoFontMetrics *metrics); Gets the suggested position to draw the strikethrough. The value returned is the distance above the baseline of the top of the strikethrough.
Since 1.6 PangoFonttypedef struct _PangoFont PangoFont;
The PangoFont structure is used to represent
a font in a rendering-system-independent matter.
To create an implementation of a PangoFont,
the rendering-system specific code should allocate
a larger structure that contains a nested
PangoFont, fill in the The PangoFont structure contains one member which the implementation fills in. PANGO_FONT()#define PANGO_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONT, PangoFont)) Casts a GObject to a PangoFont.
PANGO_IS_FONT()#define PANGO_IS_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONT))
Returns
pango_font_find_shaper ()PangoEngineShape* pango_font_find_shaper (PangoFont *font, PangoLanguage *language, guint32 ch); Finds the best matching shaper for a font for a particular language tag and character point.
pango_font_describe ()PangoFontDescription* pango_font_describe (PangoFont *font);
Returns a description of the font, with font size set in points.
Use
pango_font_describe_with_absolute_size ()PangoFontDescription* pango_font_describe_with_absolute_size (PangoFont *font);
Returns a description of the font, with absolute font size set
(in device units). Use
Since 1.14 pango_font_get_coverage ()PangoCoverage* pango_font_get_coverage (PangoFont *font, PangoLanguage *language); Computes the coverage map for a given font and language tag.
pango_font_get_glyph_extents ()void pango_font_get_glyph_extents (PangoFont *font, PangoGlyph glyph, PangoRectangle *ink_rect, PangoRectangle *logical_rect);
Gets the logical and ink extents of a glyph within a font. The
coordinate system for each rectangle has its origin at the
base line and horizontal origin of the character with increasing
coordinates extending to the right and down. The macros
If
pango_font_get_metrics ()PangoFontMetrics* pango_font_get_metrics (PangoFont *font, PangoLanguage *language); Gets overall metric information for a font. Since the metrics may be substantially different for different scripts, a language tag can be provided to indicate that the metrics should be retrieved that correspond to the script(s) used by that language.
If
pango_font_get_font_map ()PangoFontMap* pango_font_get_font_map (PangoFont *font); Gets the font map for which the font was created.
Note that the font maintains a weak reference
to the font map, so if all references to font map are dropped, the font
map will be finalized even if there are fonts created with the font
map that are still alive. In that case this function will return
Since 1.10 PangoFontFamilytypedef struct _PangoFontFamily PangoFontFamily; The PangoFontFamily structure is used to represent a family of related font faces. The faces in a family share a common design, but differ in slant, weight, width and other aspects. PANGO_TYPE_FONT_FAMILY#define PANGO_TYPE_FONT_FAMILY (pango_font_family_get_type ()) The GObject type for PangoFontFamily. PANGO_FONT_FAMILY()#define PANGO_FONT_FAMILY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONT_FAMILY, PangoFontFamily)) Casts a GObject to a PangoFontFamily.
PANGO_IS_FONT_FAMILY()#define PANGO_IS_FONT_FAMILY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONT_FAMILY))
Returns
pango_font_family_get_name ()const char* pango_font_family_get_name (PangoFontFamily *family); Gets the name of the family. The name is unique among all fonts for the font backend and can be used in a PangoFontDescription to specify that a face from this family is desired.
pango_font_family_is_monospace ()gboolean pango_font_family_is_monospace (PangoFontFamily *family);
A monospace font is a font designed for text display where the the
characters form a regular grid. For Western languages this would
mean that the advance width of all characters are the same, but
this categorization also includes Asian fonts which include
double-width characters: characters that occupy two grid cells.
The best way to find out the grid-cell size is to call
Since 1.4 pango_font_family_list_faces ()void pango_font_family_list_faces (PangoFontFamily *family, PangoFontFace ***faces, int *n_faces);
Lists the different font faces that make up
PangoFontFacetypedef struct _PangoFontFace PangoFontFace; The PangoFontFace structure is used to represent a group of fonts with the same family, slant, weight, width, but varying sizes. PANGO_TYPE_FONT_FACE#define PANGO_TYPE_FONT_FACE (pango_font_face_get_type ()) The GObject type for PangoFontFace. PANGO_FONT_FACE()#define PANGO_FONT_FACE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONT_FACE, PangoFontFace)) Casts a GObject to a PangoFontFace.
PANGO_IS_FONT_FACE()#define PANGO_IS_FONT_FACE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONT_FACE))
Returns
pango_font_face_get_face_name ()const char* pango_font_face_get_face_name (PangoFontFace *face); Gets a name representing the style of this face among the different faces in the PangoFontFamily for the face. This name is unique among all faces in the family and is suitable for displaying to users.
pango_font_face_list_sizes ()void pango_font_face_list_sizes (PangoFontFace *face, int **sizes, int *n_sizes);
List the available sizes for a font. This is only applicable to bitmap
fonts. For scalable fonts, stores
Since 1.4 pango_font_face_describe ()PangoFontDescription* pango_font_face_describe (PangoFontFace *face); Returns the family, style, variant, weight and stretch of a PangoFontFace. The size field of the resulting font description will be unset.
pango_font_face_is_synthesized ()gboolean pango_font_face_is_synthesized (PangoFontFace *face); Returns whether a PangoFontFace is synthesized by the underlying font rendering engine from another face, perhaps by shearing, emboldening, or lightening it.
Since 1.18 PangoFontMaptypedef struct _PangoFontMap PangoFontMap;
The PangoFontMap represents the set of fonts available for a
particular rendering system. This is a virtual object with
implementations being specific to particular rendering systems. To
create an implementation of a PangoFontMap, the rendering-system
specific code should allocate a larger structure that contains a nested
PangoFontMap, fill in the The PangoFontMap structure contains one member which the implementation fills in. PANGO_TYPE_FONT_MAP#define PANGO_TYPE_FONT_MAP (pango_font_map_get_type ()) The GObject type for PangoFontMap. PANGO_FONT_MAP()#define PANGO_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONT_MAP, PangoFontMap)) Casts a GObject to a PangoFontMap.
PANGO_IS_FONT_MAP()#define PANGO_IS_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONT_MAP))
Returns
PangoFontMapClasstypedef struct { GObjectClass parent_class; PangoFont * (*load_font) (PangoFontMap *fontmap, PangoContext *context, const PangoFontDescription *desc); void (*list_families) (PangoFontMap *fontmap, PangoFontFamily ***families, int *n_families); PangoFontset *(*load_fontset) (PangoFontMap *fontmap, PangoContext *context, const PangoFontDescription *desc, PangoLanguage *language); const char *shape_engine_type; } PangoFontMapClass; The PangoFontMapClass structure holds the virtual functions for a particular PangoFontMap implementation.
PANGO_FONT_MAP_CLASS()#define PANGO_FONT_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FONT_MAP, PangoFontMapClass)) Casts a GObject to a PangoFontMapClass.
PANGO_IS_FONT_MAP_CLASS()#define PANGO_IS_FONT_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FONT_MAP))
Returns
PANGO_FONT_MAP_GET_CLASS()#define PANGO_FONT_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FONT_MAP, PangoFontMapClass)) Returns the type of a PangoFontMap.
pango_font_map_create_context ()PangoContext* pango_font_map_create_context (PangoFontMap *fontmap);
Creates a PangoContext connected to
If you are using Pango as part of a higher-level system,
that system may have it's own way of create a PangoContext.
For instance, the GTK+ toolkit has, among others,
Since 1.22 pango_font_map_load_font ()PangoFont* pango_font_map_load_font (PangoFontMap *fontmap, PangoContext *context, const PangoFontDescription *desc);
Load the font in the fontmap that is the closest match for
pango_font_map_load_fontset ()PangoFontset* pango_font_map_load_fontset (PangoFontMap *fontmap, PangoContext *context, const PangoFontDescription *desc, PangoLanguage *language);
Load a set of fonts in the fontmap that can be used to render
a font matching
pango_font_map_list_families ()void pango_font_map_list_families (PangoFontMap *fontmap, PangoFontFamily ***families, int *n_families); List all families for a fontmap.
pango_font_map_get_shape_engine_type ()const char* pango_font_map_get_shape_engine_type (PangoFontMap *fontmap);
Returns the render ID for shape engines for this fontmap.
See the
Since 1.4 PangoFontsettypedef struct _PangoFontset PangoFontset; A PangoFontset represents a set of PangoFont to use when rendering text. It is the result of resolving a PangoFontDescription against a particular PangoContext. It has operations for finding the component font for a particular Unicode character, and for finding a composite set of metrics for the entire fontset. PANGO_TYPE_FONTSET#define PANGO_TYPE_FONTSET (pango_fontset_get_type ()) The GObject type for PangoFontset. PangoFontsetClasstypedef struct { GObjectClass parent_class; PangoFont * (*get_font) (PangoFontset *fontset, guint wc); PangoFontMetrics *(*get_metrics) (PangoFontset *fontset); PangoLanguage * (*get_language) (PangoFontset *fontset); void (*foreach) (PangoFontset *fontset, PangoFontsetForeachFunc func, gpointer data); } PangoFontsetClass; The PangoFontsetClass structure holds the virtual functions for a particular PangoFontset implementation.
pango_fontset_get_font ()PangoFont* pango_fontset_get_font (PangoFontset *fontset, guint wc);
Returns the font in the fontset that contains the best glyph for the
Unicode character
pango_fontset_get_metrics ()PangoFontMetrics* pango_fontset_get_metrics (PangoFontset *fontset); Get overall metric information for the fonts in the fontset.
PangoFontsetForeachFunc ()gboolean (*PangoFontsetForeachFunc) (PangoFontset *fontset, PangoFont *font, gpointer data);
A callback function used by
Since 1.4 pango_fontset_foreach ()void pango_fontset_foreach (PangoFontset *fontset, PangoFontsetForeachFunc func, gpointer data);
Iterates through all the fonts in a fontset, calling
Since 1.4 PangoFontsetSimpletypedef struct _PangoFontsetSimple PangoFontsetSimple; PangoFontsetSimple is a implementation of the abstract PangoFontset base class in terms of an array of fonts, which the creator provides when constructing the PangoFontsetSimple. PANGO_TYPE_FONTSET_SIMPLE#define PANGO_TYPE_FONTSET_SIMPLE (pango_fontset_simple_get_type ()) The GObject type for PangoFontsetSimple. pango_fontset_simple_new ()PangoFontsetSimple* pango_fontset_simple_new (PangoLanguage *language); Creates a new PangoFontsetSimple for the given language.
pango_fontset_simple_append ()void pango_fontset_simple_append (PangoFontsetSimple *fontset, PangoFont *font); Adds a font to the fontset.
pango_fontset_simple_size ()int pango_fontset_simple_size (PangoFontsetSimple *fontset); Returns the number of fonts in the fontset.
|