Up: cl-cffi-gtk API documentation
Package pango
Pango is a text layout and shaping library. Pango facilitates the
layout and shaping of multi-language text. Full-function rendering of text
and cross-platform support is had when Pango is used with platform APIs or
3rd party libraries, such as Uniscribe and FreeType, as text rendering
backends. Pango-processed text will appear similar under different operating
systems.
This is the API documentation of a Lisp binding to Pango.
About This PackageRendering with Pango Low Level Functionality Deprecated APIs Basic Pango InterfacesRendering
Functions to run the rendering pipeline. 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. The pango-item structure stores information about a segment of text. ... The pango-analysis structure stores information about the properties
of a segment of text. ... The pango-log-attr structure stores information about the attributes
of a single character. ...
Flags influencing the shaping process. ...
Breaks a piece of text into segments with consistent directional level and
shaping engine. ... Like the function pango-itemize, but the base direction to use when
computing bidirectional levels, see the function pango-context-base-dir, is specified explicitly rather than gotten from the pango-context object. ... Copy an existing pango-item structure. ... Creates a new pango-item structure initialized to default values. ... 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. ... Add attributes to a pango-item instance. ...
Determines possible line, word, and character breaks for a string of
Unicode text with a single analysis. ... Locates a paragraph boundary in text. ...
This is the default break algorithm. ... Apply language-specific tailoring to the breaks in log-attrs, which
are assumed to have been produced by the function pango-default-break. ... Given a segment of text and the corresponding pango-analysis instance returned from the function pango-itemize, convert the
characters into glyphs. ... Given a segment of text and the corresponding pango-analysis instance returned from the function pango-itemize, convert the
characters into glyphs. ... Given a segment of text and the corresponding pango-analysis instance returned from the function pango-itemize, convert the
characters into glyphs. ... Fonts
Structures representing abstract fonts. Pango supports a flexible architecture where a particular rendering architecture can supply an implementation of fonts. The pango-font class represents an abstract rendering-system-independent font. Pango provides routines to list available fonts, and to load a font of a given description. The pango-font-description structure represents the description of an
ideal font. These structures are used both to list what fonts are available
on the system and also for specifying the characteristics of a font to load. ...
An enumeration specifying the various slant styles possible for a font. ...
An enumeration specifying the weight (boldness) of a font. ...
An enumeration specifying capitalization variant of the font. ...
An enumeration specifying the width of the font relative to other designs
within a family. ... The bits in a pango-font-mask flags correspond to fields in a pango-font-description structure that have been set. ... A pango-font-metrics structure holds the overall metric information
for a font, possibly restricted to a script. ... The pango-font class is used to represent a font in a
rendering-system-independent matter. ... The pango-font-family class is used to represent a family of
related font faces. ... The pango-font-face class is used to represent a group of fonts
with the same family, slant, weight, width, but varying sizes. ... The pango-font-map class represents the set of fonts available for a
particular rendering system. ...
Creates a new font description instance with all fields unset. ...
Makes a copy of a font description. ...
Computes a hash of a font description. ...
Compares two font descriptions for equality. ... Frees a font description. ...
Accessor of the family name for the font description. ...
Accessor of the style field for the font description. ...
Accessor of the variant field for the font description. ...
Accessor of the weight field of a font description. ...
Accessor of the stretch field of the font description. ...
Accessor of the size field of a font description. ...
Sets the size field of a font description, in device units. ...
Determines whether the size of the font is in points (not absolute) or
device units (absolute). ...
Accessor of the gravity field of the font description. ...
Accessor of the variations field for the font description. ...
Determines which fields in a font description have been set. ...
Unsets some of the fields in a font description. ... Determines if the style attributes of new-match are a closer match for desc than those of old-match are, or if old-match is nil, determines if new-match is a match at all. ...
Creates a new font description from a string representation. ...
Creates a string representation of a font description. ...
Creates a filename representation of a font description. ...
Increase the reference count of a font metrics instance by one. ...
Decrease the reference count of a font metrics instance by one. ...
Gets the ascent from a font metrics structure. ...
Gets the descent from a font metrics instance. ...
Gets the line height from a font metrics instance. ...
Gets the approximate character width for a font metrics instance. ...
Gets the approximate digit width for a font metrics instance. ...
Gets the suggested thickness to draw for the underline. ...
Gets the suggested position to draw the underline. ...
Gets the suggested thickness to draw for the strikethrough. ...
Gets the suggested position to draw the strikethrough. ...
Returns a description of the font, with font size set in points. ...
Returns a description of the font, with absolute font size set, in device
units. ... Gets the Pango font face to which font belongs. ...
Computes the coverage map for a given font and language tag. ...
Gets the logical and ink extents of a glyph within a font. ...
Gets overall metric information for a font. ...
Gets the font map for which the font was created. ...
Gets the name of the font family. ...
A monospace font is a font designed for text display where the characters
form a regular grid. ...
A variable font is a font which has axes that can be modified to produce
different faces. ... Lists the different font faces that make up family. ...
Gets a name representing the style of this face among the different faces in the pango-font-family for the face. ...
List the available sizes for a font. ...
Returns the family, style, variant, weight and stretch of a pango-font-face object. ... Returns whether a pango-font-face object is synthesized by the
underlying font rendering engine from another face, perhaps by shearing,
emboldening, or lightening it. ... Gets the Pango font family that face belongs to. ... Creates a Pango context connected to fontmap. ... Load the font in the fontmap that is the closest match for desc. ...
Load a set of fonts in the fontmap that can be used to render a font matching desc. ...
List all families for a font map. ...
Gets a font family by name. ... Returns the current serial number of fontmap. ... Forces a change in the context, which will cause any pango-context
object using this fontmap to change. ...
Returns the font in the fontset that contains the best glyph for the Unicode character wc. ...
Get overall metric information for the fonts in the fontset. ... Iterates through all the fonts in a fontset, calling func for each
one. ... Glyph Storage
Structures for storing information about glyphs. the function 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. The +pange-scale+ constant represents the scale between dimensions
used for Pango distances and device units. ... The pango-rectangle structure represents a rectangle. ...
A structure specifying a transformation between user-space coordinates and
device coordinates. ... A pango-glyph type represents a single glyph in the output form
of a string. ... The pango-glyph-string structure is used to store strings of glyphs
with geometry and visual attribute information. ... A pango-glyph-item structure is a pair of a pango-item
structure and the glyphs resulting from shaping the text corresponding to
an item. ...
Converts a dimension to device units by rounding. ...
Constant that can be used to initialize a Pango matrix to the identity
transform. ... Copies a Pango matrix. ... Changes the transformation represented by matrix to be the transformation given by first translating by (tx, ty) then
applying the original transformation. ... Changes the transformation represented by matrix to be the transformation given by first scaling by x in the x direction and y in the y direction then applying the original transformation. ... Changes the transformation represented by matrix to be the transformation given by first rotating by degrees degrees
counter-clockwise then applying the original transformation. ... Changes the transformation represented by matrix to be the
transformation given by first applying transformation given by new-matrix then applying the original transformation. ... Text Attributes
Font and other attributes for annotating text. 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. The pango-attr-type enumeration distinguishes between different types
of attributes. ... The pango-attr-class structure stores the type and operations for a
particular type of attribute. ... The pango-attribute structure represents the common portions of all
attributes. ... The pango-attr-string structure is used to represent attributes with
a string value. ... The pango-attr-language structure is used to represent attributes
that are languages. ... The pango-attr-color structure is used to represent attributes
that are colors. ... The pango-attr-int structure is used to represent attributes with
an integer or enumeration value. ... The pango-attr-float structure is used to represent attributes with
a float or double value. ... The pango-attr-font-desc structure is used to store an attribute that
sets all aspects of the font description at once. ... The pango-attr-shape structure is used to represent attributes which
impose shape restrictions. ... The pango-attr-size structure is used to represent attributes which
set font size. ... The pango-attr-font-features structure is used to represent OpenType
font features as an attribute. ... The pango-underline enumeration is used to specify whether text
should be underlined, and if so, the type of underlining. ... The Pango-overline enumeration is used to specify whether text should
be overlined, and if so, the type of line. ...
The scale factor for three shrinking steps (1 / (1.2 * 1.2 * 1.2)). ...
The scale factor for two shrinking steps (1 / (1.2 * 1.2)). ...
The scale factor for one shrinking step (1 / 1.2). ...
The scale factor for normal size (1.0). ...
The scale factor for one magnification step (1.2). ...
The scale factor for two magnification steps (1.2 * 1.2). ...
The scale factor for three magnification steps (1.2 * 1.2 * 1.2). ...
These flags affect how Pango treats characters that are normally not
visible in the output. ... The pango-attr-list structure represents a list of attributes that
apply to a section of text. ... The pango-attr-iterator structure is used to represent an iterator through a pango-attr-list structure. ...
Create a new empty attribute list with a reference count of one. ... Copy attr-list and return an identical new attribute list. ... Gets a list of all attributes in attr-list. ... Pango Markup
Simple markup language for text with attributes. Frequently, you want to display some text to the user with attributes applied to part of the text (for example, you might want bold or italicized words). With the base Pango interfaces, you could create a pango-attr-list instance and apply it to the text; the problem is that you'd need to apply attributes to some numeric range of characters, for example "characters 12-17." This is broken from an internationalization standpoint; once the text is translated, the word you wanted to italicize could be in a different position. The solution is to include the text attributes in the string to be translated. Pango provides this feature with a small markup language. You can parse a marked-up string into the string text plus a pango-attr-list instance using either of the functions pango-parse-markup or pango-markup-parser-new. A simple example of a marked-up string might be: <span foreground="blue" size="x-large">Blue text</span> is <i>cool</i>!Pango uses GMarkup to parse this language, which means that XML features such as numeric character entities such as &#169; for © can be used too. The root tag of a marked-up document is <markup>, but the function pango-parse-markup allows you to omit this tag, so you will most likely never need to use it. The most general markup tag is <span>, then there are some convenience tags. Span attributes<span> has the following attributes:
Convenience tagsThe following convenience tags are provided:
Layout Objects
High-level layout driver objects. 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. This includes paragraph-level functionality such as line-breaking, justification, alignment and ellipsization. A pango-wrap-mode enumeration describes how to wrap the lines of a pango-layout to the desired width. ... The pango-ellipsize-mode enumeration describes what sort of (if any)
ellipsization should be applied to a line of text. In the ellipsization
process characters are removed from the text in order to make it fit to a
given width and replaced with an ellipsis. ... A pango-alignment enumeration describes how to align the lines of a pango-layout object within the available space. ... The pango-layout-line structure represents one of the lines resulting from laying out a paragraph via a pango-layout object. ... The pango-layout class represents an entire paragraph of text. ... A pango-layout-iter structure can be used to iterate over the visual extents of a pango-layout object. ...
Create a new Pango layout with attributes initialized to default values for a particular pango-context object. ...
Does a deep copy-by-value of the src layout. ...
Retrieves the Pango context used for this layout. ...
Forces recomputation of any state in the Pango layout that might depend on the layout's context. ... Returns the current serial number of layout. ... Accessor of the text of a pango-layout object. ... Returns the number of Unicode characters in the the text of layout. ... Same as the function pango-layout-set-markup-with-accel, but the
markup text is not scanned for accelerators. ...
Sets the layout text and attribute list from marked-up text (see markup
format). ...
Accessor of the attribute list for the layout. ...
Accessor of the font description of the Pango layout. ...
Accessor of the width in Pango units of a Pango layout. ...
Accessor of the height in Pango units of the Pango layout. ...
Accessor of the wrap mode of the Pango layout. ...
Queries whether the layout had to wrap any paragraphs. ...
Accessor of the ellipsization mode for the layout. ...
Queries whether the layout had to ellipsize any paragraphs. ...
Accessor of the indent in Pango units of the Pango layout. ...
Accessor of the spacing in Pango units of the Pango layout. ...
Accessor of the line spacing for the Pango layout. ...
Accessor of the justify value of the Pango layout. ... The function pango-layout-auto-dir gets whether to calculate the
bidirectional base direction for the layout according to the contents of
the layout. ...
Gets the text direction at the given character position in the layout. ...
Accessor of the alignement of the layout. ...
Accessor of the tabs for the Pango layout. ...
Accessor of the single paragraph mode of the Pango Layout. ...
Counts the number unknown glyphs in layout. ...
Retrieves a list of logical attributes for each character in the layout. ...
Retrieves a list of logical attributes for each character in the layout. ...
Converts from an index within a Pango layout to the onscreen position
corresponding to the grapheme at that index, which is represented as
rectangle. ... Converts from byte index within the layout to line and x position. ...
Converts from x and y position within a layout to the byte index to the
character at that logical position. ...
Given an index within a layout, determines the positions that of the strong
and weak cursors if the insertion point is at that index. ...
Computes a new cursor position from an old position and a count of positions
to move visually. ...
Computes the logical and ink extents of layout. ...
Computes the logical and ink extents of layout in device units. ...
Determines the logical width and height of a layout in Pango units, device units scaled by the constant +pango-scale+. ...
Determines the logical width and height of a Pango layout in device units. ...
Gets the y position of baseline of the first line in layout. ...
Retrieves the count of lines for the layout. ...
Retrieves a particular line from a Pango layout. ...
Retrieves a particular line from a Pango layout. ...
Returns the lines of the layout as a list. ...
Returns the lines of the layout as a list. ...
Returns an iterator to iterate over the visual extents of the layout. ... Copies a pango-layout-iter instance. ...
Frees an iterator that is no longer in use. ... Moves iter forward to the next run in visual order. ... Moves iter forward to the next character in visual order. ... Moves iter forward to the next cluster in visual order. ... Moves iter forward to the start of the next line. ... Determines whether iter is on the last line of the layout. ...
Gets the current byte index. ...
Gets the y position of the current line's baseline, in layout coordinates
(origin at top left of the entire layout). ...
Gets the current run. ...
Gets the current run. ...
Gets the current line. ...
Gets the current line for read-only access. ...
Gets the layout associated with a Pango layout iterator. ...
Gets the extents of the current character, in layout coordinates (origin is
the top left of the entire layout). ...
Gets the extents of the current cluster, in layout coordinates (origin is
the top left of the entire layout). ...
Gets the extents of the current run in layout coordinates (origin is the
top left of the entire layout). ...
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. ...
Obtains the extents of the current line. ...
Obtains the extents of the Pango layout being iterated over. ... Increase the reference count of a pango-layout-line instance by one. ... Decrease the reference count of a pango-layout-line instance by one. ...
Computes the logical and ink extents of a layout line. ... Computes the logical and ink extents of line in device units. ...
Converts an index within a line to a x position. ...
Converts from x offset to the byte index of the corresponding character
within the text of the layout. ...
Gets a list of visual ranges corresponding to a given logical range. ...
Computes the height of the line, i.e. the distance between this and the
previous lines baseline. ... Scripts and Languages
Identifying writing systems and languages. The pango-script enumeration identifies different writing systems. ... The pango-language structure is used to represent a language. ...
Takes a RFC-3066 format language tag as a string and convert it to a pango-language structure that can be efficiently copied and
compared with other language tags. ...
Gets the RFC-3066 format string representing the given Pango language tag. ...
Checks if a language tag matches one of the elements in a list of language
ranges. ... Returns the pango-language structure for the current locale of the
process. ...
Get a string that is representative of the characters needed to render
a particular language. ... Bidirectional Text
Types and functions to help with handling bidirectional text. Pango supports bidirectional text (like Arabic and Hebrew) automatically. Some applications however, need some help to correctly handle bidirectional text. The pango-direction enumeration can be used with the function pango-context-base-dir to instruct Pango about direction of text, though in most cases Pango detects that correctly and automatically. The rest of the facilities in this section are used internally by Pango already, and are provided to help applications that need more direct control over bidirectional setting of text. The pango-direction enumeration represents a direction in the Unicode
bidirectional algorithm. ... Vertical Text
Laying text out in vertical directions. The pango-gravity enumeration represents the orientation of glyphs in
a segment of text. ... The pango-gravity-hint enumeration defines how horizontal scripts
should behave in a vertical context. ...
Finds the gravity that best matches the rotation component in a pango-matrix instance. ...
Based on the script, base gravity, and hint, returns actual gravity to use
in laying out a single PangoItem. ...
Based on the script, East Asian width, base gravity, and hint, returns
actual gravity to use in laying out a single character or PangoItem. ... Converts a pangogravity value to its natural rotation in radians. ... Rendering with PangoCairo Rendering
Font handling and rendering with Cairo. The pango-cairo-font interface is an interface exported by fonts for
use with Cairo. ... The pango-cairo-font-map interface is an interface exported by font
maps for use with Cairo. ... The function pango-cairo-font-map-default gets a default PangoCairo
font map to use with Cairo. ...
Creates a new PangoCairoFontMap object ... Creates a new pango-cairo-font-map object of the type suitable to
be used with Cairo font backend of type fonttype. ... Gets the type of Cairo font backend that fontmap uses. ...
Accesor of the resolution of a Cairo font map in "dots per inch". ... Create a Pango context for the given fontmap. ...
Accessor of the resolution in "dots per inch" for the Pango context. ...
Accessor of the font options set on the Pango context. ...
Accessor of the shape rendering callback function set on the context. ...
Creates a context object set up to match the current transformation and
target surface of the Cairo context. ... Updates a pango-context object previously created for use with
Cairo to match the current transformation and target surface of a Cairo
context. ...
Creates a layout object set up to match the current transformation and
target surface of the Cairo context. ... Updates the private pango-context object of a pango-layout object created with the function pango-cairo-create-layout to match
the current transformation and target surface of a Cairo context. ... Draws the glyphs in glyphs in the specified Cairo context. ... Draws the glyphs in glyph-item in the specified Cairo context,
embedding the text associated with the glyphs in the output if the output
format supports it (PDF for example), otherwise it acts similar to the function pango-cairo-show-glyph-string. ...
Draws a Pango layout line in the specified Cairo context. ...
Draws a Pango layout in the specified Cairo context. ...
Draw a squiggly line in the specified Cairo context that approximately
covers the given rectangle in the style of an underline used to indicate
a spelling error. ... Adds the glyphs in glyphs to the current path in the specified Cairo
context. ... Adds the text in the pango-layout-line instance to the current path
in the specified Cairo context. ...
Adds the text in a Pango layout to the current path in the specified Cairo
context. ...
Add a squiggly line to the current path in the specified Cairo context that
approximately covers the given rectangle in the style of an underline used
to indicate a spelling error. ... Win32 Fonts and Rendering
not implemented CoreText Fonts
not implemented FreeType Fonts and Rendering
not implemented Xft Fonts and Rendering
not implemented Low Level FunctionalityContexts
Global context object. The pango-context object stores global information influencing
Pango's operation, such as the fontmap used to look up fonts, and default
values such as the default language, default gravity, or default font. ...
Creates a new Pango Context initialized to default values. ... Forces a change in the context, which will cause any pango-layout
using this context to re-layout. ... Returns the current serial number of context. ...
Accesor of the font map of a Pango context. ...
Accessor of the font description of the Pango context. ...
Accessor of the global language tag of the Pango context. ...
Accessor of the base direction for the Pango context. ...
Accessor of the base gravity for the Pango context. ...
Retrieves the gravity for the Pango context. ...
Accessor of the gravity hint for the Pango context. ...
Accessor of the transformation matrix of the Pango context. ... The function pango-context-round-glyph-positions returns whether font
rendering with this context should round glyph positions and widths. ...
Loads the font in one of the fontmaps in the context that is the closest match for desc. ...
Load a set of fonts in the context that can be used to render a font matching desc. ...
Get overall metric information for a particular font description. ...
List all families for a context. ... Tab StopsCoverage Maps
Unicode character range coverage storage. The pango-coverage class represents a map from Unicode characters to
PangoCoverageLevel. ... PangoRenderer
Rendering driver base class. A pango-renderer class is a base class that contains the necessary logic for rendering pango-layout or a pango-layout-line
objects. ... The pango-render-part enumeration defines different items to render
for such purposes as setting colors. ... PangoFcFontMap
not implemented PangoFcFont
not implemented PangoFcDecoder
not implemented Miscellaneous Utilities
not implemented Version InformationDeprecated APIsOpenType Font Handling
not implemented Engines
not implemented PangoEngineLang
not implemented PangoEngineShape
not implemented Modules
not implemented | Exported Symbol Index |