pango
Description:
Pango is the core text and font handling library used in GNOME applications. It has extensive support for the different writing systems used throughout the world.
- Home: https://www.gtk.org/
- C-Documentation: https://docs.gtk.org/Pango/
- Devhelp-Package download
Content:
Namespaces:
- Pango
- 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.
- 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.
- Attribute - The `PangoAttribute` structure represents the common portions of all attributes.
- Context - A `PangoContext` stores global information used to control the itemization process.
- Coverage - A `PangoCoverage` structure is a map from Unicode characters to [enum@Pango.
- Font - A `PangoFont` is used to represent a font in a rendering-system-independent manner.
- FontDescription - A `PangoFontDescription` describes a font in an implementation-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.
- FontMetrics - A `PangoFontMetrics` structure holds the overall metric information for a font.
- 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.
- GlyphItem - A `PangoGlyphItem` is a pair of a `PangoItem` and the glyphs resulting from shaping the items text.
- GlyphString - A `PangoGlyphString` is used to store strings of glyphs with geometry and visual attribute information.
- Item - The `PangoItem` structure stores information about a segment of text.
- Language - The `PangoLanguage` structure is used to represent a language.
- Layout - A `PangoLayout` structure represents an entire paragraph of text.
- 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`.
- LayoutRun - A `PangoLayoutRun` represents a single run within a `PangoLayoutLine`.
- Renderer - `PangoRenderer` is a base class for objects that can render text provided as `PangoGlyphString` or `PangoLayout`.
- 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.
- Analysis - The `PangoAnalysis` structure stores information about the properties of a segment of text.
- Color - The `PangoColor` structure is used to represent a color in an uncalibrated RGB color-space.
- Glyph - A `PangoGlyph` represents a single glyph in the output form of a string.
- 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.
- GlyphItemIter - A `PangoGlyphItemIter` is an iterator over the clusters in a `PangoGlyphItem`.
- GlyphUnit - The `PangoGlyphUnit` type is used to store dimensions within Pango.
- GlyphVisAttr - A `PangoGlyphVisAttr` structure communicates information between the shaping and rendering phases.
- 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.
- Alignment - `PangoAlignment` describes how to align the lines of a `PangoLayout` within the available space.
- AttrType - The `PangoAttrType` distinguishes between different types of attributes.
- BaselineShift - An enumeration that affects baseline shifts between runs.
- BidiType - `PangoBidiType` represents the bidirectional character type of a Unicode character.
- 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.
- FontMask - The bits in a `PangoFontMask` correspond to the set fields in a `PangoFontDescription`.
- FontScale - An enumeration that affects font sizes for superscript and subscript positioning and for (emulated) Small Caps.
- Gravity - `PangoGravity` represents the orientation of glyphs in a segment of text.
- GravityHint - `PangoGravityHint` defines how horizontal scripts should behave in a vertical context.
- LayoutDeserializeFlags - Flags that influence the behavior of [func@Pango.
- LayoutSerializeFlags - Flags that influence the behavior of [method@Pango.
- 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.
- ShapeFlags - Flags influencing the shaping process.
- ShowFlags - These flags affect how Pango treats characters that are normally not visible in the output.
- 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 the text appears relative to the tab stop position.
- TextTransform - An enumeration that affects how Pango treats characters during shaping.
- 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.
- LayoutDeserializeError - Errors that can be returned by [func@Pango.
- public const int ANALYSIS_FLAG_CENTERED_BASELINE
Whether the segment should be shifted to center around the baseline.
- public const int ANALYSIS_FLAG_IS_ELLIPSIS
Whether this run holds ellipsized text.
- public const int ANALYSIS_FLAG_NEED_HYPHEN
Whether to add a hyphen at the end of the run during shaping.
- public const uint ATTR_INDEX_FROM_TEXT_BEGINNING
Value for
start_index
in `PangoAttribute` that indicates the beginning of the text. - public const uint ATTR_INDEX_TO_TEXT_END
Value for
end_index
in `PangoAttribute` that indicates the end of the text. - public const Glyph GLYPH_EMPTY
A `PangoGlyph` value that indicates a zero-width empty glpyh.
- public const Glyph GLYPH_INVALID_INPUT
A `PangoGlyph` value for invalid input.
- public const Glyph 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`.
- public const int SCALE
The scale between dimensions used for Pango distances and device units.
- public const int VERSION_MAJOR
The major component of the version of Pango available at compile-time.
- public const int VERSION_MICRO
The micro component of the version of Pango available at compile-time.
- public const int VERSION_MINOR
The minor component of the version of Pango available at compile-time.
- public const string VERSION_STRING
A string literal containing the version of Pango available at compile-time.
- public delegate T AttrDataCopyFunc<T> (T data)
Type of a function that can duplicate user data for an attribute.
- public delegate bool AttrFilterFunc (Attribute attribute)
Type of a function filtering a list of attributes.
- public delegate bool FontsetForeachFunc (Fontset fontset, Font font)
Callback used when enumerating fonts in a fontset.
- public void @break (string text, int length, Analysis analysis, LogAttr[] attrs)
Determines possible line, word, and character breaks for a string of Unicode text with a single analysis.
- public Attribute attr_allow_breaks_new (bool allow_breaks)
Create a new allow-breaks attribute.
- public Attribute attr_background_alpha_new (uint16 alpha)
Create a new background alpha attribute.
- public Attribute attr_background_new (uint16 red, uint16 green, uint16 blue)
Create a new background color attribute.
- public Attribute attr_baseline_shift_new (int shift)
Create a new baseline displacement attribute.
- public void attr_break (string text, int length, AttrList attr_list, int offset, LogAttr[] attrs)
Apply customization from attributes to the breaks in
attrs
. - public Attribute attr_fallback_new (bool enable_fallback)
Create a new font fallback attribute.
- public Attribute attr_family_new (string family)
Create a new font family attribute.
- public Attribute attr_font_desc_new (FontDescription desc)
Create a new font description attribute.
- public Attribute attr_font_scale_new (FontScale scale)
Create a new font scale attribute.
- public Attribute attr_foreground_alpha_new (uint16 alpha)
Create a new foreground alpha attribute.
- public Attribute attr_foreground_new (uint16 red, uint16 green, uint16 blue)
Create a new foreground color attribute.
- public Attribute attr_gravity_hint_new (GravityHint hint)
Create a new gravity hint attribute.
- public Attribute attr_gravity_new (Gravity gravity)
Create a new gravity attribute.
- public Attribute attr_insert_hyphens_new (bool insert_hyphens)
Create a new insert-hyphens attribute.
- public Attribute attr_letter_spacing_new (int letter_spacing)
Create a new letter-spacing attribute.
- public Attribute attr_line_height_new (double factor)
Modify the height of logical line extents by a factor.
- public Attribute attr_line_height_new_absolute (int height)
Override the height of logical line extents to be
height
. - public AttrList? attr_list_from_string (string text)
Deserializes a `PangoAttrList` from a string.
- public Attribute attr_overline_color_new (uint16 red, uint16 green, uint16 blue)
Create a new overline color attribute.
- public Attribute attr_overline_new (Overline overline)
Create a new overline-style attribute.
- public Attribute attr_rise_new (int rise)
Create a new baseline displacement attribute.
- public Attribute attr_scale_new (double scale_factor)
Create a new font size scale attribute.
- public Attribute attr_sentence_new ()
Marks the range of the attribute as a single sentence.
- public Attribute attr_show_new (ShowFlags flags)
Create a new attribute that influences how invisible characters are rendered.
- public Attribute attr_stretch_new (Stretch stretch)
Create a new font stretch attribute.
- public Attribute attr_strikethrough_color_new (uint16 red, uint16 green, uint16 blue)
Create a new strikethrough color attribute.
- public Attribute attr_strikethrough_new (bool strikethrough)
Create a new strike-through attribute.
- public Attribute attr_style_new (Style style)
Create a new font slant style attribute.
- public Attribute attr_text_transform_new (TextTransform transform)
Create a new attribute that influences how characters are transformed during shaping.
- public unowned string? attr_type_get_name (AttrType type)
- public AttrType attr_type_register (string name)
- public Attribute attr_underline_color_new (uint16 red, uint16 green, uint16 blue)
Create a new underline color attribute.
- public Attribute attr_underline_new (Underline underline)
Create a new underline-style attribute.
- public Attribute attr_variant_new (Variant variant)
Create a new font variant attribute (normal or small caps).
- public Attribute attr_weight_new (Weight weight)
Create a new font weight attribute.
- public Attribute attr_word_new ()
Marks the range of the attribute as a single word.
- public BidiType bidi_type_for_unichar (unichar ch)
- public void default_break (string text, int length, Analysis? analysis, LogAttr attrs, int attrs_len)
This is the default break algorithm.
- public void extents_to_pixels (Rectangle? inclusive, Rectangle? nearest)
Converts extents from Pango units to device units.
- public Direction find_base_dir (string text, int length)
Searches a string the first character that has a strong direction, according to the Unicode bidirectional algorithm.
- public void find_paragraph_boundary (string text, int length, out int paragraph_delimiter_index, out int next_paragraph_start)
Locates a paragraph boundary in
text
. - public FontDescription font_description_from_string (string str)
Creates a new font description from a string representation.
- public void get_log_attrs (string text, int length, int level, Language language, LogAttr[] attrs)
Computes a `PangoLogAttr` for each character in
text
. - public bool get_mirror_char (unichar ch, unichar mirrored_ch)
Returns the mirrored character of a Unicode character.
- public Gravity gravity_get_for_matrix (Matrix? matrix)
- public Gravity gravity_get_for_script (Script script, Gravity base_gravity, GravityHint hint)
- public Gravity gravity_get_for_script_and_width (Script script, bool wide, Gravity base_gravity, GravityHint hint)
- public double gravity_to_rotation (Gravity gravity)
- public bool is_zero_width (unichar ch)
Checks if a character that should not be normally rendered.
- public List<Item> itemize (Context context, string text, int start_index, int length, AttrList attrs, AttrIterator? cached_iter)
Breaks a piece of text into segments with consistent directional level and font.
- public List<Item> itemize_with_base_dir (Context context, Direction base_dir, string text, int start_index, int length, AttrList attrs, AttrIterator? cached_iter)
Like `pango_itemize()`, but with an explicitly specified base direction.
- public unowned Language? language_from_string (string? language)
Convert a language tag to a `PangoLanguage`.
- public unowned Language language_get_default ()
Returns the `PangoLanguage` for the current locale of the process.
- public unowned Language[]? language_get_preferred ()
Returns the list of languages that the user prefers.
- public Quark layout_deserialize_error_quark ()
- public uint8 log2vis_get_embedding_levels (string text, int length, ref Direction pbase_dir)
Return the bidirectional embedding levels of the input paragraph.
- public bool markup_parser_finish (MarkupParseContext context, out AttrList attr_list, out string text, out unichar accel_char) throws Error
Finishes parsing markup.
- public unowned MarkupParseContext markup_parser_new (unichar accel_marker)
Incrementally parses marked-up text to create a plain-text string and an attribute list.
- public bool parse_enum (Type type, string? str, out int value, bool warn, out string possible_values)
Parses an enum type and stores the result in
value
. - public bool parse_markup (string markup_text, int length, unichar accel_marker, out AttrList attr_list, out string text, out unichar accel_char) throws Error
Parses marked-up text to create a plain-text string and an attribute list.
- public bool parse_stretch (string str, out Stretch stretch, bool warn)
Parses a font stretch.
- public bool parse_style (string str, out Style style, bool warn)
Parses a font style.
- public bool parse_variant (string str, out Variant variant, bool warn)
Parses a font variant.
- public bool parse_weight (string str, out Weight weight, bool warn)
Parses a font weight.
- public void quantize_line_geometry (ref int thickness, ref int position)
Quantizes the thickness and position of a line to whole device pixels.
- public int read_line (FileStream stream, StringBuilder str)
Reads an entire line from a file into a buffer.
- public List<Item> reorder_items (List<Item> items)
Reorder items from logical order to visual order.
- public bool scan_int (ref string pos, out int @out)
Scans an integer.
- public bool scan_string (ref string pos, StringBuilder @out)
Scans a string into a `GString` buffer.
- public bool scan_word (ref string pos, StringBuilder @out)
Scans a word into a `GString` buffer.
- public Script script_for_unichar (unichar ch)
- public Language? script_get_sample_language (Script script)
- public void shape (string text, int length, Analysis analysis, GlyphString glyphs)
Convert the characters in
text
into glyphs. - public void shape_full (string item_text, int item_length, string? paragraph_text, int paragraph_length, Analysis analysis, GlyphString glyphs)
Convert the characters in
text
into glyphs. - public void shape_item (Item item, string? paragraph_text, int paragraph_length, LogAttr? log_attrs, GlyphString glyphs, ShapeFlags flags)
Convert the characters in
item
into glyphs. - public void shape_with_flags (string item_text, int item_length, string? paragraph_text, int paragraph_length, Analysis analysis, GlyphString glyphs, ShapeFlags flags)
Convert the characters in
text
into glyphs. - public bool skip_space (ref string pos)
Skips 0 or more characters of white space.
- public string[] split_file_list (string str)
Splits a g_searchpath_separator -separated list of files, stripping white space and substituting ~/ with $HOME/.
- public TabArray? tab_array_from_string (string text)
Deserializes a `PangoTabArray` from a string.
- public void tailor_break (string text, int length, Analysis analysis, int offset, LogAttr[] attrs)
Apply language-specific tailoring to the breaks in
attrs
. - public string trim_string (string str)
Trims leading and trailing whitespace from a string.
- public Direction unichar_direction (unichar ch)
Determines the inherent direction of a character.
- public int units_from_double (double d)
Converts a floating-point number to Pango units.
- public double units_to_double (int i)
Converts a number in Pango units to floating-point.
- public int version ()
Returns the encoded version of Pango available at run-time.
- public unowned string? version_check (int required_major, int required_minor, int required_micro)
Checks that the Pango library in use is compatible with the given version.
- public unowned string version_string ()
Returns the version of Pango available at run-time.
- Scale