Details
struct PangoFontDescription
struct 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 PangoStyle
typedef enum {
PANGO_STYLE_NORMAL,
PANGO_STYLE_OBLIQUE,
PANGO_STYLE_ITALIC
} PangoStyle;
|
An enumeration specifying the various slant styles possible for a font.
PANGO_TYPE_STYLE
#define PANGO_TYPE_STYLE (pango_style_get_type())
|
The GObject type for PangoStyle.
enum PangoWeight
typedef enum {
PANGO_WEIGHT_ULTRALIGHT = 200,
PANGO_WEIGHT_LIGHT = 300,
PANGO_WEIGHT_NORMAL = 400,
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 PangoVariant
typedef 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 PangoStretch
typedef 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 PangoFontMask
typedef 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
} 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 ()
Creates a new font description structure with all fields unset.
pango_font_description_copy_static ()
Like pango_font_description_copy(), but only a shallow copy is made
of the family name and other allocated fields. The result can only
be used until desc is modififed or freed. This is meant to be used
when the copy is only needed temporarily.
pango_font_description_equal ()
Compares two font descriptions for equality.
pango_font_descriptions_free ()
Frees a list of font descriptions from pango_font_map_list_fonts()
pango_font_description_set_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 ()
Like pango_font_description_set_family(), except that no
copy of family is made. The caller must make sure that the
string passed in stays around until desc has been freed
or the name is set again. This function can be used if
family is a static string such as a C string literal, or
if desc is only needed temporarily.
pango_font_description_set_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_set_variant ()
Sets the variant field of a font description. The PangoVariant
can either be PANGO_VARIANT_NORMAL or PANGO_VARIANT_SMALL_CAPS.
pango_font_description_set_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_set_stretch ()
Sets the stretch field of a font description. The stretch field
specifies how narrow or wide the font should be.
pango_font_description_set_size ()
Sets the size field of a font description.
pango_font_description_get_set_fields ()
Determines which fields in a font description have been set.
pango_font_description_merge ()
Merges the fields that are set in desc_to_merge into the fields in
desc. If replace_existing is FALSE, only fields in desc that
are not already set are affected. If TRUE, then fields that are
already set will be replaced as well.
pango_font_description_merge_static ()
Like pango_font_description_merge(), but only a shallow copy is made
of the family name and other allocated fields. desc can only be
used until desc_to_merge is modified or freed. This is meant
to be used when the merged font description is only needed temporarily.
pango_font_description_better_match ()
Determines if the style attributes of new_match are a closer match
for desc than old_match, or if old_match is NULL, determines if
new_match is a match at all. Approximate matching is done for
weight and style; other attributes must match exactly.
pango_font_description_from_string ()
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, or stretch, and SIZE
is an decimal number (size in points). 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 NULL. If
STYLE-OPTIONS is missing, then all style options will be set to the
default values. If SIZE is missing, the size in the resulting font
description will be set to 0.
pango_font_description_to_string ()
Creates a string representation of a font description. See
pango_font_description_from_string() for a description of the
format of the string representation. The family list in the
string description will only have a terminating comma if the
last word of the list is a valid style option.
pango_font_description_to_filename ()
Creates a filename representation of a font description. The
filename is identical to the result from calling
pango_font_description_to_string(), but with underscores instead of
characters that are untypical in filenames, and in lower case only.
struct PangoFontMetrics
struct PangoFontMetrics
{
guint ref_count;
int ascent;
int descent;
int approximate_char_width;
int approximate_digit_width;
};
|
A PangoFontMetrics structure holds the overall metric information
for a font (possibly restricted to a script).
PANGO_TYPE_FONT_METRICS
#define PANGO_TYPE_FONT_METRICS (pango_font_metrics_get_type ())
|
The GObject type for PangoFontMetrics.
pango_font_metrics_ref ()
Increases the reference count of a font metrics structure.
pango_font_metrics_unref ()
Decreases the reference count of a font metrics structure. If
the result is zero, frees the structure and any associated
memory.
pango_font_metrics_get_ascent ()
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 ()
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 ()
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 ()
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 and narrower than this, though this value
is generally somewhat more accurate than the result of
pango_font_metrics_get_approximate_digit_width().
struct 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 malloc
a larger structure that contains a nested
PangoFont, fill in the klass member of
the nested PangoFont with a pointer to
a appropriate PangoFontClass, then call
pango_font_init() on the structure.
The PangoFont structure contains one member
which the implementation fills in:
PANGO_TYPE_FONT
#define PANGO_TYPE_FONT (pango_font_get_type ())
|
The GObject type for PangoFont.
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 TRUE if object is a PangoFont.
pango_font_find_shaper ()
Finds the best matching shaper for a font for a particular
language tag and character point.
pango_font_describe ()
Returns a description of the font.
pango_font_get_coverage ()
Computes the coverage map for a given font and language tag.
pango_font_get_glyph_extents ()
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 PANGO_ASCENT(),
PANGO_DESCENT(), PANGO_LBEARING(), and PANGO_RBEARING can be used to convert
from the extents rectangle to more traditional font metrics. The units
of the rectangles are in 1/PANGO_SCALE of a device unit.
pango_font_get_metrics ()
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.
struct 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 TRUE if object is a PangoFontFamily.
pango_font_family_get_name ()
G_CONST_RETURN 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_list_faces ()
void pango_font_family_list_faces (PangoFontFamily *family,
PangoFontFace ***faces,
int *n_faces); |
Lists the different font faces that make up family. The faces
in a family share a common design, but differ in slant, weight,
width and other aspects.
struct 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 TRUE if object is a PangoFontFace.
pango_font_face_get_face_name ()
G_CONST_RETURN 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_describe ()
Returns the family, style, variant, weight and stretch of
a PangoFontFace. The size field of the resulting font description
will be unset.
struct 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 malloc a larger structure that contains a nested
PangoFontMap, fill in the klass member of the nested PangoFontMap with a
pointer to a appropriate PangoFontMapClass, then call
pango_font_map_init() on the structure.
The PangoFont 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 TRUE if object is a PangoFontMap.
struct PangoFontMapClass
struct PangoFontMapClass
{
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);
/* Padding for future expansion */
void (*_pango_reserved1) (void);
void (*_pango_reserved2) (void);
void (*_pango_reserved3) (void);
void (*_pango_reserved4) (void);
};
|
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 TRUE if klass is a subtype of PangoFontMapClass.
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_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 desc.
pango_font_map_load_fontset ()
Load a set of fonts in the fontmap that can be used to render
a font matching desc.
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_TYPE_FONTSET
#define PANGO_TYPE_FONTSET (pango_fontset_get_type ())
|
The GObject type for PangoFontset.
struct PangoFontsetClass
struct PangoFontsetClass
{
GObjectClass parent_class;
PangoFont * (*get_font) (PangoFontset *fontset,
guint wc);
PangoFontMetrics *(*get_metrics) (PangoFontset *fontset);
PangoLanguage * (*get_language) (PangoFontset *fontset);
/* Padding for future expansion */
void (*_pango_reserved1) (void);
void (*_pango_reserved2) (void);
void (*_pango_reserved3) (void);
void (*_pango_reserved4) (void);
};
|
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 wc.
pango_fontset_get_metrics ()
Get overall metric information for the fonts in the fontset.
struct PangoFontsetSimple
struct 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.