Details
struct PangoContext
The PangoContext structure stores global information
used to control the itemization process. It contains
the following fields:
struct PangoItem
The PangoItem structure stores information about
a segment of text. It contains the following fields:
struct PangoAnalysis
The PangoAnalysis structure stores information about
the properties of a segment of text. It has the following
fields:
struct PangoLangRange
The PangoLangRange structure stores language tagging
information for a range of character positions of text.
It contains the following fields:
enum PangoDirection
typedef enum {
PANGO_DIRECTION_LTR,
PANGO_DIRECTION_RTL,
PANGO_DIRECTION_TTB_LTR,
PANGO_DIRECTION_TTB_RTL
} PangoDirection; |
The PangoDirection type represents the direction of writing
for text.
PANGO_TYPE_DIRECTION
#define PANGO_TYPE_DIRECTION (pango_direction_get_type()) |
pango_itemize ()
Breaks a piece of text into segments with consistent
directional level and shaping engine. Each byte of text will
be contained in exactly one of the items in the returned list;
the generated list of items will be in logical order (the start
offsets of the items are ascending).
cached_iter should be an iterator over attrs currently positioned at a
range before or containing start_index; cached_iter will be advanced to
the range covering the position just after start_index + length.
(i.e. if itemizing in a loop, just keep passing in the same cached_iter).
pango_item_free ()
Free a PangoItem and all associated memory.
pango_item_copy ()
Copy an existing PangoItem structure.
pango_item_new ()
Creates a new PangoItem structure initialized to default values.
pango_item_split ()
Modifies orig to cover only the text after split_index, and
returns a new item that covers the text before split_index that
used to be in orig. You can think of split_index as the length of
the returned item. split_index may not be 0, and it may not be
greater than or equal to the length of orig (that is, there must
be at least one byte assigned to each item, you can't create a
zero-length item). split_offset is the length of the first item in
chars, and must be provided because the text used to generate the
item isn't available, so pango_item_split() can't count the char
length of the split items itself.
pango_reorder_items ()
GList* pango_reorder_items (GList *logical_items); |
From a list of items in logical order and the associated
directional levels, produce a list in visual order.
The original list is unmodified.
pango_context_new ()
Creates a new PangoContext initialized to default value.
pango_context_add_font_map ()
Add a font map to the list of font maps that are searched for fonts
when fonts are looked-up in this context.
pango_context_get_font_description ()
Retrieve the default font description for the context.
pango_context_set_font_description ()
Set the default font description for the context
pango_context_get_base_dir ()
Retrieves the base direction for the context.
pango_context_set_base_dir ()
Sets the base direction for the context.
pango_context_load_font ()
Loads the font in one of the fontmaps in the context
that is the closest match for desc.
pango_context_list_families ()
void pango_context_list_families (PangoContext *context,
gchar ***families,
int *n_families); |
List all families for a context.
pango_context_list_fonts ()
Lists all fonts in all fontmaps for this context, or all
fonts in a particular family.
pango_break ()
Determines possible line, word, and character breaks
for a string of Unicode text.
pango_get_log_attrs ()
void pango_get_log_attrs (const char *text,
int length,
int level,
PangoLanguage *language,
PangoLogAttr *log_attrs); |
Computes a PangoLogAttr for each character in text
pango_find_paragraph_boundary ()
void pango_find_paragraph_boundary (const gchar *text,
gint length,
gint *paragraph_delimiter_index,
gint *next_paragraph_start); |
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 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).
pango_default_break ()
This is the default break algorithm, used if no language
engine overrides it. Normally you should use pango_break()
instead; this function is mostly useful for chaining up
from a language engine override. Unlike pango_break(),
analysis can be NULL, but only do that if you know what
you're doing. (If you need an analysis to pass to pango_break(),
you need to pango_itemize() or use pango_get_log_attrs().)
struct PangoLogAttr
The PangoLogAttr structure stores information
about the attributes of a single character.
pango_shape ()
Given a segment of text and the corresponding
PangoAnalysis structure returned from pango_itemize(),
convert the characters into glyphs. You may also pass
in only a substring of the item from pango_itemize().