Namespace

Pango – 1.0

Internationalized text layout and rendering

Version1.48.5
AuthorsOwen Taylor, Behdad Esfahbod
LicenseGPL-2.1-or-later
Websitehttps://www.pango.org
Sourcehttps://gitlab.gnome.org/GNOME/pango/

Build

C headerspango/pango.h
pkg-config filespango

Dependencies

GObject The base type system library
Browse documentation
HarfBuzz A text shaping library
Browse documentation
PangoCairo Cairo support for Pango
Browse documentation
PangoFc Fontconfig support for Pango
Browse documentation
PangoFT2 Freetype support for Pango
Browse documentation
PangoOT OpenType support for Pango
Browse documentation
PangoXft Xft support for Pango
Browse documentation

Classes

Context

A PangoContext stores global information used to control the itemization process.

Coverage

A PangoCoverage structure is a map from Unicode characters to PangoCoverageLevel values.

Font

A PangoFont is used to represent a font in a rendering-system-independent manner.

FontFace

A PangoFontFace is used to represent a group of fonts with the same family, slant, weight, and width, but varying sizes.

FontFamily

A PangoFontFamily is used to represent a family of related font faces.

FontMap

A PangoFontMap represents the set of fonts available for a particular rendering system.

Fontset

A PangoFontset represents a set of PangoFont to use when rendering text.

FontsetSimple

PangoFontsetSimple is a implementation of the abstract PangoFontset base class as an array of fonts.

Layout

A PangoLayout structure represents an entire paragraph of text.

Renderer

PangoRenderer is a base class for objects that can render text provided as PangoGlyphString or PangoLayout.

Structs

Analysis

The PangoAnalysis structure stores information about the properties of a segment of text.

AttrClass

The PangoAttrClass structure stores the type and operations for a particular type of attribute.

AttrColor

The PangoAttrColor structure is used to represent attributes that are colors.

AttrFloat

The PangoAttrFloat structure is used to represent attributes with a float or double value.

AttrFontDesc

The PangoAttrFontDesc structure is used to store an attribute that sets all aspects of the font description at once.

AttrFontFeatures

The PangoAttrFontFeatures structure is used to represent OpenType font features as an attribute.

Attribute

The PangoAttribute structure represents the common portions of all attributes.

AttrInt

The PangoAttrInt structure is used to represent attributes with an integer or enumeration value.

AttrIterator

A PangoAttrIterator is used to iterate through a PangoAttrList.

AttrLanguage

The PangoAttrLanguage structure is used to represent attributes that are languages.

AttrList

A PangoAttrList represents a list of attributes that apply to a section of text.

AttrShape

The PangoAttrShape structure is used to represent attributes which impose shape restrictions.

AttrSize

The PangoAttrSize structure is used to represent attributes which set font size.

AttrString

The PangoAttrString structure is used to represent attributes with a string value.

Color

The PangoColor structure is used to represent a color in an uncalibrated RGB color-space.

FontDescription

A PangoFontDescription describes a font in an implementation-independent manner.

FontMetrics

A PangoFontMetrics structure holds the overall metric information for a font.

GlyphGeometry

The PangoGlyphGeometry structure contains width and positioning information for a single glyph.

GlyphInfo

A PangoGlyphInfo structure represents a single glyph with positioning information and visual attributes.

GlyphItem

A PangoGlyphItem is a pair of a PangoItem and the glyphs resulting from shaping the items text.

GlyphItemIter

A PangoGlyphItemIter is an iterator over the clusters in a PangoGlyphItem.

GlyphString

A PangoGlyphString is used to store strings of glyphs with geometry and visual attribute information.

GlyphVisAttr

A PangoGlyphVisAttr structure communicates information between the shaping and rendering phases.

Item

The PangoItem structure stores information about a segment of text.

Language

The PangoLanguage structure is used to represent a language.

LayoutIter

A PangoLayoutIter can be used to iterate over the visual extents of a PangoLayout.

LayoutLine

A PangoLayoutLine represents one of the lines resulting from laying out a paragraph via PangoLayout.

LogAttr

The PangoLogAttr structure stores information about the attributes of a single character.

Matrix

A PangoMatrix specifies a transformation between user-space and device coordinates.

Rectangle

The PangoRectangle structure represents a rectangle.

ScriptIter

A PangoScriptIter is used to iterate through a string and identify ranges in different scripts.

TabArray

A PangoTabArray contains an array of tab stops.

Aliases

Glyph

A PangoGlyph represents a single glyph in the output form of a string.

GlyphUnit

The PangoGlyphUnit type is used to store dimensions within Pango.

LayoutRun

A PangoLayoutRun represents a single run within a PangoLayoutLine.

Enumerations

Alignment

PangoAlignment describes how to align the lines of a PangoLayout within the available space.

AttrType

The PangoAttrType distinguishes between different types of attributes.

BidiType

PangoBidiType represents the bidirectional character type of a Unicode character as specified by the Unicode bidirectional algorithm.

CoverageLevel

PangoCoverageLevel is used to indicate how well a font can represent a particular Unicode character for a particular script.

Direction

PangoDirection represents a direction in the Unicode bidirectional algorithm.

EllipsizeMode

PangoEllipsizeMode describes what sort of ellipsization should be applied to text.

Gravity

PangoGravity represents the orientation of glyphs in a segment of text.

GravityHint

PangoGravityHint defines how horizontal scripts should behave in a vertical context.

Overline

The PangoOverline enumeration is used to specify whether text should be overlined, and if so, the type of line.

RenderPart

PangoRenderPart defines different items to render for such purposes as setting colors.

Script

The PangoScript enumeration identifies different writing systems.

Stretch

An enumeration specifying the width of the font relative to other designs within a family.

Style

An enumeration specifying the various slant styles possible for a font.

TabAlign

PangoTabAlign specifies where a tab stop appears relative to the text.

Underline

The PangoUnderline enumeration is used to specify whether text should be underlined, and if so, the type of underlining.

Variant

An enumeration specifying capitalization variant of the font.

Weight

An enumeration specifying the weight (boldness) of a font.

WrapMode

PangoWrapMode describes how to wrap the lines of a PangoLayout to the desired width.

Bitfields

FontMask

The bits in a PangoFontMask correspond to the set fields in a PangoFontDescription.

ShapeFlags

Flags influencing the shaping process.

ShowFlags

These flags affect how Pango treats characters that are normally not visible in the output.

Callbacks

AttrDataCopyFunc

Type of a function that can duplicate user data for an attribute.

AttrFilterFunc

Type of a function filtering a list of attributes.

FontsetForeachFunc

Callback used by pango_fontset_foreach() when enumerating fonts in a fontset.

Functions

attr_allow_breaks_new

Create a new allow-breaks attribute.

attr_background_alpha_new

Create a new background alpha attribute.

attr_background_new

Create a new background color attribute.

attr_fallback_new

Create a new font fallback attribute.

attr_family_new

Create a new font family attribute.

attr_foreground_alpha_new

Create a new foreground alpha attribute.

attr_foreground_new

Create a new foreground color attribute.

attr_gravity_hint_new

Create a new gravity hint attribute.

attr_gravity_new

Create a new gravity attribute.

attr_insert_hyphens_new

Create a new insert-hyphens attribute.

attr_letter_spacing_new

Create a new letter-spacing attribute.

attr_overline_color_new

Create a new overline color attribute.

attr_overline_new

Create a new overline-style attribute.

attr_rise_new

Create a new baseline displacement attribute.

attr_scale_new

Create a new font size scale attribute.

attr_show_new

Create a new attribute that influences how invisible characters are rendered.

attr_stretch_new

Create a new font stretch attribute.

attr_strikethrough_color_new

Create a new strikethrough color attribute.

attr_strikethrough_new

Create a new strike-through attribute.

attr_style_new

Create a new font slant style attribute.

attr_underline_color_new

Create a new underline color attribute.

attr_underline_new

Create a new underline-style attribute.

attr_variant_new

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

attr_weight_new

Create a new font weight attribute.

break

Determines possible line, word, and character breaks for a string of Unicode text with a single analysis.

default_break

This is the default break algorithm.

extents_to_pixels

Converts extents from Pango units to device units.

find_base_dir

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

find_paragraph_boundary

Locates a paragraph boundary in text.

get_log_attrs

Computes a PangoLogAttr for each character in text.

get_mirror_char

Returns the mirrored character of a Unicode character.

is_zero_width

Checks if a character that should not be normally rendered.

itemize

Breaks a piece of text into segments with consistent directional level and font.

itemize_with_base_dir

Like pango_itemize(), but with an explicitly specified base direction.

log2vis_get_embedding_levels

Return the bidirectional embedding levels of the input paragraph.

markup_parser_finish

Finishes parsing markup.

markup_parser_new

Incrementally parses marked-up text to create a plain-text string and an attribute list.

parse_enum

Parses an enum type and stores the result in value.

parse_markup

Parses marked-up text to create a plain-text string and an attribute list.

parse_stretch

Parses a font stretch.

parse_style

Parses a font style.

parse_variant

Parses a font variant.

parse_weight

Parses a font weight.

quantize_line_geometry

Quantizes the thickness and position of a line to whole device pixels.

read_line

Reads an entire line from a file into a buffer.

reorder_items

Reorder items from logical order to visual order.

scan_int

Scans an integer.

scan_string

Scans a string into a GString buffer.

scan_word

Scans a word into a GString buffer.

shape

Convert the characters in text into glyphs.

shape_full

Convert the characters in text into glyphs.

shape_with_flags

Convert the characters in text into glyphs.

skip_space

Skips 0 or more characters of white space.

split_file_list

Splits a G_SEARCHPATH_SEPARATOR-separated list of files, stripping white space and substituting ~/ with $HOME/.

tailor_break

Apply language-specific tailoring to the breaks in log_attrs.

trim_string

Trims leading and trailing whitespace from a string.

unichar_direction

Determines the inherent direction of a character.

units_from_double

Converts a floating-point number to Pango units.

units_to_double

Converts a number in Pango units to floating-point.

version

Returns the encoded version of Pango available at run-time.

version_check

Checks that the Pango library in use is compatible with the given version.

version_string

Returns the version of Pango available at run-time.

Function Macros

ASCENT

Extracts the ascent from a PangoRectangle representing glyph extents.

DESCENT

Extracts the descent from a PangoRectangle representing glyph extents.

LBEARING

Extracts the left bearing from a PangoRectangle representing glyph extents.

PIXELS

Converts a dimension to device units by rounding.

PIXELS_CEIL

Converts a dimension to device units by ceiling.

PIXELS_FLOOR

Converts a dimension to device units by flooring.

RBEARING

Extracts the right bearing from a PangoRectangle representing glyph extents.

UNITS_ROUND

Rounds a dimension to whole device units, but does not convert it to device units.

VERSION_CHECK

Checks that the version of Pango available at compile-time is not older than the provided version number.

VERSION_ENCODE

This macro encodes the given Pango version into an integer. The numbers returned by PANGO_VERSION and pango_version() are encoded using this macro. Two encoded version numbers can be compared as integers.

Constants

ANALYSIS_FLAG_CENTERED_BASELINE

Whether the segment should be shifted to center around the baseline.

ANALYSIS_FLAG_IS_ELLIPSIS

Whether this run holds ellipsized text.

ANALYSIS_FLAG_NEED_HYPHEN

Whether to add a hyphen at the end of the run during shaping.

ATTR_INDEX_FROM_TEXT_BEGINNING

Value for start_index in PangoAttribute that indicates the beginning of the text.

ATTR_INDEX_TO_TEXT_END

Value for end_index in PangoAttribute that indicates the end of the text.

GLYPH_EMPTY

A PangoGlyph value that indicates a zero-width empty glpyh.

GLYPH_INVALID_INPUT

A PangoGlyph value for invalid input.

GLYPH_UNKNOWN_FLAG

Flag used in PangoGlyph to turn a gunichar value of a valid Unicode character into an unknown-character glyph for that gunichar.

SCALE

The scale between dimensions used for Pango distances and device units.

VERSION_MAJOR

The major component of the version of Pango available at compile-time.

VERSION_MICRO

The micro component of the version of Pango available at compile-time.

VERSION_MINOR

The minor component of the version of Pango available at compile-time.

VERSION_STRING

A string literal containing the version of Pango available at compile-time.