RGtk2 (version 2.20.31)

pango-Text-Processing: Rendering

Description

Functions to run the rendering pipeline

Arguments

Methods and Functions

pangoItemize(context, text, start.index, length, attrs, cached.iter = NULL) pangoItemizeWithBaseDir(context, base.dir, text, start.index, length, attrs, cached.iter = NULL) pangoItemCopy(item) pangoItemNew() pangoItemSplit(orig, split.index, split.offset) pangoReorderItems(logical.items) pangoContextSetFontMap(object, font.map) pangoContextGetFontMap(object) pangoContextGetFontDescription(object) pangoContextSetFontDescription(object, desc) pangoContextGetLanguage(object) pangoContextSetLanguage(object, language) pangoContextGetBaseDir(object) pangoContextSetBaseDir(object, direction) pangoContextGetBaseGravity(object) pangoContextSetBaseGravity(object, gravity) pangoContextGetGravity(object) pangoContextGetGravityHint(object) pangoContextSetGravityHint(object, hint) pangoContextGetMatrix(object) pangoContextSetMatrix(object, matrix) pangoContextLoadFont(object, desc) pangoContextLoadFontset(object, desc, language) pangoContextGetMetrics(object, desc, language = NULL) pangoContextListFamilies(object) pangoBreak(text, analysis) pangoGetLogAttrs(text, level, language) pangoFindParagraphBoundary(text, length = -1) pangoShape(text, analysis, glyphs)

Hierarchy

GObject
   +----PangoContext

Detailed Description

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.

Structures

PangoContext
The PangoContext structure stores global information used to control the itemization process.
PangoItem
The PangoItem structure stores information about a segment of text. It contains the following fields:
offset
[integer] the offset of the segment from the beginning of the string in bytes.
length
[integer] the length of the segment in bytes.
numChars
[integer] the length of the segment in characters.
analysis
[PangoAnalysis] the properties of the segment.
PangoAnalysis
The PangoAnalysis structure stores information about the properties of a segment of text. It has the following fields:
font
[PangoFont] the engine for doing rendering-system-dependent processing.
level
[raw] the engine for doing rendering-system-independent processing.
language
[PangoLanguage] the font for this segment.
extraAttrs
[list] the bidirectional level for this segment.
PangoLogAttr
The PangoLogAttr structure stores information about the attributes of a single character.
isLineBreak
[numeric] if set, can break line in front of character
isMandatoryBreak
[numeric] if set, must break line in front of character
isCharBreak
[numeric] if set, can break here when doing character wrapping
isWhite
[numeric] is whitespace character
isCursorPosition
[numeric] if set, cursor can appear in front of character. i.e. this is a grapheme boundary, or the first character in the text. This flag implements Unicode's Grapheme Cluster Boundaries (http://www.unicode.org/reports/tr29/) semantics.
isWordStart
[numeric] is first character in a word
isWordEnd
[numeric] is first non-word char after a word Note that in degenerate cases, you could have both is.word.start and is.word.end set for some character.
isSentenceBoundary
[numeric] is a sentence boundary. There are two ways to divide sentences. The first assigns all inter-sentence whitespace/control/format chars to some sentence, so all chars are in some sentence; is.sentence.boundary denotes the boundaries there. The second way doesn't assign between-sentence spaces, etc. to any sentence, so is.sentence.start/is.sentence.end mark the boundaries of those sentences.
isSentenceStart
[numeric] is first character in a sentence
isSentenceEnd
[numeric] is first char after a sentence. Note that in degenerate cases, you could have both is.sentence.start and is.sentence.end set for some character. (e.g. no space after a period, so the next sentence starts right away)
backspaceDeletesCharacter
[numeric] if set, backspace deletes one character rather than the entire grapheme cluster. This field is only meaningful on grapheme boundaries (where is.cursor.position is set). In some languages, the full grapheme (e.g. letter + diacritics) is considered a unit, while in others, each decomposed character in the grapheme is a unit. In the default implementation of pangoBreak, this bit is set on all grapheme boundaries except those following Latin, Cyrillic or Greek base characters.

References

http://library.gnome.org/devel//pango/pango-Text-Processing.html