summaryrefslogtreecommitdiff
path: root/pango/pango-font.h
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2013-09-27 14:36:51 -0400
committerBehdad Esfahbod <behdad@behdad.org>2013-09-27 14:36:51 -0400
commit6d08bcab0d2821365a2ffd955cbbb07270565664 (patch)
tree6bffdc716a62ea60c0db7ed08d7f5a0d205302f1 /pango/pango-font.h
parentbb5c4c8497157afddcb5ced7e16c5dad4e893a03 (diff)
downloadpango-6d08bcab0d2821365a2ffd955cbbb07270565664.tar.gz
Bug 685167 - migrate docs to no-tmpl flavour
Patch from Rafał Mużyło.
Diffstat (limited to 'pango/pango-font.h')
-rw-r--r--pango/pango-font.h234
1 files changed, 234 insertions, 0 deletions
diff --git a/pango/pango-font.h b/pango/pango-font.h
index eea27b4e..e4ed4e0f 100644
--- a/pango/pango-font.h
+++ b/pango/pango-font.h
@@ -29,7 +29,24 @@
G_BEGIN_DECLS
+/**
+ * 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.
+ */
typedef struct _PangoFontDescription PangoFontDescription;
+/**
+ * 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.
+ */
typedef struct _PangoFontMetrics PangoFontMetrics;
/**
@@ -46,11 +63,36 @@ typedef enum {
PANGO_STYLE_ITALIC
} PangoStyle;
+/**
+ * PangoVariant:
+ * @PANGO_VARIANT_NORMAL: A normal font.
+ * @PANGO_VARIANT_SMALL_CAPS: A font with the lower case characters
+ * replaced by smaller variants of the capital characters.
+ *
+ * An enumeration specifying capitalization variant of the font.
+ */
typedef enum {
PANGO_VARIANT_NORMAL,
PANGO_VARIANT_SMALL_CAPS
} PangoVariant;
+/**
+ * PangoWeight:
+ * @PANGO_WEIGHT_THIN: the thin weight (= 100; Since: 1.24)
+ * @PANGO_WEIGHT_ULTRALIGHT: the ultralight weight (= 200)
+ * @PANGO_WEIGHT_LIGHT: the light weight (= 300)
+ * @PANGO_WEIGHT_BOOK: the book weight (= 380; Since: 1.24)
+ * @PANGO_WEIGHT_NORMAL: the default weight (= 400)
+ * @PANGO_WEIGHT_MEDIUM: the normal weight (= 500; Since: 1.24)
+ * @PANGO_WEIGHT_SEMIBOLD: the semibold weight (= 600)
+ * @PANGO_WEIGHT_BOLD: the bold weight (= 700)
+ * @PANGO_WEIGHT_ULTRABOLD: the ultrabold weight (= 800)
+ * @PANGO_WEIGHT_HEAVY: the heavy weight (= 900)
+ * @PANGO_WEIGHT_ULTRAHEAVY: the ultraheavy weight (= 1000; Since: 1.24)
+ *
+ * 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:
+ */
typedef enum {
PANGO_WEIGHT_THIN = 100,
PANGO_WEIGHT_ULTRALIGHT = 200,
@@ -65,6 +107,21 @@ typedef enum {
PANGO_WEIGHT_ULTRAHEAVY = 1000
} PangoWeight;
+/**
+ * PangoStretch:
+ * @PANGO_STRETCH_ULTRA_CONDENSED: ultra condensed width
+ * @PANGO_STRETCH_EXTRA_CONDENSED: extra condensed width
+ * @PANGO_STRETCH_CONDENSED: condensed width
+ * @PANGO_STRETCH_SEMI_CONDENSED: semi condensed width
+ * @PANGO_STRETCH_NORMAL: the normal width
+ * @PANGO_STRETCH_SEMI_EXPANDED: semi expanded width
+ * @PANGO_STRETCH_EXPANDED: expanded width
+ * @PANGO_STRETCH_EXTRA_EXPANDED: extra expanded width
+ * @PANGO_STRETCH_ULTRA_EXPANDED: ultra expanded width
+ *
+ * An enumeration specifying the width of the font relative to other designs
+ * within a family.
+ */
typedef enum {
PANGO_STRETCH_ULTRA_CONDENSED,
PANGO_STRETCH_EXTRA_CONDENSED,
@@ -77,6 +134,19 @@ typedef enum {
PANGO_STRETCH_ULTRA_EXPANDED
} PangoStretch;
+/**
+ * PangoFontMask:
+ * @PANGO_FONT_MASK_FAMILY: the font family is specified.
+ * @PANGO_FONT_MASK_STYLE: the font style is specified.
+ * @PANGO_FONT_MASK_VARIANT: the font variant is specified.
+ * @PANGO_FONT_MASK_WEIGHT: the font weight is specified.
+ * @PANGO_FONT_MASK_STRETCH: the font stretch is specified.
+ * @PANGO_FONT_MASK_SIZE: the font size is specified.
+ * @PANGO_FONT_MASK_GRAVITY: the font gravity is specified (Since: 1.16.)
+ *
+ * The bits in a #PangoFontMask correspond to fields in a
+ * #PangoFontDescription that have been set.
+ */
typedef enum {
PANGO_FONT_MASK_FAMILY = 1 << 0,
PANGO_FONT_MASK_STYLE = 1 << 1,
@@ -88,6 +158,41 @@ typedef enum {
} PangoFontMask;
/* CSS scale factors (1.2 factor between each size) */
+/**
+ * PANGO_SCALE_XX_SMALL:
+ *
+ * The scale factor for three shrinking steps (1 / (1.2 * 1.2 * 1.2)).
+ */
+/**
+ * PANGO_SCALE_X_SMALL:
+ *
+ * The scale factor for two shrinking steps (1 / (1.2 * 1.2)).
+ */
+/**
+ * PANGO_SCALE_SMALL:
+ *
+ * The scale factor for one shrinking step (1 / 1.2).
+ */
+/**
+ * PANGO_SCALE_MEDIUM:
+ *
+ * The scale factor for normal size (1.0).
+ */
+/**
+ * PANGO_SCALE_LARGE:
+ *
+ * The scale factor for one magnification step (1.2).
+ */
+/**
+ * PANGO_SCALE_X_LARGE:
+ *
+ * The scale factor for two magnification steps (1.2 * 1.2).
+ */
+/**
+ * PANGO_SCALE_XX_LARGE:
+ *
+ * The scale factor for three magnification steps (1.2 * 1.2 * 1.2).
+ */
#define PANGO_SCALE_XX_SMALL ((double)0.5787037037037)
#define PANGO_SCALE_X_SMALL ((double)0.6444444444444)
#define PANGO_SCALE_SMALL ((double)0.8333333333333)
@@ -100,6 +205,11 @@ typedef enum {
* PangoFontDescription
*/
+/**
+ * PANGO_TYPE_FONT_DESCRIPTION:
+ *
+ * The #GObject type for #PangoFontDescription.
+ */
#define PANGO_TYPE_FONT_DESCRIPTION (pango_font_description_get_type ())
GType pango_font_description_get_type (void) G_GNUC_CONST;
@@ -163,6 +273,11 @@ char * pango_font_description_to_filename (const PangoFontDescrip
* PangoFontMetrics
*/
+/**
+ * PANGO_TYPE_FONT_METRICS:
+ *
+ * The #GObject type for #PangoFontMetrics.
+ */
#define PANGO_TYPE_FONT_METRICS (pango_font_metrics_get_type ())
GType pango_font_metrics_get_type (void) G_GNUC_CONST;
PangoFontMetrics *pango_font_metrics_ref (PangoFontMetrics *metrics);
@@ -200,6 +315,23 @@ struct _PangoFontMetrics
* PangoFontFamily
*/
+/**
+ * PANGO_TYPE_FONT_FAMILY:
+ *
+ * The #GObject type for #PangoFontFamily.
+ */
+/**
+ * PANGO_FONT_FAMILY:
+ * @object: a #GObject.
+ *
+ * Casts a #GObject to a #PangoFontFamily.
+ */
+/**
+ * PANGO_IS_FONT_FAMILY:
+ * @object: a #GObject.
+ *
+ * Returns: %TRUE if @object is a #PangoFontFamily.
+ */
#define PANGO_TYPE_FONT_FAMILY (pango_font_family_get_type ())
#define PANGO_FONT_FAMILY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONT_FAMILY, PangoFontFamily))
#define PANGO_IS_FONT_FAMILY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONT_FAMILY))
@@ -223,6 +355,14 @@ gboolean pango_font_family_is_monospace (PangoFontFamily *family) G_G
typedef struct _PangoFontFamilyClass PangoFontFamilyClass;
+
+/**
+ * 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.
+ */
struct _PangoFontFamily
{
GObject parent_instance;
@@ -254,6 +394,23 @@ struct _PangoFontFamilyClass
* PangoFontFace
*/
+/**
+ * PANGO_TYPE_FONT_FACE:
+ *
+ * The #GObject type for #PangoFontFace.
+ */
+/**
+ * PANGO_FONT_FACE:
+ * @object: a #GObject.
+ *
+ * Casts a #GObject to a #PangoFontFace.
+ */
+/**
+ * PANGO_IS_FONT_FACE:
+ * @object: a #GObject.
+ *
+ * Returns: %TRUE if @object is a #PangoFontFace.
+ */
#define PANGO_TYPE_FONT_FACE (pango_font_face_get_type ())
#define PANGO_FONT_FACE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONT_FACE, PangoFontFace))
#define PANGO_IS_FONT_FACE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONT_FACE))
@@ -275,6 +432,12 @@ gboolean pango_font_face_is_synthesized (PangoFontFace *face) G_GN
typedef struct _PangoFontFaceClass PangoFontFaceClass;
+/**
+ * PangoFontFace:
+ *
+ * The #PangoFontFace structure is used to represent a group of fonts with
+ * the same family, slant, weight, width, but varying sizes.
+ */
struct _PangoFontFace
{
GObject parent_instance;
@@ -306,6 +469,23 @@ struct _PangoFontFaceClass
* PangoFont
*/
+/**
+ * PANGO_TYPE_FONT:
+ *
+ * The #GObject type for #PangoFont.
+ */
+/**
+ * PANGO_FONT:
+ * @object: a #GObject.
+ *
+ * Casts a #GObject to a #PangoFont.
+ */
+/**
+ * PANGO_IS_FONT:
+ * @object: a #GObject.
+ *
+ * Returns: %TRUE if @object is a #PangoFont.
+ */
#define PANGO_TYPE_FONT (pango_font_get_type ())
#define PANGO_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONT, PangoFont))
#define PANGO_IS_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONT))
@@ -335,6 +515,22 @@ PangoFontMap *pango_font_get_font_map (PangoFont *font);
typedef struct _PangoFontClass PangoFontClass;
+/**
+ * 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 <structfield>klass</structfield> 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.
+ */
struct _PangoFont
{
GObject parent_instance;
@@ -375,6 +571,44 @@ struct _PangoFontClass
#endif /* PANGO_ENABLE_BACKEND */
+/**
+ * PANGO_GLYPH_EMPTY:
+ *
+ * The %PANGO_GLYPH_EMPTY macro represents a #PangoGlyph value that has a
+ * special meaning, which is a zero-width empty glyph. This is useful for
+ * example in shaper modules, to use as the glyph for various zero-width
+ * Unicode characters (those passing pango_is_zero_width()).
+ */
+/**
+ * PANGO_GLYPH_INVALID_INPUT:
+ *
+ * The %PANGO_GLYPH_INVALID_INPUT macro represents a #PangoGlyph value that has a
+ * special meaning of invalid input. #PangoLayout produces one such glyph
+ * per invalid input UTF-8 byte and such a glyph is rendered as a crossed
+ * box.
+ *
+ * Note that this value is defined such that it has the %PANGO_GLYPH_UNKNOWN_FLAG
+ * on.
+ *
+ * Since: 1.20
+ */
+/**
+ * PANGO_GLYPH_UNKNOWN_FLAG:
+ *
+ * The %PANGO_GLYPH_UNKNOWN_FLAG macro is a flag value that can be added to
+ * a #gunichar value of a valid Unicode character, to produce a #PangoGlyph
+ * value, representing an unknown-character glyph for the respective #gunichar.
+ */
+/**
+ * PANGO_GET_UNKNOWN_GLYPH:
+ * @wc: a Unicode character
+ *
+ * The way this unknown glyphs are rendered is backend specific. For example,
+ * a box with the hexadecimal Unicode code-point of the character written in it
+ * is what is done in the most common backends.
+ *
+ * Returns: a #PangoGlyph value that means no glyph was found for @wc.
+ */
#define PANGO_GLYPH_EMPTY ((PangoGlyph)0x0FFFFFFF)
#define PANGO_GLYPH_INVALID_INPUT ((PangoGlyph)0xFFFFFFFF)
#define PANGO_GLYPH_UNKNOWN_FLAG ((PangoGlyph)0x10000000)