Crate pango[][src]

Expand description

Rust Pango bindings

Rust bindings and wrappers for Pango, part of gtk-rs-core.

Pango 1.38 is the lowest supported version for the underlying library.

Minimum supported Rust version

Currently, the minimum supported Rust version is 1.54.0.

Documentation

Using

We recommend using crates from crates.io, as demonstrated here.

If you want to track the bleeding edge, use the git dependency instead:

[dependencies]
pango = { git = "https://github.com/gtk-rs/gtk-rs-core.git", package = "pango" }

Avoid mixing versioned and git crates like this:

[dependencies]
pango = "0.13"
pango = { git = "https://github.com/gtk-rs/gtk-rs-core.git", package = "pango" }

See Also

License

pango is available under the MIT License, please refer to it.

Re-exports

pub use ffi;
pub use glib;
pub use crate::analysis::Analysis;
pub use crate::attr_class::AttrClass;
pub use crate::attribute::AttrColor;
pub use crate::attribute::AttrFloat;
pub use crate::attribute::AttrFontDesc;
pub use crate::attribute::AttrInt;
pub use crate::attribute::AttrLanguage;
pub use crate::attribute::IsAttribute;
pub use crate::language::Language;
pub use crate::layout::HitPosition;
pub use crate::rectangle::Rectangle;
pub use glyph::GlyphGeometry;
pub use glyph::GlyphInfo;

Modules

Traits and essential types intended for blanket imports.

Structs

A AttrIterator is used to iterate through a AttrList.

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

The Attribute structure represents the common portions of all attributes.

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

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

A Coverage structure is a map from Unicode characters to CoverageLevel values.

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

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

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

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

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

The bits in a FontMask correspond to the set fields in a FontDescription.

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

A Fontset represents a set of Font to use when rendering text.

FontsetSimple is a implementation of the abstract Fontset base class as an array of fonts.

A GlyphItem is a pair of a Item and the glyphs resulting from shaping the items text.

A GlyphItemIter is an iterator over the clusters in a GlyphItem.

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

The Item structure stores information about a segment of text.

A Layout structure represents an entire paragraph of text.

A LayoutIter can be used to iterate over the visual extents of a Layout.

A LayoutLine represents one of the lines resulting from laying out a paragraph via Layout.

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

Renderer is a base class for objects that can render text provided as GlyphString or Layout.

Flags influencing the shaping process.

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

A TabArray contains an array of tab stops.

Enums

Alignment describes how to align the lines of a Layout within the available space.

The AttrType distinguishes between different types of attributes.

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

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

Direction represents a direction in the Unicode bidirectional algorithm.

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

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

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

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

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

The Script enumeration identifies different writing systems.

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

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

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

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

An enumeration specifying capitalization variant of the font.

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

WrapMode describes how to wrap the lines of a Layout to the desired width.

Constants

The scale factor for one magnification step (1.2).

The scale factor for normal size (1.0).

The scale factor for one shrinking step (1 / 1.2).

The scale factor for three magnification steps (1.2 * 1.2 * 1.2).

The scale factor for three shrinking steps (1 / (1.2 * 1.2 * 1.2)).

The scale factor for two magnification steps (1.2 * 1.2).

The scale factor for two shrinking steps (1 / (1.2 * 1.2)).

Statics

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

Functions

Converts extents from Pango units to device units.

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

Locates a paragraph boundary in text.

Checks if a character that should not be normally rendered.

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

Like [itemize()][crate::itemize()], but with an explicitly specified base direction.

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

Parses a font stretch.

Parses a font style.

Parses a font variant.

Parses a font weight.

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

Reorder items from logical order to visual order.

Convert the characters in text into glyphs.

Convert the characters in text into glyphs.

Convert the characters in text into glyphs.

Determines the inherent direction of a character.

Converts a floating-point number to Pango units.

Converts a number in Pango units to floating-point.

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

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

Returns the version of Pango available at run-time.

Type Definitions