Guile-GNOME: Pango

version 2.16.2, updated 9 December 2011

Owen Taylor Behdad Esfahbod many others

This manual is for (gnome pango) (version 2.16.2, updated 9 December 2011) Copyright 2001-2007 Owen Taylor, Behdad Esfahbod, many others

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation.

Short Contents

1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 Coverage Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 3 Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 4 Glyph Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5 Layout Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 6 Rendering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 7 PangoRenderer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 8 Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 9 Tab Stops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 10 Text Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 11 Undocumented . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Type Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Function Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

1 Overview

(gnome pango) wraps the Pango text rendering library for Guile. It is a part of Guile-GNOME.

Some example code would be really nice here; I don’t have any at the moment. So send something to the guile-gnome list and be famous on the interwebs!

See the documentation for (gnome gobject) for more information on Guile-GNOME.

2 Coverage Maps

Unicode character range coverage storage

2.1 Overview

It is often necessary in Pango to determine if a particular font can represent a particular character, and also how well it can represent that character. The <pango-coverage> is a data structure that is used to represent that information.

2.2 Usage

[Class] <pango-coverage>

Opaque pointer. This class defines no direct slots.

[Function] pango-coverage-new ⇒ (ret <pango-coverage>)
Create a new <pango-coverage>

ret  the newly allocated <pango-coverage>,  initialized to

‘PANGO_COVERAGE_NONE’ with a reference count of one, which

          should be freed with pango-coverage-unref.
[Function] pango-coverage-copy (self <pango-coverage>)
   ⇒ (ret <pango-coverage>)

Copy an existing <pango-coverage>. (This function may now be unnecessary since we refcount the structure. File a bug if you use it.)

coverage a <pango-coverage>

ret the newly allocated <pango-coverage>, with a reference count of one, which should be freed with pango-coverage-unref.

[Function] pango-coverage-get (self <pango-coverage>) (index int)
   ⇒ (ret <pango-coverage-level>)

Determine whether a particular index is covered by coverage

coverage a <pango-coverage>

index the index to check

ret the coverage level of coverage for character index.

[Function] pango-coverage-max (self <pango-coverage>)
   (other <pango-coverage>)

Set the coverage for each index in coverage to be the max (better) value of the current coverage for the index and the coverage for the corresponding index in other.

coverage a <pango-coverage>
other  another <pango-coverage>

[Function] pango-coverage-set (self <pango-coverage>) (index int)
   (level <pango-coverage-level>)

Modify a particular index within coverage

coverage a <pango-coverage>

index the index to modify level the new level for index

3 Fonts

Structures representing abstract fonts

3.1 Overview

Pango supports a flexible architecture where a particular rendering architecture can supply an implementation of fonts. The <pango-font> structure represents an abstract renderingsystem-independent font. Pango provides routines to list available fonts, and to load a font of a given description.

3.2 Usage

[Class] <pango-font-description>

Derives from <gboxed>. This class defines no direct slots.

[Class] <pango-font-metrics>

Derives from <gboxed>. This class defines no direct slots.

[Class] <pango-font>

Derives from <gobject>. This class defines no direct slots.

[Class] <pango-font-family>

Derives from <gobject>. This class defines no direct slots.

[Class] <pango-font-face>

Derives from <gobject>. This class defines no direct slots.

[Class] <pango-font-map>

Derives from <gobject>. This class defines no direct slots.

[Class] <pango-fontset>

Derives from <gobject>. This class defines no direct slots.

[Function] pango-font-description-new ⇒ (ret <pango-font-description>)

Creates a new font description structure with all fields unset.

ret the newly allocated <pango-font-description>, which should be freed

          using pango-font-description-free.

[Function] pango-font-description-copy (self <pango-font-description>)
   ⇒ (ret <pango-font-description>)
Make a copy of a <pango-font-description>.
desc  a <pango-font-description>

ret the newly allocated <pango-font-description>, which should be freed

          with pango-font-description-free.
[Function] pango-font-description-hash (self <pango-font-description>)
   ⇒ (ret unsigned-int)

Computes a hash of a <pango-font-description> structure suitable to be used, for example, as an argument to g-hash-table-new. The hash value is independent of desc->mask.

desc  a <pango-font-description>

ret the hash value.

[Function] pango-font-description-equal (self <pango-font-description>)
   (desc2 <pango-font-description>) ⇒ (ret bool)

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 ‘#f’.)

desc1  a <pango-font-description>
desc2  another <pango-font-description>

ret ‘#t’ if the two font descriptions are identical, ‘#f’ otherwise.

[Function] pango-font-description-set-family
   (self <pango-font-description>) (family mchars)

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 <pango-font-family>. In some uses of <pango-font-description>, it is also possible to use a comma separated list of family names for this field.

desc  a <pango-font-description>.

family a string representing the family name.

[Function] pango-font-description-get-family
   (self <pango-font-description>) ⇒ (ret mchars)

Gets the family name field of a font description. See pango-font-description-set-

family.
desc  a <pango-font-description>.

ret the family name field for the font description, or ‘#f’ if not previously set. This has the same life-time as the font description itself and should not be freed.

[Function] pango-font-description-set-style
   (self <pango-font-description>) (style <pango-style>)
Sets the style field of a <pango-font-description>. The <pango-style> enumer-

ation 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.

desc  a <pango-font-description>

style the style for the font description

[Function] pango-font-description-get-style
   (self <pango-font-description>) ⇒ (ret <pango-style>)
Gets the style field of a <pango-font-description>. See pango-font-description-
set-style.
desc  a <pango-font-description>

ret the style field for the font description. Use pango-font-description-get-set-fields to find out if the field was explicitly set or not.

[Function] pango-font-description-set-variant
   (self <pango-font-description>) (variant <pango-variant>)

Sets the variant field of a font description. The <pango-variant> can either be

‘PANGO_VARIANT_NORMAL’ or ‘PANGO_VARIANT_SMALL_CAPS’.
desc  a <pango-font-description>

variant the variant type for the font description.

[Function] pango-font-description-get-variant
   (self <pango-font-description>) ⇒ (ret <pango-variant>)
Gets the variant field of a <pango-font-description>. See pango-font-
description-set-variant.
desc  a <pango-font-description>.

ret the variant field for the font description. Use pango-font-description-get-set-fields to find out if the field was explicitly set or not.

[Function] pango-font-description-set-weight
   (self <pango-font-description>) (weight <pango-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 <pango-weight> enumeration, other intermediate numeric values are possible.

desc  a <pango-font-description>

weight the weight for the font description.

[Function] pango-font-description-get-weight
   (self <pango-font-description>) ⇒ (ret <pango-weight>)

Gets the weight field of a font description. See pango-font-description-set-

weight.
desc  a <pango-font-description>

ret the weight field for the font description. Use pango-font-description-get-set-fields to find out if the field was explicitly set or not.

[Function] pango-font-description-set-stretch
   (self <pango-font-description>) (stretch <pango-stretch>)

Sets the stretch field of a font description. The stretch field specifies how narrow or wide the font should be.

desc  a <pango-font-description>

stretch the stretch for the font description

[Function] pango-font-description-get-stretch
   (self <pango-font-description>) ⇒ (ret <pango-stretch>)

Gets the stretch field of a font description. See pango-font-description-set-

stretch.
desc  a <pango-font-description>.

ret the stretch field for the font description. Use pango-font-description-get-set-fields to find out if the field was explicitly set or not.

[Function] pango-font-description-set-size
   (self <pango-font-description>) (size int)

Sets the size field of a font description in fractional points. This is mutually exclusive

with pango-font-description-set-absolute-size.
desc  a <pango-font-description>

size the size of the font in points, scaled by PANGO SCALE. (That is, a size value of 10 * PANGO SCALE is a 10 point font. The conversion factor between points and device units depends on system configuration and the output device. For screen display, a logical DPI of 96 is common, in which case a 10 point font corresponds to a 10 * (96 / 72) = 13.3 pixel

          font. Use pango-font-description-set-absolute-size if you need a

particular size in device units.

[Function] pango-font-description-get-size
   (self <pango-font-description>) ⇒ (ret int)

Gets the size field of a font description. See pango-font-description-set-size.

desc  a <pango-font-description>

ret the size field for the font description in points or device units. You

          must call pango-font-description-get-size-is-absolute to find out

which is the case. Returns 0 if the size field has not previously been set or it has been set to 0 explicitly. Use pango-font-description-get-set-fields to find out if the field was explicitly set or not.

[Function] pango-font-description-unset-fields
   (self <pango-font-description>) (to unset <pango-font-mask>)

Unsets some of the fields in a <pango-font-description>. The unset fields will get back to their default values.

desc  a <pango-font-description>

to-unset bitmask of fields in the desc to unset.

[Function] pango-font-description-merge (self <pango-font-description>)

(desc to merge <pango-font-description>) (replace existing bool) Merges the fields that are set in desc-to-merge into the fields in desc. If replaceexisting is ‘#f’, only fields in desc that are not already set are affected. If ‘#t’, then fields that are already set will be replaced as well.

desc  a <pango-font-description>

desc-to-merge

          the <pango-font-description> to merge from

replace-existing if ‘#t’, replace fields in desc with the corresponding values from desc-to-merge, even if they are already exist.

[Function] pango-font-description-merge-static
   (self <pango-font-description>)

(desc to merge <pango-font-description>) (replace existing bool) 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.

desc  a <pango-font-description>

desc-to-merge

          the <pango-font-description> to merge from

replace-existing if ‘#t’, replace fields in desc with the corresponding values from desc-to-merge, even if they are already exist.

[Function] pango-font-description-better-match
   (self <pango-font-description>)
   (old match <pango-font-description>)
   (new match <pango-font-description>) ⇒ (ret bool)

Determines if the style attributes of new-match are a closer match for desc than oldmatch, or if old-match is ‘#f’, determines if new-match is a match at all. Approximate matching is done for weight and style; other attributes must match exactly.

desc  a <pango-font-description>
old-match a <pango-font-description>, or ‘#f’

new-match

          a <pango-font-description>

ret ‘#t’ if new-match is a better match

[Function] pango-font-description-to-string
   (self <pango-font-description>) ⇒ (ret mchars)

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.

desc  a <pango-font-description>

ret a new string that must be freed with g-free.

[Function] pango-font-description-to-filename
   (self <pango-font-description>) ⇒ (ret mchars)

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.

desc  a <pango-font-description>

ret a new string that must be freed with g-free.

[Function] pango-font-metrics-get-ascent (self <pango-font-metrics>)

⇒ (ret int) 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.)

metrics  a <pango-font-metrics> structure

ret the ascent, in Pango units. (1 point == ‘PANGO_SCALE’ Pango units.)

[Function] pango-font-metrics-get-descent (self <pango-font-metrics>)

⇒ (ret int) 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.)

metrics  a <pango-font-metrics> structure

ret the descent, in Pango units. (1 point == ‘PANGO_SCALE’ Pango units.)

[Function] pango-font-describe (self <pango-font>)
   ⇒ (ret <pango-font-description>)
[Method] describe

Returns a description of the font, with font size set in points. Use pango-font-describe-with-absolute-size if you want the font size in device units.

font  a <pango-font>

ret a newly-allocated <pango-font-description> object.

[Function] pango-font-get-coverage (self <pango-font>)
   (language <pango-language>) ⇒ (ret <pango-coverage>)
[Method] get-coverage

Computes the coverage map for a given font and language tag.

font  a <pango-font>

language the language tag

ret a newly-allocated <pango-coverage> object.

[Function] pango-font-get-glyph-extents (self <pango-font>)
   (glyph unsigned-int32) ⇒ (ink rect <pango-rectangle>)
   (logical rect <pango-rectangle>)
[Method] 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.

font  a <pango-font>

glyph the glyph index

ink-rect rectangle used to store the extents of the glyph as drawn or ‘#f’ to indicate that the result is not needed.

logical-rect rectangle used to store the logical extents of the glyph or ‘#f’ to indicate that the result is not needed.

[Function] pango-font-get-metrics (self <pango-font>)
   (language <pango-language>) ⇒ (ret <pango-font-metrics>)
[Method] 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.

font  a <pango-font>

language language tag used to determine which script to get the metrics for, or ‘#f’ to indicate to get the metrics for the entire font.

ret  a <pango-font-metrics> object. The caller must call pango-font-

metrics-unref when finished using the object.

[Function] pango-font-get-font-map (self <pango-font>)
   ⇒ (ret <pango-font-map>)
[Method] get-font-map

Gets the font map for which the font was created.

font  a <pango-font>

ret  the <pango-font-map> for the font

Since 1.10

[Function] pango-font-family-get-name (self <pango-font-family>)
   ⇒ (ret mchars)
[Method] get-name

Gets the name of the family. The name is unique among all fonts for the font backend and can be used in a <pango-font-description> to specify that a face from this family is desired.

family  a <pango-font-family>

ret the name of the family. This string is owned by the family object and must not be modified or freed.

[Function] pango-font-family-is-monospace (self <pango-font-family>)

⇒ (ret bool)

[Method] is-monospace

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. g-unichar-iswide returns a result that indicates whether a character is typically double-width in a monospace font. The best way to find out the grid-cell size is to call pango-font-metrics-

get-approximate-digit-width, since the results of pango-font-metrics-get-

approximate-char-width may be affected by double-width characters.

family  a <pango-font-family>

ret ‘#t’ if the family is monospace.

Since 1.4

[Function] pango-font-face-get-face-name (self <pango-font-face>)
   ⇒ (ret mchars)
[Method] get-face-name

Gets a name representing the style of this face among the different faces in the <pangofont-family> for the face. This name is unique among all faces in the family and is suitable for displaying to users.

face  a <pango-font-face>.

ret the face name for the face. This string is owned by the face object and must not be modified or freed.

[Function] pango-font-face-describe (self <pango-font-face>)
   ⇒ (ret <pango-font-description>)
[Method] describe

Returns the family, style, variant, weight and stretch of a <pango-font-face>. The size field of the resulting font description will be unset.

face  a <pango-font-face>

ret a newly-created <pango-font-description> structure holding the description of the face. Use pango-font-description-free to free the result.

[Function] pango-font-map-load-font (self <pango-font-map>)
   (context <pango-context>) (desc <pango-font-description>)
   ⇒ (ret <pango-font>)
[Method] load-font

Load the font in the fontmap that is the closest match for desc.

fontmap a <pango-font-map>

context the <pango-context> the font will be used with desc a <pango-font-description> describing the font to load ret the font loaded, or ‘#f’ if no font matched.

[Function] pango-font-map-load-fontset (self <pango-font-map>)
   (context <pango-context>) (desc <pango-font-description>)
   (language <pango-language>) ⇒ (ret <pango-fontset>)
[Method] load-fontset

Load a set of fonts in the fontmap that can be used to render a font matching desc.

fontmap a <pango-font-map>

context the <pango-context> the font will be used with desc a <pango-font-description> describing the font to load language a <pango-language> the fonts will be used for ret the fontset, or ‘#f’ if no font matched.

4 Glyph Storage

Structures for storing information about glyphs

4.1 Overview

pango-shape produces a string of glyphs which can be measured or drawn to the screen. The following structures are used to store information about glyphs.

4.2 Usage

[Class] <pango-matrix>

Derives from <gboxed>. This class defines no direct slots.

[Class] <pango-glyph-string>

Derives from <gboxed>. This class defines no direct slots.

[Function] pango-matrix-copy (self <pango-matrix>) ⇒ (ret <pango-matrix>)
Copies a <pango-matrix>.
matrix  a <pango-matrix>, can be ‘#f’

ret the newly allocated <pango-matrix>, which should be freed with pangomatrix-free, or ‘#f’ if matrix was ‘#f’.

Since 1.6

[Function] pango-matrix-translate (self <pango-matrix>) (tx double)
   (ty double)

Changes the transformation represented by matrix to be the transformation given by first translating by (tx, ty) then applying the original transformation.

matrix  a <pango-matrix>

tx amount to translate in the X direction

ty amount to translate in the Y direction

Since 1.6

[Function] pango-matrix-scale (self <pango-matrix>) (scale x double)

(scale y double) Changes the transformation represented by matrix to be the transformation given by first scaling by sx in the X direction and sy in the Y direction then applying the original transformation.

matrix  a <pango-matrix>

scale-x amount to scale by in X direction

scale-y amount to scale by in Y direction

Since 1.6

[Function] pango-matrix-rotate (self <pango-matrix>) (degrees double)

Changes the transformation represented by matrix to be the transformation given by first rotating by degrees degrees counter-clockwise then applying the original transformation.

matrix  a <pango-matrix>

degrees degrees to rotate counter-clockwise

Since 1.6

[Function] pango-matrix-concat (self <pango-matrix>)
   (new matrix <pango-matrix>)

Changes the transformation represented by matrix to be the transformation given by first applying transformation given by new-matrix then applying the original transformation.

matrix  a <pango-matrix>

new-matrix

          a <pango-matrix>

Since 1.6

[Function] pango-matrix-get-font-scale-factor (self <pango-matrix>)
   ⇒ (ret double)

Returns the scale factor of a matrix on the height of the font. That is, the scale factor in the direction perpendicular to the vector that the X coordinate is mapped to.

matrix  a <pango-matrix>, may be ‘#f’

ret the scale factor of matrix on the height of the font, or 1.0 if matrix is ‘#f’.

Since 1.12

[Function] pango-glyph-string-new ⇒ (ret <pango-glyph-string>)
Create a new <pango-glyph-string>.

ret the newly allocated <pango-glyph-string>, which should be freed with

          pango-glyph-string-free.
[Function] pango-glyph-string-copy (self <pango-glyph-string>)
   ⇒ (ret <pango-glyph-string>)

Copy a glyph string and associated storage.

string  a <pango-glyph-string>.

ret the newly allocated <pango-glyph-string>, which should be freed with

          pango-glyph-string-free.
[Function] pango-glyph-string-set-size (self <pango-glyph-string>)

(new len int) Resize a glyph string to the given length.

string  a <pango-glyph-string>.

new-len the new length of the string.

[Function] pango-glyph-string-extents (self <pango-glyph-string>)
   (font <pango-font>) ⇒ (ink rect <pango-rectangle>)
   (logical rect <pango-rectangle>)

Compute the logical and ink extents of a glyph string. See the documentation for pango-font-get-glyph-extents for details about the interpretation of the rectangles.

glyphs  a <pango-glyph-string>
font  a <pango-font>

ink-rect rectangle used to store the extents of the glyph string as drawn or ‘#f’ to indicate that the result is not needed.

logical-rect rectangle used to store the logical extents of the glyph string or ‘#f’ to indicate that the result is not needed.

[Function] pango-glyph-string-extents-range (self <pango-glyph-string>)
   (start int) (end int) (font <pango-font>)
   ⇒ (ink rect <pango-rectangle>) (logical rect <pango-rectangle>)

Computes the extents of a sub-portion of a glyph string. The extents are relative to the start of the glyph string range (the origin of their coordinate system is at the start of the range, not at the start of the entire glyph string).

glyphs  a <pango-glyph-string>

start start index

end end index (the range is the set of bytes with indices such that start <= index < end)

font  a <pango-font>

ink-rect rectangle used to store the extents of the glyph string range as drawn or ‘#f’ to indicate that the result is not needed.

logical-rect rectangle used to store the logical extents of the glyph string range or ‘#f’ to indicate that the result is not needed.

[Function] pango-glyph-string-get-width (self <pango-glyph-string>)

⇒ (ret int) Computes the logical width of the glyph string as can also be computed using pangoglyph-string-extents. However, since this only computes the width, it’s much faster. This is in fact only a convenience function that computes the sum of geometry.width for each glyph in the glyphs.

glyphs  a <pango-glyph-string>

ret the logical width of the glyph string.

Since 1.14

5 Layout Objects

High-level layout driver objects

5.1 Overview

While complete access to the layout capabilities of Pango is provided using the detailed interfaces for itemization and shaping, using that functionality directly involves writing a fairly large amount of code. The objects and functions in this section provide a high-level driver for formatting entire paragraphs of text at once.

5.2 Usage

[Class] <pango-layout>

Derives from <gobject>. This class defines no direct slots.

[Class] <pango-layout-iter>

Derives from <gboxed>. This class defines no direct slots.

[Class] <pango-layout-line>

Derives from <gboxed>. This class defines no direct slots.

[Function] pango-layout-new (context <pango-context>)
   ⇒ (ret <pango-layout>)

Create a new <pango-layout> object with attributes initialized to default values for

a particular <pango-context>.
context  a <pango-context>

ret the newly allocated <pango-layout>, with a reference count of one, which should be freed with g-object-unref.

[Function] pango-layout-copy (self <pango-layout>) ⇒ (ret <pango-layout>)

[Method] copy

Does a deep copy-by-value of the src layout. The attribute list, tab array, and text from the original layout are all copied by value.

src  a <pango-layout>

ret the newly allocated <pango-layout>, with a reference count of one, which should be freed with g-object-unref.

[Function] pango-layout-get-context (self <pango-layout>)
   ⇒ (ret <pango-context>)
[Method] get-context

Retrieves the <pango-context> used for this layout.

layout  a <pango-layout>

ret the <pango-context> for the layout. This does not have an additional refcount added, so if you want to keep a copy of this around, you must reference it yourself.

[Function] pango-layout-context-changed (self <pango-layout>)
[Method] context-changed

Forces recomputation of any state in the <pango-layout> that might depend on the layout’s context. This function should be called if you make changes to the context subsequent to creating the layout.

layout  a <pango-layout>
[Function] pango-layout-set-text (self <pango-layout>) (text mchars)

(length int)

[Method] set-text

Sets the text of the layout.

layout  a <pango-layout>

text a valid UTF-8 string

length maximum length of text, in bytes. -1 indicates that the string is nulterminated and the length should be calculated. The text will also be truncated on encountering a nul-termination even when length is positive.

[Function] pango-layout-get-text (self <pango-layout>) ⇒ (ret mchars)
[Method] get-text

Gets the text in the layout. The returned text should not be freed or modified.

layout  a <pango-layout>

ret the text in the layout.

[Function] pango-layout-set-markup (self <pango-layout>) (markup mchars)

(length int)

[Method] set-markup

Same as pango-layout-set-markup-with-accel, but the markup text isn’t scanned for accelerators.

layout  a <pango-layout>

markup marked-up text

length length of marked-up text in bytes, or -1 if markup is nul-terminated

[Function] pango-layout-set-markup-with-accel (self <pango-layout>)

(markup mchars) (length int) (accel marker unsigned-int32)

   ⇒ (accel char unsigned-int32)
[Method] set-markup-with-accel

Sets the layout text and attribute list from marked-up text (see markup format). Replaces the current text and attribute list. If accel-marker is nonzero, the given character will mark the character following it as an accelerator. For example, accel-marker might be an ampersand or underscore. All characters marked as an accelerator will receive a ‘PANGO_UNDERLINE_LOW’ attribute, and the first character so marked will be returned in accel-char. Two accel-marker characters following each other produce a single literal accel-marker character.

layout  a <pango-layout>

markup marked-up text (see markup format)

length length of marked-up text in bytes, or -1 if markup is nul-terminated

accel-marker marker for accelerators in the text

accel-char return location for first located accelerator, or ‘#f’

[Function] pango-layout-set-attributes (self <pango-layout>)
   (attrs <pango-attr-list>)
[Method] set-attributes

Sets the text attributes for a layout object.

layout  a <pango-layout>
attrs  a <pango-attr-list>
[Function] pango-layout-get-attributes (self <pango-layout>)
   ⇒ (ret <pango-attr-list>)
[Method] get-attributes

Gets the attribute list for the layout, if any.

layout  a <pango-layout>
ret  a <pango-attr-list>.
[Function] pango-layout-set-font-description (self <pango-layout>)
   (desc <pango-font-description>)
[Method] set-font-description

Sets the default font description for the layout. If no font description is set on the layout, the font description from the layout’s context is used.

layout  a <pango-layout>

desc the new <pango-font-description>, or ‘#f’ to unset the current font description

[Function] pango-layout-set-width (self <pango-layout>) (width int)
[Method] set-width

Sets the width to which the lines of the <pango-layout> should wrap.

layout  a <pango-layout>.

width the desired width in Pango units, or -1 to indicate that no wrapping should be performed.

[Function] pango-layout-get-width (self <pango-layout>) ⇒ (ret int)
[Method] get-width

Gets the width to which the lines of the <pango-layout> should wrap.

layout  a <pango-layout>

ret the width, or -1 if no width set.

[Function] pango-layout-set-wrap (self <pango-layout>)
   (wrap <pango-wrap-mode>)
[Method] set-wrap

Sets the wrap mode; the wrap mode only has effect if a width is set on the layout with pango-layout-set-width. To turn off wrapping, set the width to -1.

layout  a <pango-layout>

wrap the wrap mode

[Function] pango-layout-get-wrap (self <pango-layout>)
   ⇒ (ret <pango-wrap-mode>)
[Method] get-wrap

Gets the wrap mode for the layout.

layout  a <pango-layout>

ret active wrap mode.

[Function] pango-layout-set-ellipsize (self <pango-layout>)
   (ellipsize <pango-ellipsize-mode>)
[Method] set-ellipsize

Sets the type of ellipsization being performed for layout. Depending on the ellipsization mode ellipsize text is removed from the start, middle, or end of lines so they fit within the width of layout set with pango-layout-set-width. If the layout contains characters such as newlines that force it to be layed out in multiple lines, then each line is ellipsized separately.

layout  a <pango-layout>

ellipsize the new ellipsization mode for layout

Since 1.6

[Function] pango-layout-get-ellipsize (self <pango-layout>)
   ⇒ (ret <pango-ellipsize-mode>)
[Method] get-ellipsize

Gets the type of ellipsization being performed for layout. See pango-layout-set-

ellipsize
layout  a <pango-layout>

ret the current ellipsization mode for layout.

Since 1.6

[Function] pango-layout-set-indent (self <pango-layout>) (indent int)
[Method] set-indent

Sets the width in Pango units to indent each paragraph. A negative value of indent will produce a hanging indentation. That is, the first line will have the full width, and subsequent lines will be indented by the absolute value of indent.

layout  a <pango-layout>.

indent the amount by which to indent.

[Function] pango-layout-get-indent (self <pango-layout>) ⇒ (ret int)
[Method] get-indent

Gets the paragraph indent width in Pango units. A negative value indicates a hanging indentation.

layout  a <pango-layout>

ret the indent.

[Function] pango-layout-get-spacing (self <pango-layout>) ⇒ (ret int)
[Method] get-spacing

Gets the amount of spacing in <pango-glyph-unit> between the lines of the layout.

layout  a <pango-layout>

ret the spacing.

[Function] pango-layout-set-spacing (self <pango-layout>) (spacing int)
[Method] set-spacing

Sets the amount of spacing in <pango-glyph-unit> between the lines of the layout.

layout  a <pango-layout>.

spacing the amount of spacing

[Function] pango-layout-set-justify (self <pango-layout>) (justify bool)
[Method] set-justify

Sets whether each complete line should be stretched to fill the entire width of the layout. This stretching is typically done by adding whitespace, but for some scripts (such as Arabic), the justification may be done in more complex ways, like extending the characters. Note that as of Pango-1.16, this functionality is not yet implemented.

layout  a <pango-layout>

justify whether the lines in the layout should be justified.

[Function] pango-layout-get-justify (self <pango-layout>) ⇒ (ret bool)
[Method] get-justify

Gets whether each complete line should be stretched to fill the entire width of the layout.

layout  a <pango-layout>

ret the justify.

[Function] pango-layout-set-auto-dir (self <pango-layout>) (auto dir bool)
[Method] set-auto-dir

Sets whether to calculate the bidirectional base direction for the layout according to the contents of the layout; when this flag is on (the default), then paragraphs in layout that begin with strong right-to-left characters (Arabic and Hebrew principally), will have right-to-left layout, paragraphs with letters from other scripts will have left-to-right layout. Paragraphs with only neutral characters get their direction from the surrounding paragraphs. When ‘#f’, the choice between left-to-right and right-to-left layout is done according to the base direction of the layout’s <pango-context>. (See pango-context-set-

base-dir).

When the auto-computed direction of a paragraph differs from the base direction of the context, the interpretation of ‘PANGO_ALIGN_LEFT’ and ‘PANGO_ALIGN_RIGHT’ are swapped.

layout  a <pango-layout>

auto-dir if ‘#t’, compute the bidirectional base direction from the layout’s contents.

Since 1.4

[Function] pango-layout-get-auto-dir (self <pango-layout>) ⇒ (ret bool)
[Method] get-auto-dir

Gets whether to calculate the bidirectional base direction for the layout according to the contents of the layout. See pango-layout-set-auto-dir.

layout  a <pango-layout>

ret ‘#t’ if the bidirectional base direction is computed from the layout’s contents, ‘#f’ otherwise.

Since 1.4

[Function] pango-layout-set-alignment (self <pango-layout>)
   (alignment <pango-alignment>)
[Method] set-alignment

Sets the alignment for the layout: how partial lines are positioned within the horizontal space available.

layout  a <pango-layout>

alignment the alignment

[Function] pango-layout-get-alignment (self <pango-layout>)
   ⇒ (ret <pango-alignment>)
[Method] get-alignment

Gets the alignment for the layout: how partial lines are positioned within the horizontal space available.

layout  a <pango-layout>

ret the alignment.

[Function] pango-layout-set-tabs (self <pango-layout>)
   (tabs <pango-tab-array>)
[Method] set-tabs

Sets the tabs to use for layout, overriding the default tabs (by default, tabs are every 8 spaces). If tabs is ‘#f’, the default tabs are reinstated. tabs is copied into the layout; you must free your copy of tabs yourself.

layout  a <pango-layout>
tabs  a <pango-tab-array>
[Function] pango-layout-get-tabs (self <pango-layout>)
   ⇒ (ret <pango-tab-array>)
[Method] get-tabs

Gets the current <pango-tab-array> used by this layout. If no <pango-tab-array> has been set, then the default tabs are in use and ‘#f’ is returned. Default tabs are every 8 spaces. The return value should be freed with pango-tab-array-free.

layout  a <pango-layout>

ret a copy of the tabs for this layout, or ‘#f’.

[Function] pango-layout-index-to-pos (self <pango-layout>) (index int)
   ⇒ (pos <pango-rectangle>)
[Method] index-to-pos

Converts from an index within a <pango-layout> to the onscreen position corresponding to the grapheme at that index, which is represented as rectangle. Note that ‘pos->x’ is always the leading edge of the grapheme and ‘pos->x + pos->width’ the trailing edge of the grapheme. If the directionality of the grapheme is right-to-left, then ‘pos->width’ will be negative.

layout  a <pango-layout>

index byte index within layout

pos rectangle in which to store the position of the grapheme

[Function] pango-layout-index-to-line-x (self <pango-layout>) (index int)

(trailing bool) ⇒ (line int) (x pos int)

[Method] index-to-line-x

Converts from byte index within the layout to line and X position. (X position is measured from the left edge of the line)

layout  a <pango-layout>

index the byte index of a grapheme within the layout.

trailing an integer indicating the edge of the grapheme to retrieve the position of. If 0, the trailing edge of the grapheme, if > 0, the leading of the grapheme.

line location to store resulting line index. (which will between 0 and pango layout get line count(layout) - 1)

x-pos location to store resulting position within line (‘PANGO_SCALE’ units per device unit)

[Function] pango-layout-xy-to-index (self <pango-layout>) (x int) (y int)

⇒ (ret bool) (index int) (trailing int)

[Method] xy-to-index

Converts from X and Y position within a layout to the byte index to the character at that logical position. If the Y position is not inside the layout, the closest position is chosen (the position will be clamped inside the layout). If the X position is not within the layout, then the start or the end of the line is chosen as described for pango-layout-x-to-index. If either the X or Y positions were not inside the layout, then the function returns ‘#f’; on an exact hit, it returns ‘#t’.

layout  a <pango-layout>

x the X offset (in <pango-glyph-unit>) from the left edge of the layout.

y the Y offset (in <pango-glyph-unit>) from the top edge of the layout

index location to store calculated byte index

trailing location to store a integer indicating where in the grapheme the user clicked. It will either be zero, or the number of characters in the grapheme. 0 represents the trailing edge of the grapheme.

ret ‘#t’ if the coordinates were inside text, ‘#f’ otherwise.

[Function] pango-layout-get-cursor-pos (self <pango-layout>) (index int)
   ⇒ (strong pos <pango-rectangle>) (weak pos <pango-rectangle>)
[Method] get-cursor-pos

Given an index within a layout, determines the positions that of the strong and weak cursors if the insertion point is at that index. The position of each cursor is stored as a zero-width rectangle. The strong cursor location is the location where characters of the directionality equal to the base direction of the layout are inserted. The weak cursor location is the location where characters of the directionality opposite to the base direction of the layout are inserted.

layout  a <pango-layout>

index the byte index of the cursor

strong-pos location to store the strong cursor position (may be ‘#f’)

weak-pos location to store the weak cursor position (may be ‘#f’)

[Function] pango-layout-move-cursor-visually (self <pango-layout>)

(strong bool) (old index int) (old trailing int) (direction int)

⇒ (new index int) (new trailing int)

[Method] move-cursor-visually

Computes a new cursor position from an old position and a count of positions to move visually. If count is positive, then the new strong cursor position will be one position to the right of the old cursor position. If count is negative, then the new strong cursor position will be one position to the left of the old cursor position. In the presence of bidirection text, the correspondence between logical and visual order will depend on the direction of the current run, and there may be jumps when the cursor is moved off of the end of a run. Motion here is in cursor positions, not in characters, so a single call to pango-layout-move-cursor-visually may move the cursor over multiple characters when multiple characters combine to form a single grapheme.

layout  a <pango-layout>.

strong whether the moving cursor is the strong cursor or the weak cursor. The strong cursor is the cursor corresponding to text insertion in the base direction for the layout.

old-index the byte index of the grapheme for the old index

old-trailing if 0, the cursor was at the trailing edge of the grapheme indicated by old-index, if > 0, the cursor was at the leading edge.

direction direction to move cursor. A negative value indicates motion to the left.

new-index location to store the new cursor byte index. A value of -1 indicates that the cursor has been moved off the beginning of the layout. A value of ‘G_MAXINT’ indicates that the cursor has been moved off the end of the layout.

new-trailing number of characters to move forward from the location returned for new-index to get the position where the cursor should be displayed. This allows distinguishing the position at the beginning of one line from the position at the end of the preceding line. new-index is always on the line where the cursor should be displayed.

[Function] pango-layout-get-extents (self <pango-layout>)
   ⇒ (ink rect <pango-rectangle>) (logical rect <pango-rectangle>)
[Method] get-extents

Computes the logical and ink extents of layout. Logical extents are usually what you want for positioning things. Note that both extents may have non-zero x and y. You may want to use those to offset where you render the layout. Not doing that is a very typical bug that shows up as right-to-left layouts not being correctly positioned in a layout with a set width. The extents are given in layout coordinates and in Pango units; layout coordinates begin at the top left corner of the layout.

layout  a <pango-layout>

ink-rect rectangle used to store the extents of the layout as drawn or ‘#f’ to indicate that the result is not needed.

logical-rect rectangle used to store the logical extents of the layout or ‘#f’ to indicate that the result is not needed.

[Function] pango-layout-get-pixel-extents (self <pango-layout>)
   ⇒ (ink rect <pango-rectangle>) (logical rect <pango-rectangle>)
[Method] get-pixel-extents

Computes the logical and ink extents of layout in device units. See pango-layout-get-extents; this function just calls pango-layout-get-extents and then converts the extents to device units using the ‘PANGO_SCALE’ factor.

layout  a <pango-layout>

ink-rect rectangle used to store the extents of the layout as drawn or ‘#f’ to indicate that the result is not needed.

logical-rect rectangle used to store the logical extents of the layout or ‘#f’ to indicate that the result is not needed.

[Function] pango-layout-get-size (self <pango-layout>) ⇒ (width int)

(height int)

[Method] get-size

Determines the logical width and height of a <pango-layout> in Pango units. (device units scaled by ‘PANGO_SCALE’). This is simply a convenience function around pango-

layout-get-extents.
layout  a <pango-layout>

width location to store the logical width, or ‘#f’

height location to store the logical height, or ‘#f’

[Function] pango-layout-get-pixel-size (self <pango-layout>)

⇒ (width int) (height int)

[Method] get-pixel-size

Determines the logical width and height of a <pango-layout> in device units. (pangolayout-get-size returns the width and height scaled by ‘PANGO_SCALE’.) This is simply a convenience function around pango-layout-get-pixel-extents.

layout  a <pango-layout>

width location to store the logical width, or ‘#f’

height location to store the logical height, or ‘#f’

[Function] pango-layout-get-line-count (self <pango-layout>) ⇒ (ret int)
[Method] get-line-count

Retrieves the count of lines for the layout.

layout  <pango-layout>

ret the line count.

[Function] pango-layout-get-line (self <pango-layout>) (line int)
   ⇒ (ret <pango-layout-line>)
[Method] get-line

Retrieves a particular line from a <pango-layout>.

layout  a <pango-layout>

line the index of a line, which must be between 0 and ‘pango_layout_get_line_count(layout) - 1’, inclusive.

ret the requested <pango-layout-line>, or ‘#f’ if the index is out of range.

This layout line can be ref’ed and retained, but will become invalid if changes are made to the <pango-layout>.

[Function] pango-layout-get-lines (self <pango-layout>) ⇒ (ret gslist-of)
[Method] get-lines

Returns the lines of the layout as a list.

layout  a <pango-layout>

ret a <gs-list> containing the lines in the layout. This points to internal data of the <pango-layout> and must be used with care. It will become invalid on any change to the layout’s text or properties.

[Function] pango-layout-get-iter (self <pango-layout>)
   ⇒ (ret <pango-layout-iter>)
[Method] get-iter

Returns an iterator to iterate over the visual extents of the layout.

layout  a <pango-layout>

ret the new <pango-layout-iter> that should be freed using

          pango-layout-iter-free.
[Function] pango-layout-iter-next-run (self <pango-layout-iter>)

⇒ (ret bool) Moves iter forward to the next run in visual order. If iter was already at the end of the layout, returns ‘#f’.

iter  a <pango-layout-iter>

ret whether motion was possible.

[Function] pango-layout-iter-next-char (self <pango-layout-iter>)

⇒ (ret bool) Moves iter forward to the next character in visual order. If iter was already at the end of the layout, returns ‘#f’.

iter  a <pango-layout-iter>

ret whether motion was possible.

[Function] pango-layout-iter-next-cluster (self <pango-layout-iter>)

⇒ (ret bool) Moves iter forward to the next cluster in visual order. If iter was already at the end of the layout, returns ‘#f’.

iter  a <pango-layout-iter>

ret whether motion was possible.

[Function] pango-layout-iter-next-line (self <pango-layout-iter>)

⇒ (ret bool) Moves iter forward to the start of the next line. If iter is already on the last line, returns ‘#f’.

iter  a <pango-layout-iter>

ret whether motion was possible.

[Function] pango-layout-iter-at-last-line (self <pango-layout-iter>)

⇒ (ret bool) Determines whether iter is on the last line of the layout.

iter  a <pango-layout-iter>

ret ‘#t’ if iter is on the last line.

[Function] pango-layout-iter-get-index (self <pango-layout-iter>)

⇒ (ret int) Gets the current byte index. Note that iterating forward by char moves in visual order, not logical order, so indexes may not be sequential. Also, the index may be equal to the length of the text in the layout, if on the ‘#f’ run (see pango-layout-

iter-get-run).
iter  a <pango-layout-iter>

ret current byte index.

[Function] pango-layout-iter-get-baseline (self <pango-layout-iter>)

⇒ (ret int) Gets the Y position of the current line’s baseline, in layout coordinates (origin at top left of the entire layout).

iter  a <pango-layout-iter>

ret baseline of current line.

[Function] pango-layout-iter-get-line (self <pango-layout-iter>)
   ⇒ (ret <pango-layout-line>)

Gets the current line.

iter  a <pango-layout-iter>

ret the current line.

[Function] pango-layout-iter-get-char-extents (self <pango-layout-iter>)
   ⇒ (logical rect <pango-rectangle>)

Gets the extents of the current character, in layout coordinates (origin is the top left of the entire layout). Only logical extents can sensibly be obtained for characters; ink extents make sense only down to the level of clusters.

iter  a <pango-layout-iter>

logical-rect rectangle to fill with logical extents

[Function] pango-layout-iter-get-run-extents (self <pango-layout-iter>)
   ⇒ (ink rect <pango-rectangle>) (logical rect <pango-rectangle>)

Gets the extents of the current run in layout coordinates (origin is the top left of the entire layout).

iter  a <pango-layout-iter>

ink-rect rectangle to fill with ink extents, or ‘#f’ logical-rect

rectangle to fill with logical extents, or ‘#f’

[Function] pango-layout-iter-get-line-yrange (self <pango-layout-iter>)

⇒ (y0 int) (y1 int) Divides the vertical space in the <pango-layout> being iterated over between the lines in the layout, and returns the space belonging to the current line. A line’s range includes the line’s logical extents, plus half of the spacing above and below the line, if pango-layout-set-spacing has been called to set layout spacing. The Y positions are in layout coordinates (origin at top left of the entire layout).

iter  a <pango-layout-iter>

y0 start of line

y1 end of line

[Function] pango-layout-iter-get-line-extents (self <pango-layout-iter>)
   ⇒ (ink rect <pango-rectangle>) (logical rect <pango-rectangle>)

Obtains the extents of the current line. ink-rect or logical-rect can be NULL if you aren’t interested in them. Extents are in layout coordinates (origin is the top-left corner of the entire <pango-layout>). Thus the extents returned by this function will be the same width/height but not at the same x/y as the extents returned from

pango-layout-line-get-extents.
iter  a <pango-layout-iter>

ink-rect rectangle to fill with ink extents, or ‘#f’

logical-rect rectangle to fill with logical extents, or ‘#f’

[Function] pango-layout-line-get-extents (self <pango-layout-line>)
   ⇒ (ink rect <pango-rectangle>) (logical rect <pango-rectangle>)

Computes the logical and ink extents of a layout line. See pango-font-get-glyph-extents for details about the interpretation of the rectangles.

line  a <pango-layout-line>

ink-rect rectangle used to store the extents of the glyph string as drawn, or ‘#f’

logical-rect rectangle used to store the logical extents of the glyph string, or ‘#f’

[Function] pango-layout-line-get-pixel-extents
   (self <pango-layout-line>) ⇒ (ink rect <pango-rectangle>)
   (logical rect <pango-rectangle>)

Computes the logical and ink extents of a layout line. See pango-font-get-glyph-extents for details about the interpretation of the rectangles. The returned rectangles are in device units, as opposed to pango-layout-line-get-extents, which returns

the extents in <pango-glyph-unit>.

layout-line

          a <pango-layout-line>

ink-rect rectangle used to store the extents of the glyph string as drawn, or ‘#f’

logical-rect rectangle used to store the logical extents of the glyph string, or ‘#f’

[Function] pango-layout-line-index-to-x (self <pango-layout-line>)

(index int) (trailing bool) ⇒ (x pos int) Converts an index within a line to a X position.

line  a <pango-layout-line>

index byte offset of a grapheme within the layout

trailing an integer indicating the edge of the grapheme to retrieve the position of. If 0, the trailing edge of the grapheme, if > 0, the leading of the grapheme.

x-pos location to store the x offset (in <pango-glyph-unit>)

[Function] pango-layout-line-x-to-index (self <pango-layout-line>)

(x pos int) ⇒ (ret bool) (index int) (trailing int) Converts from x offset to the byte index of the corresponding character within the text of the layout. If x-pos is outside the line, index and trailing will point to the very first or very last position in the line. This determination is based on the resolved direction of the paragraph; for example, if the resolved direction is right-to-left, then an X position to the right of the line (after it) results in 0 being stored in index and trailing. An X position to the left of the line results in index pointing to the (logical) last grapheme in the line and trailing being set to the number of characters in that grapheme. The reverse is true for a left-to-right line.

line  a <pango-layout-line>

x-pos the X offset (in <pango-glyph-unit>) from the left edge of the line.

index location to store calculated byte index for the grapheme in which the user clicked.

trailing location to store a integer indicating where in the grapheme the user clicked. It will either be zero, or the number of characters in the grapheme. 0 represents the trailing edge of the grapheme.

ret ‘#f’ if x-pos was outside the line, ‘#t’ if inside

6 Rendering

Functions to run the rendering pipeline

6.1 Overview

The Pango rendering pipeline takes a string of Unicode characters and converts it into glyphs. The functions described in this section accomplish various steps of this process.

6.2 Usage

[Class] <pango-context>

Derives from <gobject>.

This class defines no direct slots.

[Class] <pango-item>

Derives from <gboxed>.

This class defines no direct slots.

[Function] pango-itemize (context <pango-context>) (text mchars)

(start index int) (length int) (attrs <pango-attr-list>)

   (cached iter <pango-attr-iterator>) ⇒ (ret glist-of)

Breaks a piece of text into segments with consistent directional level and shaping engine. Each byte of text will be contained in exactly one of the items in the returned list; the generated list of items will be in logical order (the start offsets of the items are ascending).

cached-iter should be an iterator over attrs currently positioned at a range before or containing start-index; cached-iter will be advanced to the range covering the position just after start-index + length. (i.e. if itemizing in a loop, just keep passing in the same cached-iter).

context a structure holding information that affects the itemization process.

text the text to itemize.

start-index first byte in text to process

length the number of bytes (not characters) to process after start-index. This must be >= 0.

attrs the set of attributes that apply to text.

cached-iter Cached attribute iterator, or ‘#f’

ret  a <g-list> of <pango-item> structures.

[Function] pango-itemize-with-base-dir (context <pango-context>)

(base dir <pango-direction>) (text mchars) (start index int) (length int)

   (attrs <pango-attr-list>) (cached iter <pango-attr-iterator>)
   ⇒ (ret glist-of)

Like pango-itemize, but the base direction to use when computing bidirectional levels (see pango-context-set-base-dir), is specified explicitly rather than gotten

from the <pango-context>.

context a structure holding information that affects the itemization process.

base-dir base direction to use for bidirectional processing

text the text to itemize.

start-index first byte in text to process

length the number of bytes (not characters) to process after start-index. This must be >= 0.

attrs the set of attributes that apply to text.

cached-iter Cached attribute iterator, or ‘#f’

ret  a <g-list> of <pango-item> structures.

Since 1.4

[Function] pango-item-copy (self <pango-item>) ⇒ (ret <pango-item>)

Copy an existing <pango-item> structure.

item  a <pango-item>

ret the newly allocated <pango-item>, which should be freed with pango-

          item-free.
[Function] pango-item-new ⇒ (ret <pango-item>)

Creates a new <pango-item> structure initialized to default values.

ret the newly allocated <pango-item>, which should be freed with pango-

          item-free.
[Function] pango-item-split (self <pango-item>) (split index int)

(split offset int) ⇒ (ret <pango-item>) Modifies orig to cover only the text after split-index, and returns a new item that covers the text before split-index that used to be in orig. You can think of split-index as the length of the returned item. split-index may not be 0, and it may not be greater than or equal to the length of orig (that is, there must be at least one byte assigned to each item, you can’t create a zero-length item). split-offset is the length of the first item in chars, and must be provided because the text used to generate the item isn’t available, so pango-item-split can’t count the char length of the split items itself.

orig  a <pango-item>

split-index byte index of position to split item, relative to the start of the item

split-offset number of chars between start of orig and split-index

ret new item representing text before split-index, which should be freed with

          pango-item-free.
[Function] pango-reorder-items (logical items glist-of) ⇒ (ret glist-of)

From a list of items in logical order and the associated directional levels, produce a list in visual order. The original list is unmodified.

logical-items

          a <g-list> of <pango-item> in logical order.

ret a <g-list> of <pango-item> structures in visual order. (Please open a bug if you use this function. It is not a particularly convenient interface, and the code is duplicated elsewhere in Pango for that reason.)

[Function] pango-context-get-font-map (self <pango-context>)
   ⇒ (ret <pango-font-map>)
[Method] get-font-map

Gets the <pango-fontmap> used to look up fonts for this context.

context  a <pango-context>

ret the font map for the <pango-context>. This value is owned by Pango and should not be unreferenced.

Since 1.6

[Function] pango-context-set-font-description (self <pango-context>)
   (desc <pango-font-description>)
[Method] set-font-description

Set the default font description for the context

context  a <pango-context>

desc the new pango font description

[Function] pango-context-get-language (self <pango-context>)
   ⇒ (ret <pango-language>)
[Method] get-language

Retrieves the global language tag for the context.

context  a <pango-context>

ret the global language tag.

[Function] pango-context-set-language (self <pango-context>)
   (language <pango-language>)
[Method] set-language

Sets the global language tag for the context.

context  a <pango-context>

language the new language tag.

[Function] pango-context-get-base-dir (self <pango-context>)
   ⇒ (ret <pango-direction>)
[Method] get-base-dir

Retrieves the base direction for the context. See pango-context-set-base-dir.

context  a <pango-context>

ret the base direction for the context.

[Function] pango-context-set-base-dir (self <pango-context>)
   (direction <pango-direction>)
[Method] set-base-dir

Sets the base direction for the context. The base direction is used in applying the Unicode bidirectional algorithm; if the

direction is ‘PANGO_DIRECTION_LTR’ or ‘PANGO_DIRECTION_RTL’, then the value will

be used as the paragraph direction in the Unicode bidirectional algorithm. A value

of ‘PANGO_DIRECTION_WEAK_LTR’ or ‘PANGO_DIRECTION_WEAK_RTL’ is used only for

paragraphs that do not contain any strong characters themselves.

context  a <pango-context>

direction the new base direction

[Function] pango-context-get-matrix (self <pango-context>)
   ⇒ (ret <pango-matrix>)
[Method] get-matrix

Gets the transformation matrix that will be applied when rendering with this context.

See pango-context-set-matrix.
context  a <pango-context>

ret the matrix, or ‘#f’ if no matrix has been set (which is the same as the identity matrix). The returned matrix is owned by Pango and must not be modified or freed.

Since 1.6

[Function] pango-context-set-matrix (self <pango-context>)
   (matrix <pango-matrix>)
[Method] set-matrix

Sets the transformation matrix that will be applied when rendering with this context. Note that reported metrics are in the user space coordinates before the application of the matrix, not device-space coordinates after the application of the matrix. So, they don’t scale with the matrix, though they may change slightly for different matrices, depending on how the text is fit to the pixel grid.

context  a <pango-context>

matrix a <pango-matrix>, or ‘#f’ to unset any existing matrix. (No matrix set is the same as setting the identity matrix.)

Since 1.6

[Function] pango-context-load-font (self <pango-context>)
   (desc <pango-font-description>) ⇒ (ret <pango-font>)
[Method] load-font

Loads the font in one of the fontmaps in the context that is the closest match for desc.

context  a <pango-context>

desc a <pango-font-description> describing the font to load

ret the font loaded, or ‘#f’ if no font matched.

[Function] pango-context-load-fontset (self <pango-context>)
   (desc <pango-font-description>) (language <pango-language>)
   ⇒ (ret <pango-fontset>)
[Method] load-fontset

Load a set of fonts in the context that can be used to render a font matching desc.

context  a <pango-context>

desc a <pango-font-description> describing the fonts to load

language a <pango-language> the fonts will be used for

ret the fontset, or ‘#f’ if no font matched.

[Function] pango-context-get-metrics (self <pango-context>)
   (desc <pango-font-description>) (language <pango-language>)
   ⇒ (ret <pango-font-metrics>)
[Method] get-metrics

Get overall metric information for a particular font description. 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. The <pango-font-description> is interpreted in the same way as by pangoitemize, and the family name may be a comma separated list of figures. If characters from multiple of these families would be used to render the string, then the returned fonts would be a composite of the metrics for the fonts loaded for the individual families.

context  a <pango-context>
desc  a <pango-font-description> structure

language language tag used to determine which script to get the metrics for. ‘#f’ means that the language tag from the context will be used. If no language tag is set on the context, metrics large enough to cover a range of languages will be returned. The process of determining such metrics is slow, so it is best to always make sure some real language tag will be used.

ret  a <pango-font-metrics> object. The caller must call pango-font-

metrics-unref when finished using the object.

[Function] pango-get-mirror-char (ch unsigned-int32) ⇒ (ret bool)
   (mirrored ch unsigned-int32)

‘pango_get_mirror_char’ is deprecated and should not be used in newly-written code. If ch has the Unicode mirrored property and there is another Unicode character that typically has a glyph that is the mirror image of ch’s glyph, puts that character in the address pointed to by mirrored-ch. Use g-unichar-get-mirror-char instead; the docs for that function provide full details.

ch a Unicode character

mirrored-ch location to store the mirrored character

ret ‘#t’ if ch has a mirrored character and mirrored-ch is filled in, ‘#f’ otherwise

[Function] pango-unichar-direction (ch unsigned-int32)
   ⇒ (ret <pango-direction>)

Determines the direction of a character; either ‘PANGO_DIRECTION_LTR’,

‘PANGO_DIRECTION_RTL’, or ‘PANGO_DIRECTION_NEUTRAL’.

ch a Unicode character

ret the direction of the character, as used in the Unicode bidirectional algorithm.

[Function] pango-find-base-dir (text mchars) (length int)
   ⇒ (ret <pango-direction>)

Searches a string the first character that has a strong direction, according to the Unicode bidirectional algorithm.

text the text to process

length length of text in bytes (may be -1 if text is nul-terminated)

ret The direction corresponding to the first strong character. If no such character is found, then ‘PANGO_DIRECTION_NEUTRAL’ is returned.

Since 1.4

[Function] pango-find-paragraph-boundary (text mchars) (length int)

⇒ (paragraph delimiter index int) (next paragraph start int) Locates a paragraph boundary in text. A boundary is caused by delimiter characters, such as a newline, carriage return, carriage return-newline pair, or Unicode paragraph separator character. The index of the run of delimiters is returned in paragraphdelimiter-index. The index of the start of the paragraph (index after all delimiters) is stored in next-paragraph-start. If no delimiters are found, both paragraph-delimiter-index and next-paragraph-start are filled with the length of text (an index one off the end).

text UTF-8 text length length of text in bytes, or -1 if nul-terminated paragraph-delimiter-index

return location for index of delimiter

next-paragraph-start return location for start of next paragraph

7 PangoRenderer

Rendering driver base class

7.1 Overview

<pango-renderer> is a base class that contains the necessary logic for rendering a <pango-

layout> or <pango-layout-line>. By subclassing <pango-renderer> and overriding op-

erations such as draw-glyphs and draw-rectangle, renderers for particular font backends and destinations can be created.

7.2 Usage

[Class] <pango-renderer>

Derives from <gobject>. This class defines no direct slots.

[Function] pango-renderer-draw-layout (self <pango-renderer>)
   (layout <pango-layout>) (x int) (y int)
[Method] draw-layout

Draws layout with the specified <pango-renderer>.

renderer a <pango-renderer>
layout  a <pango-layout>

x X position of left edge of baseline, in user space coordinates in Pango units.

y Y position of left edge of baseline, in user space coordinates in Pango units.

Since 1.8

[Function] pango-renderer-draw-layout-line (self <pango-renderer>)
   (line <pango-layout-line>) (x int) (y int)
[Method] draw-layout-line

Draws line with the specified <pango-renderer>.

renderer a <pango-renderer>
line  a <pango-layout-line>

x X position of left edge of baseline, in user space coordinates in Pango units.

y Y position of left edge of baseline, in user space coordinates in Pango units.

Since 1.8

[Function] pango-renderer-draw-glyphs (self <pango-renderer>)
   (font <pango-font>) (glyphs <pango-glyph-string>) (x int) (y int)
[Method] draw-glyphs

Draws the glyphs in glyphs with the specified <pango-renderer>.

renderer a <pango-renderer>
font  a <pango-font>
glyphs  a <pango-glyph-string>

x X position of left edge of baseline, in user space coordinates in Pango

units.

y Y position of left edge of baseline, in user space coordinates in Pango

units.

Since 1.8

[Function] pango-renderer-draw-rectangle (self <pango-renderer>)
   (part <pango-render-part>) (x int) (y int) (width int) (height int)
[Method] draw-rectangle

Draws an axis-aligned rectangle in user space coordinates with the specified <pango-

renderer>.

This should be called while renderer is already active. Use pango-renderer-activate to activate a renderer.

renderer a <pango-renderer>

part type of object this rectangle is part of x X position at which to draw rectangle, in user space coordinates in Pango

units

y Y position at which to draw rectangle, in user space coordinates in Pango

units

width width of rectangle in Pango units in user space coordinates height height of rectangle in Pango units in user space coordinates Since 1.8

[Function] pango-renderer-draw-error-underline (self <pango-renderer>)

(x int) (y int) (width int) (height int)

[Method] draw-error-underline

Draw a squiggly line that approximately covers the given rectangle in the style of an underline used to indicate a spelling error. (The width of the underline is rounded to an integer number of up/down segments and the resulting rectangle is centered in the original rectangle) This should be called while renderer is already active. Use pango-renderer-activate to activate a renderer.

renderer a <pango-renderer>

x X coordinate of underline, in Pango units in user coordinate system y Y coordinate of underline, in Pango units in user coordinate system width width of underline, in Pango units in user coordinate system height height of underline, in Pango units in user coordinate system Since 1.8

[Function] pango-renderer-draw-trapezoid (self <pango-renderer>)
   (part <pango-render-part>) (y1 double) (x11 double) (x21 double)
   (y2 double) (x12 double) (x22 double)
[Method] draw-trapezoid

Draws a trapezoid with the parallel sides aligned with the X axis using the given <pango-renderer>; coordinates are in device space.

renderer a <pango-renderer>

part type of object this trapezoid is part of

y1 Y coordinate of top of trapezoid

x11 X coordinate of left end of top of trapezoid

x21 X coordinate of right end of top of trapezoid

y2 Y coordinate of bottom of trapezoid

x12 X coordinate of left end of bottom of trapezoid

x22 X coordinate of right end of bottom of trapezoid

Since 1.8

[Function] pango-renderer-draw-glyph (self <pango-renderer>)
   (font <pango-font>) (glyph unsigned-int32) (x double) (y double)
[Method] draw-glyph

Draws a single glyph with coordinates in device space.

renderer a <pango-renderer>
font  a <pango-font>

glyph the glyph index of a single glyph

x X coordinate of left edge of baseline of glyph

y Y coordinate of left edge of baseline of glyph

Since 1.8

[Function] pango-renderer-activate (self <pango-renderer>)
[Method] activate

Does initial setup before rendering operations on renderer. pango-renderer-deactivate should be called when done drawing. Calls such as pango-renderer-draw-layout automatically activate the layout before drawing on it. Calls to

pango-renderer-activate and pango-renderer-deactivate can be nested and

the renderer will only be initialized and deinitialized once.

renderer a <pango-renderer>

Since 1.8

[Function] pango-renderer-deactivate (self <pango-renderer>)
[Method] deactivate

Cleans up after rendering operations on renderer. See docs for pango-renderer-

activate.

renderer a <pango-renderer>

Since 1.8

[Function] pango-renderer-part-changed (self <pango-renderer>)
   (part <pango-render-part>)
[Method] part-changed

Informs Pango that the way that the rendering is done for part has changed in a way that would prevent multiple pieces being joined together into one drawing call. For instance, if a subclass of <pango-renderer> was to add a stipple option for drawing underlines, it needs to call

     pango_renderer_part_changed (render, PANGO_RENDER_PART_UNDERLINE);

When the stipple changes or underlines with different stipples might be joined together. Pango automatically calls this for changes to colors. (See pango-renderer-

set-color)
renderer a <pango-renderer>

part the part for which rendering has changed.

Since 1.8

[Function] pango-renderer-set-color (self <pango-renderer>)
   (part <pango-render-part>) (color <pango-color>)
[Method] set-color

Sets the color for part of the rendering.

renderer a <pango-renderer>

part the part to change the color of

color the new color or ‘#f’ to unset the current color

Since 1.8

[Function] pango-renderer-get-color (self <pango-renderer>)
   (part <pango-render-part>) ⇒ (ret <pango-color>)
[Method] get-color

Gets the current rendering color for the specified part.

renderer a <pango-renderer>

part the part to get the color for

ret the color for the specified part, or ‘#f’ if it hasn’t been set and should be inherited from the environment.

Since 1.8

[Function] pango-renderer-set-matrix (self <pango-renderer>)
   (matrix <pango-matrix>)
[Method] set-matrix

Sets the transformation matrix that will be applied when rendering.

renderer a <pango-renderer>

matrix a <pango-matrix>, or ‘#f’ to unset any existing matrix. (No matrix set is the same as setting the identity matrix.)

Since 1.8

[Function] pango-renderer-get-matrix (self <pango-renderer>)
   ⇒ (ret <pango-matrix>)
[Method] get-matrix

Gets the transformation matrix that will be applied when rendering. See pango-

renderer-set-matrix.
renderer a <pango-renderer>

ret the matrix, or ‘#f’ if no matrix has been set (which is the same as the identity matrix). The returned matrix is owned by Pango and must not be modified or freed.

Since 1.8

8 Scripts

Identifying writing systems

8.1 Overview

The functions in this section are used to identify the writing system, or script of individual characters and of ranges within a larger text string.

8.2 Usage

[Class] <pango-script-iter>

Opaque pointer. This class defines no direct slots.

[Function] pango-script-for-unichar (ch unsigned-int32)
   ⇒ (ret <pango-script>)

Looks up the <pango-script> for a particular character (as defined by Unicode Standard Annex <24>). No check is made for ch being a valid Unicode character; if you pass in invalid character, the result is undefined.

ch a Unicode character

ret the <pango-script> for the character.

Since 1.4

[Function] pango-script-get-sample-language (script <pango-script>)
   ⇒ (ret <pango-language>)

Given a script, finds a language tag that is reasonably representative of that script. This will usually be the most widely spoken or used language written in that script: for instance, the sample language for ‘PANGO_SCRIPT_CYRILLIC’ is ‘ru’ (Russian), the sample language for ‘PANGO_SCRIPT_ARABIC’ is ‘ar’. For some scripts, no sample language will be returned because there is no language that is sufficiently representative. The best example of this is ‘PANGO_SCRIPT_HAN’, where various different variants of written Chinese, Japanese, and Korean all use significantly different sets of Han characters and forms of shared characters. No sample language can be provided for many historical scripts as well.

script  a <pango-script>

ret a <pango-language> that is representative of the script, or ‘#f’ if no such language exists.

Since 1.4

[Function] pango-language-includes-script (self <pango-language>)
   (script <pango-script>) ⇒ (ret bool)

Determines if script is one of the scripts used to write language. The returned value is conservative; if nothing is known about the language tag language, ‘#t’ will be returned, since, as far as Pango knows, script might be used to write language.

This routine is used in Pango’s itemization process when determining if a supplied language tag is relevant to a particular section of text. It probably is not useful for applications in most circumstances.

language a <pango-language>
script  a <pango-script>

ret ‘#t’ if script is one of the scripts used to write language, or if nothing is known about language.

Since 1.4

[Function] pango-script-iter-new (text mchars) (length int)
   ⇒ (ret <pango-script-iter>)

Create a new <pango-script-iter>, used to break a string of Unicode into runs by text. No copy is made of text, so the caller needs to make sure it remains valid until the iterator is freed with pango-script-iter-free.x

text a UTF-8 string

length length of text, or -1 if text is nul-terminated.

ret the new script iterator, initialized to point at the first range in the text, which should be freed with pango-script-iter-free. If the string is empty, it will point at an empty range.

Since 1.4

[Function] pango-script-iter-next (self <pango-script-iter>) ⇒ (ret bool)

Advances a <pango-script-iter> to the next range. If iter is already at the end, it is left unchanged and ‘#f’ is returned.

iter  a <pango-script-iter>

ret ‘#t’ if iter was successfully advanced.

Since 1.4

9 Tab Stops

Structures for storing tab stops

9.1 Overview

Functions in this section are used to deal with <pango-tab-array> objects that can be used to set tab stop positions in a <pango-layout>.

9.2 Usage

[Class] <pango-tab-array>

Derives from <gboxed>. This class defines no direct slots.

[Function] pango-tab-array-new (initial size int) (positions in pixels bool)

   ⇒ (ret <pango-tab-array>)

Creates an array of initial-size tab stops. Tab stops are specified in pixel units if positions-in-pixels is ‘#t’, otherwise in Pango units. All stops are initially at position 0.

initial-size Initial number of tab stops to allocate, can be 0

positions-in-pixels whether positions are in pixel units

ret the newly allocated <pango-tab-array>, which should be freed with

          pango-tab-array-free.
[Function] pango-tab-array-copy (self <pango-tab-array>)
   ⇒ (ret <pango-tab-array>)
Copies a <pango-tab-array>
src  <pango-tab-array> to copy

ret the newly allocated <pango-tab-array>, which should be freed with

          pango-tab-array-free.
[Function] pango-tab-array-get-size (self <pango-tab-array>) ⇒ (ret int)

Gets the number of tab stops in tab-array.

tab-array a <pango-tab-array>

ret the number of tab stops in the array.

[Function] pango-tab-array-resize (self <pango-tab-array>) (new size int)

Resizes a tab array. You must subsequently initialize any tabs that were added as a result of growing the array.

tab-array a <pango-tab-array>

new-size new size of the array

[Function] pango-tab-array-set-tab (self <pango-tab-array>) (tab index int)

(alignment <pango-tab-align>) (location int) Sets the alignment and location of a tab stop. alignment must always be <pangotab-left> in the current implementation.

tab-array a <pango-tab-array>

tab-index the index of a tab stop alignment tab alignment location tab location in Pango units

10 Text Attributes

Font and other attributes for annotating text

10.1 Overview

Attributed text is used in a number of places in Pango. It is used as the input to the itemization process and also when creating a <pango-layout>. The data types and functions in this section are used to represent and manipulate sets of attributes applied to a portion of text.

10.2 Usage

[Class] <pango-attribute>

Opaque pointer. This class defines no direct slots.

[Class] <pango-color>

Derives from <gboxed>. This class defines no direct slots.

[Class] <pango-language>

Derives from <gboxed>. This class defines no direct slots.

[Class] <pango-attr-list>

Derives from <gboxed>. This class defines no direct slots.

[Class] <pango-attr-iterator>

Opaque pointer. This class defines no direct slots.

[Function] pango-attr-type-register (name mchars)
   ⇒ (ret <pango-attr-type>)

Allocate a new attribute type ID.

name an identifier for the type (currently unused.)

ret the new type ID.

[Function] pango-attribute-copy (self <pango-attribute>)
   ⇒ (ret <pango-attribute>)

Make a copy of an attribute.

attr  a <pango-attribute>

ret the newly allocated <pango-attribute>, which should be freed with

          pango-attribute-destroy.

[Function] pango-attribute-equal (self <pango-attribute>)
   (attr2 <pango-attribute>) ⇒ (ret bool)

Compare two attributes for equality. This compares only the actual value of the two attributes and not the ranges that the attributes apply to.

attr1  a <pango-attribute>
attr2  another <pango-attribute>

ret ‘#t’ if the two attributes have the same value.

[Function] pango-attr-language-new (language <pango-language>)
   ⇒ (ret <pango-attribute>)

Create a new language tag attribute.

language language tag

ret the newly allocated <pango-attribute>, which should be freed with

          pango-attribute-destroy.
[Function] pango-attr-family-new (family mchars)
   ⇒ (ret <pango-attribute>)

Create a new font family attribute.

family the family or comma separated list of families

ret the newly allocated <pango-attribute>, which should be freed with

          pango-attribute-destroy.
[Function] pango-attr-style-new (style <pango-style>)
   ⇒ (ret <pango-attribute>)

Create a new font slant style attribute.

style the slant style

ret the newly allocated <pango-attribute>, which should be freed with

          pango-attribute-destroy.
[Function] pango-attr-variant-new (variant <pango-variant>)
   ⇒ (ret <pango-attribute>)

Create a new font variant attribute (normal or small caps)

variant the variant

ret the newly allocated <pango-attribute>, which should be freed with

          pango-attribute-destroy.
[Function] pango-attr-stretch-new (stretch <pango-stretch>)
   ⇒ (ret <pango-attribute>)

Create a new font stretch attribute

stretch the stretch

ret the newly allocated <pango-attribute>, which should be freed with

          pango-attribute-destroy.

[Function] pango-attr-weight-new (weight <pango-weight>)
   ⇒ (ret <pango-attribute>)

Create a new font weight attribute.

weight the weight

ret the newly allocated <pango-attribute>, which should be freed with

          pango-attribute-destroy.
[Function] pango-attr-size-new (size int) ⇒ (ret <pango-attribute>)

Create a new font-size attribute in fractional points.

size the font size, in ‘PANGO_SCALE’ths of a point.

ret the newly allocated <pango-attribute>, which should be freed with

          pango-attribute-destroy.
[Function] pango-attr-size-new-absolute (size int)
   ⇒ (ret <pango-attribute>)

Create a new font-size attribute in device units.

size the font size, in ‘PANGO_SCALE’ths of a device unit.

ret the newly allocated <pango-attribute>, which should be freed with

          pango-attribute-destroy.

Since 1.8

[Function] pango-attr-font-desc-new (desc <pango-font-description>)
   ⇒ (ret <pango-attribute>)

Create a new font description attribute. This attribute allows setting family, style, weight, variant, stretch, and size simultaneously.

desc the font description

ret the newly allocated <pango-attribute>, which should be freed with

          pango-attribute-destroy.
[Function] pango-attr-foreground-new (red unsigned-int16)
   (green unsigned-int16) (blue unsigned-int16)
   ⇒ (ret <pango-attribute>)

Create a new foreground color attribute.

red the red value (ranging from 0 to 65535)

green the green value

blue the blue value

ret the newly allocated <pango-attribute>, which should be freed with

          pango-attribute-destroy.
[Function] pango-attr-background-new (red unsigned-int16)
   (green unsigned-int16) (blue unsigned-int16)
   ⇒ (ret <pango-attribute>)

Create a new background color attribute. red the red value (ranging from 0 to 65535)

green the green value

blue the blue value

ret the newly allocated <pango-attribute>, which should be freed with

          pango-attribute-destroy.
[Function] pango-attr-strikethrough-new (strikethrough bool)
   ⇒ (ret <pango-attribute>)

Create a new strike-through attribute.

strikethrough ‘#t’ if the text should be struck-through.

ret the newly allocated <pango-attribute>, which should be freed with

          pango-attribute-destroy.
[Function] pango-attr-strikethrough-color-new (red unsigned-int16)
   (green unsigned-int16) (blue unsigned-int16)
   ⇒ (ret <pango-attribute>)

Create a new strikethrough color attribute. This attribute modifies the color of strikethrough lines. If not set, strikethrough lines will use the foreground color.

red the red value (ranging from 0 to 65535)

green the green value

blue the blue value

ret the newly allocated <pango-attribute>, which should be freed with

          pango-attribute-destroy.

Since 1.8

[Function] pango-attr-underline-new (underline <pango-underline>)
   ⇒ (ret <pango-attribute>)

Create a new underline-style attribute.

underline the underline style.

ret the newly allocated <pango-attribute>, which should be freed with

          pango-attribute-destroy.
[Function] pango-attr-underline-color-new (red unsigned-int16)
   (green unsigned-int16) (blue unsigned-int16)
   ⇒ (ret <pango-attribute>)

Create a new underline color attribute. This attribute modifies the color of underlines. If not set, underlines will use the foreground color.

red the red value (ranging from 0 to 65535)

green the green value

blue the blue value ret the newly allocated <pango-attribute>, which should be freed with

          pango-attribute-destroy.

Since 1.8

[Function] pango-attr-shape-new (ink rect <pango-rectangle>)
   (logical rect <pango-rectangle>) ⇒ (ret <pango-attribute>)

Create a new shape attribute. A shape is used to impose a particular ink and logical rectangle on the result of shaping a particular glyph. This might be used, for instance, for embedding a picture or a widget inside a <pango-layout>.

ink-rect ink rectangle to assign to each character

logical-rect logical rectangle to assign to each character

ret the newly allocated <pango-attribute>, which should be freed with

          pango-attribute-destroy.
[Function] pango-attr-scale-new (scale factor double)
   ⇒ (ret <pango-attribute>)

Create a new font size scale attribute. The base font for the affected text will have its size multiplied by scale-factor.

scale-factor factor to scale the font

ret the newly allocated <pango-attribute>, which should be freed with

          pango-attribute-destroy.
[Function] pango-attr-fallback-new (enable fallback bool)
   ⇒ (ret <pango-attribute>)

Create a new font fallback attribute. If fallback is disabled, characters will only be used from the closest matching font on the system. No fallback will be done to other fonts on the system that might contain the characters in the text.

enable-fallback ‘#t’ if we should fall back on other fonts for characters the active font is missing.

ret the newly allocated <pango-attribute>, which should be freed with

          pango-attribute-destroy.

Since 1.4

[Function] pango-attr-rise-new (rise int) ⇒ (ret <pango-attribute>)

Create a new baseline displacement attribute.

rise the amount that the text should be displaced vertically, in Pango units. Positive values displace the text upwards.

ret the newly allocated <pango-attribute>, which should be freed with

          pango-attribute-destroy.

[Function] pango-attr-letter-spacing-new (letter spacing int)
   ⇒ (ret <pango-attribute>)

Create a new letter-spacing attribute.

letter-spacing amount of extra space to add between graphemes of the text, in Pango units.

ret the newly allocated <pango-attribute>, which should be freed with

          pango-attribute-destroy.

Since 1.6

[Function] pango-color-parse (self <pango-color>) (spec mchars) ⇒ (ret bool)

Fill in the fields of a color from a string specification. The string can either one of a large set of standard names. (Taken from the X11 ‘rgb.txt’ file), or it can be a hex value in the form ’&#x0023;rgb’ ’&#x0023;rrggbb’ ’&#x0023;rrrgggbbb’ or ’&#x0023;rrrrggggbbbb’ where ’r’, ’g’ and ’b’ are hex digits of the red, green, and blue components of the color, respectively. (White in the four forms is ’&#x0023;fff’ ’&#x0023;ffffff’ ’&#x0023;fffffffff’ and ’&#x0023;ffffffffffff’)

color a <pango-color> structure in which to store the result

spec a string specifying the new color

ret ‘#t’ if parsing of the specifier succeeded, otherwise false.

[Function] pango-color-copy (self <pango-color>) ⇒ (ret <pango-color>)

Creates a copy of src, which should be freed with pango-color-free. Primarily used by language bindings, not that useful otherwise (since colors can just be copied by assignment in C).

src color to copy

ret the newly allocated <pango-color>, which should be freed with pango-

          color-free.
[Function] pango-language-from-string (language mchars)
   ⇒ (ret <pango-language>)

Take a RFC-3066 format language tag as a string and convert it to a <pangolanguage> pointer that can be efficiently copied (copy the pointer) and compared with other language tags (compare the pointer.) This function first canonicalizes the string by converting it to lowercase, mapping ’ ’ to ’-’, and stripping all characters other than letters and ’-’.

language a string representing a language tag

ret an opaque pointer to a <pango-language> structure. this will be valid forever after.

[Function] pango-language-matches (self <pango-language>)

(range list mchars) ⇒ (ret bool) Checks if a language tag matches one of the elements in a list of language ranges. A language tag is considered to match a range in the list if the range is ’*’, the range is exactly the tag, or the range is a prefix of the tag, and the character after it in the tag is ’-’.

language a language tag (see pango-language-from-string), ‘#f’ is allowed and matches nothing but ’*’

range-list a list of language ranges, separated by ’;’, ’:’, ’,’, or space characters. Each element must either be ’*’, or a RFC 3066 language range canonicalized

          as by pango-language-from-string

ret ‘#t’ if a match was found.

[Function] pango-attr-list-new ⇒ (ret <pango-attr-list>)

Create a new empty attribute list with a reference count of one.

ret the newly allocated <pango-attr-list>, which should be freed with

          pango-attr-list-unref.
[Function] pango-attr-list-copy (self <pango-attr-list>)
   ⇒ (ret <pango-attr-list>)

Copy list and return an identical new list.

list  a <pango-attr-list>

ret the newly allocated <pango-attr-list>, with a reference count of one, which should be freed with pango-attr-list-unref.

[Function] pango-attr-list-insert (self <pango-attr-list>)
   (attr <pango-attribute>)

Insert the given attribute into the <pango-attr-list>. It will be inserted after all other attributes with a matching start-index.

list  a <pango-attr-list>

attr the attribute to insert. Ownership of this value is assumed by the list.

[Function] pango-attr-list-insert-before (self <pango-attr-list>)
   (attr <pango-attribute>)

Insert the given attribute into the <pango-attr-list>. It will be inserted before all other attributes with a matching start-index.

list  a <pango-attr-list>

attr the attribute to insert. Ownership of this value is assumed by the list.

[Function] pango-attr-list-change (self <pango-attr-list>)
   (attr <pango-attribute>)

Insert the given attribute into the <pango-attr-list>. It will replace any attributes of the same type on that segment and be merged with any adjoining attributes that are identical. This function is slower than pango-attr-list-insert for creating a attribute list in order (potentially much slower for large lists). However, pango-attr-list-insert is not suitable for continually changing a set of attributes since it never removes or combines existing attributes.

list  a <pango-attr-list>

attr the attribute to insert. Ownership of this value is assumed by the list.

[Function] pango-attr-list-splice (self <pango-attr-list>)
   (other <pango-attr-list>) (pos int) (len int)

This function opens up a hole in list, fills it in with attributes from the left, and then merges other on top of the hole. This operation is equivalent to stretching every attribute that applies at position pos in list by an amount len, and then calling pango-attr-list-change with a copy of each attribute in other in sequence (offset in position by pos). This operation proves useful for, for instance, inserting a pre-edit string in the middle of an edit buffer.

list  a <pango-attr-list>
other  another <pango-attr-list>

pos the position in list at which to insert other

len the length of the spliced segment. (Note that this must be specified since the attributes in other may only be present at some subsection of this range)

[Function] pango-attr-list-get-iterator (self <pango-attr-list>)
   ⇒ (ret <pango-attr-iterator>)

Create a iterator initialized to the beginning of the list. list must not be modified until this iterator is freed.

list  a <pango-attr-list>

ret the newly allocated <pango-attr-iterator>, which should be freed with

          pango-attr-iterator-destroy.
[Function] pango-attr-iterator-copy (self <pango-attr-iterator>)
   ⇒ (ret <pango-attr-iterator>)
Copy a <pango-attr-iterator>
iterator a <pango-attr-iterator>.

ret the newly allocated <pango-attr-iterator>, which should be freed with

          pango-attr-iterator-destroy.
[Function] pango-attr-iterator-next (self <pango-attr-iterator>)

⇒ (ret bool) Advance the iterator until the next change of style.

iterator a <pango-attr-iterator>

ret ‘#f’ if the iterator is at the end of the list, otherwise ‘#t’

[Function] pango-attr-iterator-range (self <pango-attr-iterator>)

⇒ (start int) (end int) Get the range of the current segment. Note that the stored return values are signed, not unsigned like the values in <pango-attribute>. To deal with this API oversight, stored return values that wouldn’t fit into a signed integer are clamped to ‘G_MAXINT’.

iterator a <pango-attr-iterator>

start location to store the start of the range end location to store the end of the range

[Function] pango-attr-iterator-get (self <pango-attr-iterator>)
   (type <pango-attr-type>) ⇒ (ret <pango-attribute>)

Find the current attribute of a particular type at the iterator location. When multiple attributes of the same type overlap, the attribute whose range starts closest to the current location is used.

iterator a <pango-attr-iterator>

type the type of attribute to find. ret the current attribute of the given type, or ‘#f’ if no attribute of that type

applies to the current location.

[Function] pango-attr-iterator-get-attrs (self <pango-attr-iterator>)
   ⇒ (ret gslist-of)

Gets a list of all attributes at the current position of the iterator.

iterator a <pango-attr-iterator>

ret a list of all attributes for the current range. To free this value, call pango-

          attribute-destroy on each value and g-slist-free on the list.

Since 1.2

11 Undocumented

The following symbols, if any, have not been properly documented.

11.1 (gnome gw pango)

[Variable] pango-context-get-font-description
[Variable] pango-font-describe-with-absolute-size
[Variable] pango-font-description-copy-static
[Variable] pango-font-description-from-string
[Variable] pango-font-description-get-set-fields
[Variable] pango-font-description-get-size-is-absolute
[Variable] pango-font-description-set-absolute-size
[Variable] pango-font-description-set-family-static
[Variable] pango-font-metrics-get-approximate-char-width
[Variable] pango-font-metrics-get-approximate-digit-width
[Variable] pango-font-metrics-get-strikethrough-position
[Variable] pango-font-metrics-get-strikethrough-thickness
[Variable] pango-font-metrics-get-underline-position
[Variable] pango-font-metrics-get-underline-thickness
[Function] pango-glyph-string-get-logical-widths
[Variable] pango-layout-get-font-description
[Variable] pango-layout-get-single-paragraph-mode
[Function] pango-layout-iter-get-cluster-extents
[Function] pango-layout-iter-get-layout-extents
[Variable] pango-layout-set-single-paragraph-mode
[Variable] pango-tab-array-get-positions-in-pixels

Type Index 56

Type Index

<pango-attr-iterator> . . . . . . . . . . . . . . . . . . . . . . . 46 <pango-attr-list>. . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 <pango-attribute>. . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 <pango-color> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 <pango-context> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 <pango-coverage> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

<pango-font-description>. . . . . . . . . . . . . . . . . . . . . 4

<pango-font-face>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 <pango-font-family> . . . . . . . . . . . . . . . . . . . . . . . . . . 4 <pango-font-map> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 <pango-font-metrics> . . . . . . . . . . . . . . . . . . . . . . . . . 4 <pango-font> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

<pango-fontset> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
<pango-glyph-string> . . . . . . . . . . . . . . . . . . . . . . . . 13
<pango-item> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
<pango-language>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
<pango-layout-iter> . . . . . . . . . . . . . . . . . . . . . . . . . 16
<pango-layout-line> . . . . . . . . . . . . . . . . . . . . . . . . . 16
<pango-layout> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
<pango-matrix> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
<pango-renderer>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
<pango-script-iter> . . . . . . . . . . . . . . . . . . . . . . . . . 42
<pango-tab-array>. . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

Function Index 57

Function Index

A

activate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

C

context-changed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

D

deactivate. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 describe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9, 11 draw-error-underline . . . . . . . . . . . . . . . . . . . . . . . . 38 draw-glyph. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 draw-glyphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 draw-layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 draw-layout-line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 draw-rectangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 draw-trapezoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

G

get-alignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 get-attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 get-auto-dir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 get-base-dir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 get-color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 get-context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 get-coverage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 get-cursor-pos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 get-ellipsize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 get-extents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 get-face-name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 get-font-map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10, 32 get-glyph-extents. . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 get-indent. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 get-iter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 get-justify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 get-language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 get-line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 get-line-count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 get-lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 get-matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33, 41 get-metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10, 34 get-name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 get-pixel-extents. . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 get-pixel-size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 get-size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 get-spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 get-tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 get-text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 get-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 get-wrap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

I

index-to-line-x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 index-to-pos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 is-monospace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

L

load-font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 34 load-fontset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 34

M

move-cursor-visually . . . . . . . . . . . . . . . . . . . . . . . . 23

P

pango-attr-background-new . . . . . . . . . . . . . . . . . . 48
pango-attr-fallback-new. . . . . . . . . . . . . . . . . . . . . 50

pango-attr-family-new . . . . . . . . . . . . . . . . . . . . . . . 47

pango-attr-font-desc-new . . . . . . . . . . . . . . . . . . . 48
pango-attr-foreground-new . . . . . . . . . . . . . . . . . . 48
pango-attr-iterator-copy . . . . . . . . . . . . . . . . . . . 53
pango-attr-iterator-get. . . . . . . . . . . . . . . . . . . . . 54
pango-attr-iterator-get-attrs . . . . . . . . . . . . . . 54
pango-attr-iterator-next . . . . . . . . . . . . . . . . . . . 53
pango-attr-iterator-range . . . . . . . . . . . . . . . . . . 53
pango-attr-language-new. . . . . . . . . . . . . . . . . . . . . 47
pango-attr-letter-spacing-new . . . . . . . . . . . . . . 51

pango-attr-list-change . . . . . . . . . . . . . . . . . . . . . . 52 pango-attr-list-copy . . . . . . . . . . . . . . . . . . . . . . . . 52

pango-attr-list-get-iterator . . . . . . . . . . . . . . . 53

pango-attr-list-insert . . . . . . . . . . . . . . . . . . . . . . 52

pango-attr-list-insert-before . . . . . . . . . . . . . . 52

pango-attr-list-new . . . . . . . . . . . . . . . . . . . . . . . . . 52 pango-attr-list-splice . . . . . . . . . . . . . . . . . . . . . . 53 pango-attr-rise-new . . . . . . . . . . . . . . . . . . . . . . . . . 50 pango-attr-scale-new . . . . . . . . . . . . . . . . . . . . . . . . 50 pango-attr-shape-new . . . . . . . . . . . . . . . . . . . . . . . . 50 pango-attr-size-new . . . . . . . . . . . . . . . . . . . . . . . . . 48

pango-attr-size-new-absolute . . . . . . . . . . . . . . . 48

pango-attr-stretch-new . . . . . . . . . . . . . . . . . . . . . . 47

pango-attr-strikethrough-color-new . . . . . . . . 49
pango-attr-strikethrough-new . . . . . . . . . . . . . . . 49

pango-attr-style-new . . . . . . . . . . . . . . . . . . . . . . . . 47

pango-attr-type-register . . . . . . . . . . . . . . . . . . . 46
pango-attr-underline-color-new. . . . . . . . . . . . . 49
pango-attr-underline-new . . . . . . . . . . . . . . . . . . . 49

pango-attr-variant-new . . . . . . . . . . . . . . . . . . . . . . 47 pango-attr-weight-new . . . . . . . . . . . . . . . . . . . . . . . 48 pango-attribute-copy . . . . . . . . . . . . . . . . . . . . . . . . 46 pango-attribute-equal . . . . . . . . . . . . . . . . . . . . . . . 47 pango-color-copy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 pango-color-parse. . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

pango-context-get-base-dir . . . . . . . . . . . . . . . . . 33

pango-context-get-font-map . . . . . . . . . . . . . . . . . 32
pango-context-get-language . . . . . . . . . . . . . . . . . 32
pango-context-get-matrix . . . . . . . . . . . . . . . . . . . 33
pango-context-get-metrics . . . . . . . . . . . . . . . . . . 34
pango-context-load-font. . . . . . . . . . . . . . . . . . . . . 34
pango-context-load-fontset . . . . . . . . . . . . . . . . . 34
pango-context-set-base-dir . . . . . . . . . . . . . . . . . 33
pango-context-set-font-description . . . . . . . . 32
pango-context-set-language . . . . . . . . . . . . . . . . . 32
pango-context-set-matrix . . . . . . . . . . . . . . . . . . . 33

pango-coverage-copy . . . . . . . . . . . . . . . . . . . . . . . . . . 2 pango-coverage-get . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 pango-coverage-max . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 pango-coverage-new . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 pango-coverage-set . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 pango-find-base-dir . . . . . . . . . . . . . . . . . . . . . . . . . 35

pango-find-paragraph-boundary . . . . . . . . . . . . . . 35

pango-font-describe . . . . . . . . . . . . . . . . . . . . . . . . . . 9

pango-font-description-better-match . . . . . . . . 8
pango-font-description-copy . . . . . . . . . . . . . . . . . 5
pango-font-description-equal . . . . . . . . . . . . . . . . 5
pango-font-description-get-family . . . . . . . . . . 5
pango-font-description-get-size. . . . . . . . . . . . . 7
pango-font-description-get-stretch . . . . . . . . . 7
pango-font-description-get-style . . . . . . . . . . . 6
pango-font-description-get-variant . . . . . . . . . 6
pango-font-description-get-weight . . . . . . . . . . 7
pango-font-description-hash . . . . . . . . . . . . . . . . . 5
pango-font-description-merge . . . . . . . . . . . . . . . . 8
pango-font-description-merge-static . . . . . . . . 8
pango-font-description-new . . . . . . . . . . . . . . . . . . 4
pango-font-description-set-family . . . . . . . . . . 5
pango-font-description-set-size. . . . . . . . . . . . . 7
pango-font-description-set-stretch . . . . . . . . . 7
pango-font-description-set-style . . . . . . . . . . . 6
pango-font-description-set-variant . . . . . . . . . 6
pango-font-description-set-weight . . . . . . . . . . 6
pango-font-description-to-filename . . . . . . . . . 9
pango-font-description-to-string . . . . . . . . . . . 9
pango-font-description-unset-fields . . . . . . . . 8
pango-font-face-describe . . . . . . . . . . . . . . . . . . . 11
pango-font-face-get-face-name . . . . . . . . . . . . . . 11
pango-font-family-get-name . . . . . . . . . . . . . . . . . 11
pango-font-family-is-monospace. . . . . . . . . . . . . 11
pango-font-get-coverage. . . . . . . . . . . . . . . . . . . . . 10
pango-font-get-font-map. . . . . . . . . . . . . . . . . . . . . 10
pango-font-get-glyph-extents . . . . . . . . . . . . . . . 10

pango-font-get-metrics . . . . . . . . . . . . . . . . . . . . . . 10

pango-font-map-load-font . . . . . . . . . . . . . . . . . . . 12
pango-font-map-load-fontset . . . . . . . . . . . . . . . . 12
pango-font-metrics-get-ascent . . . . . . . . . . . . . . . 9
pango-font-metrics-get-descent. . . . . . . . . . . . . . 9

pango-get-mirror-char . . . . . . . . . . . . . . . . . . . . . . . 35

pango-glyph-string-copy. . . . . . . . . . . . . . . . . . . . . 14
pango-glyph-string-extents . . . . . . . . . . . . . . . . . 15
pango-glyph-string-extents-range . . . . . . . . . . 15
pango-glyph-string-get-logical-widths. . . . . 55
pango-glyph-string-get-width . . . . . . . . . . . . . . . 15

pango-glyph-string-new . . . . . . . . . . . . . . . . . . . . . . 14

                                                pango-glyph-string-set-size . . . . . . . . . . . . . . . . 14

pango-item-copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 pango-item-new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 pango-item-split. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 pango-itemize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

                                                pango-itemize-with-base-dir . . . . . . . . . . . . . . . . 31
                                                pango-language-from-string . . . . . . . . . . . . . . . . . 51
                                                pango-language-includes-script. . . . . . . . . . . . . 42

pango-language-matches . . . . . . . . . . . . . . . . . . . . . . 51

                                                pango-layout-context-changed . . . . . . . . . . . . . . . 17

pango-layout-copy. . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

                                                pango-layout-get-alignment . . . . . . . . . . . . . . . . . 21
                                                pango-layout-get-attributes . . . . . . . . . . . . . . . . 18
                                                pango-layout-get-auto-dir . . . . . . . . . . . . . . . . . . 21
                                                pango-layout-get-context . . . . . . . . . . . . . . . . . . . 16
                                                pango-layout-get-cursor-pos . . . . . . . . . . . . . . . . 23
                                                pango-layout-get-ellipsize . . . . . . . . . . . . . . . . . 19
                                                pango-layout-get-extents . . . . . . . . . . . . . . . . . . . 24
                                                pango-layout-get-indent. . . . . . . . . . . . . . . . . . . . . 20

pango-layout-get-iter . . . . . . . . . . . . . . . . . . . . . . . 26

                                                pango-layout-get-justify . . . . . . . . . . . . . . . . . . . 20

pango-layout-get-line . . . . . . . . . . . . . . . . . . . . . . . 25

                                                pango-layout-get-line-count . . . . . . . . . . . . . . . . 25

pango-layout-get-lines . . . . . . . . . . . . . . . . . . . . . . 26

                                                pango-layout-get-pixel-extents. . . . . . . . . . . . . 24
                                                pango-layout-get-pixel-size . . . . . . . . . . . . . . . . 25

pango-layout-get-size . . . . . . . . . . . . . . . . . . . . . . . 25

                                                pango-layout-get-spacing . . . . . . . . . . . . . . . . . . . 20

pango-layout-get-tabs . . . . . . . . . . . . . . . . . . . . . . . 22 pango-layout-get-text . . . . . . . . . . . . . . . . . . . . . . . 17 pango-layout-get-width . . . . . . . . . . . . . . . . . . . . . . 18 pango-layout-get-wrap . . . . . . . . . . . . . . . . . . . . . . . 19

                                                pango-layout-index-to-line-x . . . . . . . . . . . . . . . 22
                                                pango-layout-index-to-pos . . . . . . . . . . . . . . . . . . 22
                                                pango-layout-iter-at-last-line. . . . . . . . . . . . . 27
                                                pango-layout-iter-get-baseline. . . . . . . . . . . . . 27
                                                pango-layout-iter-get-char-extents . . . . . . . . 27
                                                pango-layout-iter-get-cluster-extents. . . . . 55
                                                pango-layout-iter-get-index . . . . . . . . . . . . . . . . 27
                                                pango-layout-iter-get-layout-extents. . . . . . 55
                                                pango-layout-iter-get-line . . . . . . . . . . . . . . . . . 27
                                                pango-layout-iter-get-line-extents . . . . . . . . 28
                                                pango-layout-iter-get-line-yrange . . . . . . . . . 28
                                                pango-layout-iter-get-run-extents . . . . . . . . . 27
                                                pango-layout-iter-next-char . . . . . . . . . . . . . . . . 26
                                                pango-layout-iter-next-cluster. . . . . . . . . . . . . 26
                                                pango-layout-iter-next-line . . . . . . . . . . . . . . . . 26
                                                pango-layout-iter-next-run . . . . . . . . . . . . . . . . . 26
                                                pango-layout-line-get-extents . . . . . . . . . . . . . . 28
                                                pango-layout-line-get-pixel-extents . . . . . . . 28
                                                pango-layout-line-index-to-x . . . . . . . . . . . . . . . 29
                                                pango-layout-line-x-to-index . . . . . . . . . . . . . . . 29
                                                pango-layout-move-cursor-visually . . . . . . . . . 23

pango-layout-new. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

                                                pango-layout-set-alignment . . . . . . . . . . . . . . . . . 21
                                                pango-layout-set-attributes . . . . . . . . . . . . . . . . 18
                                                pango-layout-set-auto-dir . . . . . . . . . . . . . . . . . . 20

pango-layout-set-ellipsize . . . . . . . . . . . . . . . . . 19
pango-layout-set-font-description . . . . . . . . . 18
pango-layout-set-indent. . . . . . . . . . . . . . . . . . . . . 19
pango-layout-set-justify . . . . . . . . . . . . . . . . . . . 20
pango-layout-set-markup. . . . . . . . . . . . . . . . . . . . . 17
pango-layout-set-markup-with-accel . . . . . . . . 17
pango-layout-set-spacing . . . . . . . . . . . . . . . . . . . 20

pango-layout-set-tabs . . . . . . . . . . . . . . . . . . . . . . . 21 pango-layout-set-text . . . . . . . . . . . . . . . . . . . . . . . 17 pango-layout-set-width . . . . . . . . . . . . . . . . . . . . . . 18 pango-layout-set-wrap . . . . . . . . . . . . . . . . . . . . . . . 19

pango-layout-xy-to-index . . . . . . . . . . . . . . . . . . . 22

pango-matrix-concat . . . . . . . . . . . . . . . . . . . . . . . . . 14 pango-matrix-copy. . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

pango-matrix-get-font-scale-factor . . . . . . . . 14

pango-matrix-rotate . . . . . . . . . . . . . . . . . . . . . . . . . 14 pango-matrix-scale . . . . . . . . . . . . . . . . . . . . . . . . . . 13 pango-matrix-translate . . . . . . . . . . . . . . . . . . . . . . 13

pango-renderer-activate. . . . . . . . . . . . . . . . . . . . . 39
pango-renderer-deactivate . . . . . . . . . . . . . . . . . . 39
pango-renderer-draw-error-underline . . . . . . . 38
pango-renderer-draw-glyph . . . . . . . . . . . . . . . . . . 39
pango-renderer-draw-glyphs . . . . . . . . . . . . . . . . . 37
pango-renderer-draw-layout . . . . . . . . . . . . . . . . . 37
pango-renderer-draw-layout-line . . . . . . . . . . . 37
pango-renderer-draw-rectangle . . . . . . . . . . . . . . 38
pango-renderer-draw-trapezoid . . . . . . . . . . . . . . 39
pango-renderer-get-color . . . . . . . . . . . . . . . . . . . 40
pango-renderer-get-matrix . . . . . . . . . . . . . . . . . . 41
pango-renderer-part-changed . . . . . . . . . . . . . . . . 40
pango-renderer-set-color . . . . . . . . . . . . . . . . . . . 40
pango-renderer-set-matrix . . . . . . . . . . . . . . . . . . 40

pango-reorder-items . . . . . . . . . . . . . . . . . . . . . . . . . 32

pango-script-for-unichar . . . . . . . . . . . . . . . . . . . 42
pango-script-get-sample-language . . . . . . . . . . 42

pango-script-iter-new . . . . . . . . . . . . . . . . . . . . . . . 43 pango-script-iter-next . . . . . . . . . . . . . . . . . . . . . . 43 pango-tab-array-copy . . . . . . . . . . . . . . . . . . . . . . . . 44

                                                pango-tab-array-get-size . . . . . . . . . . . . . . . . . . . 44

pango-tab-array-new . . . . . . . . . . . . . . . . . . . . . . . . . 44 pango-tab-array-resize . . . . . . . . . . . . . . . . . . . . . . 44

                                                pango-tab-array-set-tab. . . . . . . . . . . . . . . . . . . . . 45
                                                pango-unichar-direction. . . . . . . . . . . . . . . . . . . . . 35

part-changed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

S

set-alignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 set-attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 set-auto-dir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 set-base-dir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 set-color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 set-ellipsize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 set-font-description . . . . . . . . . . . . . . . . . . . . 18, 32 set-indent. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 set-justify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 set-language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 set-markup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 set-markup-with-accel . . . . . . . . . . . . . . . . . . . . . . . 17 set-matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33, 40 set-spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 set-tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 set-text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 set-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 set-wrap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

X

xy-to-index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22