- Determines possible line, word, and character breaks for a string of Unicode text.
Pango.get_log_attrs(text, level, language)
- Computes a Pango::LogAttr? for each character in text. The return value(Pango::LogAttr?s array must have one Pango::LogAttr? for each position in text; if text contains N characters, it has N+1 positions, including the last position at the end of the text. text should be an entire paragraph; logical attributes can't be computed without context (for example you need to see spaces on either side of a word to know the word is a word).
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 paragraph_delimiter_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
- Returns: [paragraph_delimiter_index, next_paragraph_start]:
- paragraph_delimiter_index : index of delimiter
- next_paragraph_start: start of next paragraph
- Given a segment of text and the corresponding Pango::Analysis returned from Pango::Context#itemize, convert the characters into glyphs. You may also pass in only a substring of the item from Pango::Context#itemize.
Pango.parse_markup(markup_text, accel_marker = nil)
- Parses marked-up text (see markup format) to create a plaintext string and an attribute list. If accel_marker is non-nil, the given character will mark the character following it as an accelerator. For example, the 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. Raises GLib::Error? if fails to parse markup_text.
- From an Array of items in logical order and the associated directional levels, produce a list in visual order. The original list is unmodified.
Determines the direction of a character; either Pango::DIRECTION_LTR, Pango::DIRECTION_RTL, or Pango::DIRECTION_NEUTRAL. Since 1.4
- ch: character to examine(Integer)
- Returns: the direction of a character, as used in the Unicode bidirectional algorithm. (PangoDirection)
Searches a string the first character that has a strong direction, according to the Unicode bidirectional algorithm.
- text: the text to process
- Returns: The direction corresponding to the first strong character. If no such character is found, then Pango::DIRECTION_NEUTRAL is returned.
Converts a dimension to device units.
- d: a dimension in Pango units.
- Returns: a converted device units.
A PangoAlignment describes how to align the lines of a Pango::Layout within the available space. If the Pango::Layout is set to justify using Pango::layout#justify=?, then this only has an effect for partial lines.
- Put all available space on the right
- Center the line within the available space
- Put all available space on the left
Used to indicate how well a font can represent a particular ISO 10646 character point for a particular script.
- The character is not representable with the font.
- The character is represented in a way that may be comprehensible but is not the correct graphical form. For instance, a Hangul character represented as a a sequence of Jamos, or a Latin transliteration of a Cyrillic word.
- The character is represented as basically the correct graphical form, but with a stylistic variant inappropriate for the current script.
- The character is represented as the correct graphical form.
The PangoDirection type represents a direction in the Unicode bidirectional algorithm; not every value in this enumeration makes sense for every usage of PangoDirection; for example, the return value of Pango.unichar_direction and Pango.find_base_dir cannot be Pango::DIRECTION_WEAK_LTR or Pango::DIRECTION_WEAK_RTL, since every character is either neutral or has a strong direction.
The Pango::DIRECTION_TTB_LTR, Pango::DIRECTION_TTB_RTL values come from an earlier interpretation of this enumeration as the writing direction of a block of text and are no longer used; See the Text module of the CSS3 spec for how vertical text is planned to be handled in a future version of Pango. The explanation of why Pango::DIRECTION_TTB_LTR is treated as Pango::DIRECTION_RTL can be found there as well.
- A strong left-to-right direction
- A strong right-to-left direction
- Deprecated value; treated the same as Pango::DIRECTION_RTL
- Deprecated value; treated the same as Pango::DIRECTION_LTR
- A weak left-to-right direction
- A weak right-to-left direction
- No direction specified
The PangoEllipsizeMode type 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.
- No ellipsization
- Omit characters at the start of the text
- Omit characters in the middle of the text
- Omit characters at the end of the text
The bits in a PangoFontMask correspond to fields in a Pango::FontDescription that have been set.
- the font family is specified.
- the font style is specified.
- the font variant is specified.
- the font weight is specified.
- the font stretch is specified.
- the font size is specified.
PangoRenderPart defines different items to render for such purposes as setting colors. Since 2.8
- the text itself
- the area behind the text
- strikethrough lines
- 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).
An enumeration specifying the width of the font relative to other designs within a family.
- the normal width
An enumeration specifying the various slant styles possible for a font.
- the font is upright.
- the font is slanted, but in a roman style.
- the font is slanted in an italic style.
A PangoTabAlign specifies where a tab stop appears relative to the text.
- the tab stop appears to the left of the text.
the PangoUnderline enumeration is used to specify whether text should be underlined, and if so, the type of underlining.
- no underline should be drawn.
- a single underline should be drawn.
- a double underline should be drawn.
- a single underline should be drawn at a position beneath the ink extents of the text being underlined. This should be used only for underlining single characters, such as for keyboard accelerators. Pango::UNDERLINE_SINGLE should be used for extended portions of text.
- a wavy underline should be drawn below. This underline is typically used to indicate an error such as a possilble mispelling; in some cases an contrasting color may automatically be used. Pango 1.4
An enumeration specifying capitalization variant of the font.
- A normal font.
- A font with the lower case characters replaced by smaller variants of the capital characters.
An enumeration specifying the weight (boldness) of a font. This is a numerical value ranging from 100 to 900, but there are some predefined values:
- the ultralight weight (= 200)
- the light weight (=300)
- the default weight (= 400)
- a weight intermediate between normal and bold (=600)
- the bold weight (= 700)
- the ultrabold weight (= 800)
- the heavy weight (= 900)
A PangoWrapMode describes how to wrap the lines of a Pango::Layout to the desired width.
- wrap lines at word boundaries.
- wrap lines at character boundaries.
- wrap lines at word boundaries, but fall back to character boundaries if there is not enough space for a full word.
The PangoScript enumeration identifies different writing systems. The values correspond to the names defined in the Unicode standard. (See Unicode Standard Annex 24: Script names).
- a value never used for any unicode character
- a character used by multiple different scripts
- a mark glyph that takes its script from the base glyph to which it is attached.
- The Pango::SCALE represents the scale between dimensions used for Pango distances and device units. (The definition of device units is dependent on the output device; it will typically be pixels for a screen, and points for a printer.) Pango::SCALE is currently 1024, but this may be changed in the future. When setting font sizes, device units are always considered to be points (as in "12 point font"), rather than pixels.
- Error log domain.
- Compiled pango version [major, minor, micro]