docs/ 0000775 0001750 0001750 00000000000 13751777766 011670 5 ustar mclasen mclasen docs/xml/ 0000775 0001750 0001750 00000000000 13751777750 012461 5 ustar mclasen mclasen docs/xml/gtkdocentities.ent 0000664 0001750 0001750 00000000540 13751777735 016213 0 ustar mclasen mclasen
docs/xml/main.xml 0000664 0001750 0001750 00000215771 13751777747 014152 0 ustar mclasen mclasen
]>
Rendering
3
PANGO Library
Rendering
Functions to run the rendering pipeline
Functions
GList *
pango_itemize ()
GList *
pango_itemize_with_base_dir ()
void
pango_item_free ()
PangoItem *
pango_item_copy ()
PangoItem *
pango_item_new ()
PangoItem *
pango_item_split ()
void
pango_item_apply_attrs ()
GList *
pango_reorder_items ()
void
pango_break ()
void
pango_get_log_attrs ()
void
pango_find_paragraph_boundary ()
void
pango_default_break ()
void
pango_tailor_break ()
void
pango_shape ()
void
pango_shape_full ()
void
pango_shape_with_flags ()
Types and Values
structPangoItem
structPangoAnalysis
#definePANGO_ANALYSIS_FLAG_CENTERED_BASELINE
#definePANGO_ANALYSIS_FLAG_IS_ELLIPSIS
#definePANGO_ANALYSIS_FLAG_NEED_HYPHEN
PangoLogAttr
enumPangoShapeFlags
Object Hierarchy
GBoxed
╰── PangoItem
GFlags
╰── PangoShapeFlags
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.
Functions
pango_itemize ()
pango_itemize
GList *
pango_itemize (PangoContext *context,
const char *text,
int start_index,
int length,
PangoAttrList *attrs,
PangoAttrIterator *cached_iter);
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
).
Parameters
context
a structure holding information that affects
the itemization process.
text
the text to itemize. Must be valid UTF-8
start_index
first byte in text
to process
length
the number of bytes (not characters) to process
after start_index
.
This must be >= 0.
attrs
the set of attributes that apply to text
.
cached_iter
Cached attribute iterator, or NULL.
[allow-none]
Returns
a GList of PangoItem
structures. The items should be freed using pango_item_free()
probably in combination with g_list_foreach(), and the list itself
using g_list_free().
[transfer full][element-type Pango.Item]
pango_itemize_with_base_dir ()
pango_itemize_with_base_dir
GList *
pango_itemize_with_base_dir (PangoContext *context,
PangoDirection base_dir,
const char *text,
int start_index,
int length,
PangoAttrList *attrs,
PangoAttrIterator *cached_iter);
Like pango_itemize(), but the base direction to use when
computing bidirectional levels (see pango_context_set_base_dir()),
is specified explicitly rather than gotten from the PangoContext.
Parameters
context
a structure holding information that affects
the itemization process.
base_dir
base direction to use for bidirectional processing
text
the text to itemize.
start_index
first byte in text
to process
length
the number of bytes (not characters) to process
after start_index
. This must be >= 0.
attrs
the set of attributes that apply to text
.
cached_iter
Cached attribute iterator, or NULL.
[allow-none]
Returns
a GList of
PangoItem structures. The items should be freed using
pango_item_free() probably in combination with
g_list_foreach(), and the list itself using g_list_free().
[transfer full][element-type Pango.Item]
Since: 1.4
pango_item_free ()
pango_item_free
void
pango_item_free (PangoItem *item);
Free a PangoItem and all associated memory.
Parameters
item
a PangoItem, may be NULL.
[nullable]
pango_item_copy ()
pango_item_copy
PangoItem *
pango_item_copy (PangoItem *item);
Copy an existing PangoItem structure.
Parameters
item
a PangoItem, may be NULL.
[nullable]
Returns
the newly allocated PangoItem, which
should be freed with pango_item_free(), or NULL if
item
was NULL.
[nullable]
pango_item_new ()
pango_item_new
PangoItem *
pango_item_new (void);
Creates a new PangoItem structure initialized to default values.
Returns
the newly allocated PangoItem, which should
be freed with pango_item_free().
pango_item_split ()
pango_item_split
PangoItem *
pango_item_split (PangoItem *orig,
int split_index,
int split_offset);
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.
Parameters
orig
a PangoItem
split_index
byte index of position to split item, relative to the start of the item
split_offset
number of chars between start of orig
and split_index
Returns
new item representing text before split_index
, which
should be freed with pango_item_free().
pango_item_apply_attrs ()
pango_item_apply_attrs
void
pango_item_apply_attrs (PangoItem *item,
PangoAttrIterator *iter);
Add attributes to a PangoItem. The idea is that you have
attributes that don't affect itemization, such as font features,
so you filter them out using pango_attr_list_filter(), itemize
your text, then reapply the attributes to the resulting items
using this function.
The iter
should be positioned before the range of the item,
and will be advanced past it. This function is meant to be called
in a loop over the items resulting from itemization, while passing
the iter to each call.
Parameters
item
a PangoItem
iter
a PangoAttrIterator
Since: 1.44
pango_reorder_items ()
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.
Parameters
logical_items
a GList of PangoItem in logical order.
[element-type Pango.Item]
Returns
a GList
of PangoItem structures in visual order.
(Please open a bug if you use this function.
It is not a particularly convenient interface, and the code
is duplicated elsewhere in Pango for that reason.).
[transfer full][element-type Pango.Item]
pango_break ()
pango_break
void
pango_break (const gchar *text,
int length,
PangoAnalysis *analysis,
PangoLogAttr *attrs,
int attrs_len);
pango_break has been deprecated since version 1.44 and should not be used in newly-written code. Use pango_default_break() and pango_tailor_break()
Determines possible line, word, and character breaks
for a string of Unicode text with a single analysis.
For most purposes you may want to use pango_get_log_attrs().
Parameters
text
the text to process. Must be valid UTF-8
length
length of text
in bytes (may be -1 if text
is nul-terminated)
analysis
PangoAnalysis structure from pango_itemize()
attrs
an array to store character
information in.
[array length=attrs_len]
attrs_len
size of the array passed as attrs
pango_get_log_attrs ()
pango_get_log_attrs
void
pango_get_log_attrs (const char *text,
int length,
int level,
PangoLanguage *language,
PangoLogAttr *log_attrs,
int attrs_len);
Computes a PangoLogAttr for each character in text
. The log_attrs
array must have one PangoLogAttr 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).
Parameters
text
text to process. Must be valid UTF-8
length
length in bytes of text
level
embedding level, or -1 if unknown
language
language tag
log_attrs
array with one PangoLogAttr
per character in text
, plus one extra, to be filled in.
[array length=attrs_len]
attrs_len
length of log_attrs
array
pango_find_paragraph_boundary ()
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 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).
Parameters
text
UTF-8 text
length
length of text
in bytes, or -1 if nul-terminated
paragraph_delimiter_index
return location for index of
delimiter.
[out]
next_paragraph_start
return location for start of next
paragraph.
[out]
pango_default_break ()
pango_default_break
void
pango_default_break (const gchar *text,
int length,
PangoAnalysis *analysis,
PangoLogAttr *attrs,
int attrs_len);
This is the default break algorithm. It applies Unicode
rules without language-specific tailoring, therefore
the analyis
argument is unused and can be NULL.
See pango_tailor_break() for language-specific breaks.
Parameters
text
text to break. Must be valid UTF-8
length
length of text in bytes (may be -1 if text
is nul-terminated)
analysis
a PangoAnalysis for the text
.
[nullable]
attrs
logical attributes to fill in
attrs_len
size of the array passed as attrs
pango_tailor_break ()
pango_tailor_break
void
pango_tailor_break (const char *text,
int length,
PangoAnalysis *analysis,
int offset,
PangoLogAttr *log_attrs,
int log_attrs_len);
Apply language-specific tailoring to the breaks in
log_attrs
, which are assumed to have been produced
by pango_default_break().
If offset
is not -1, it is used to apply attributes
from analysis
that are relevant to line breaking.
Parameters
text
text to process. Must be valid UTF-8
length
length in bytes of text
analysis
PangoAnalysis structure from pango_itemize() for text
offset
Byte offset of text
from the beginning of the
paragraph, or -1 to ignore attributes from analysis
log_attrs
array with one PangoLogAttr
per character in text
, plus one extra, to be filled in.
[array length=log_attrs_len]
log_attrs_len
length of log_attrs
array
Since: 1.44
pango_shape ()
pango_shape
void
pango_shape (const char *text,
int length,
const PangoAnalysis *analysis,
PangoGlyphString *glyphs);
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().
It is recommended that you use pango_shape_full() instead, since
that API allows for shaping interaction happening across text item
boundaries.
Note that the extra attributes in the analyis
that is returned from
pango_itemize() have indices that are relative to the entire paragraph,
so you need to subtract the item offset from their indices before
calling pango_shape().
Parameters
text
the text to process
length
the length (in bytes) of text
analysis
PangoAnalysis structure from pango_itemize()
glyphs
glyph string in which to store results
pango_shape_full ()
pango_shape_full
void
pango_shape_full (const char *item_text,
int item_length,
const char *paragraph_text,
int paragraph_length,
const PangoAnalysis *analysis,
PangoGlyphString *glyphs);
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().
This is similar to pango_shape(), except it also can optionally take
the full paragraph text as input, which will then be used to perform
certain cross-item shaping interactions. If you have access to the broader
text of which item_text
is part of, provide the broader text as
paragraph_text
. If paragraph_text
is NULL, item text is used instead.
Note that the extra attributes in the analyis
that is returned from
pango_itemize() have indices that are relative to the entire paragraph,
so you do not pass the full paragraph text as paragraph_text
, you need
to subtract the item offset from their indices before calling pango_shape_full().
Parameters
item_text
valid UTF-8 text to shape.
item_length
the length (in bytes) of item_text
. -1 means nul-terminated text.
paragraph_text
text of the paragraph (see details). May be NULL.
[allow-none]
paragraph_length
the length (in bytes) of paragraph_text
. -1 means nul-terminated text.
analysis
PangoAnalysis structure from pango_itemize().
glyphs
glyph string in which to store results.
Since: 1.32
pango_shape_with_flags ()
pango_shape_with_flags
void
pango_shape_with_flags (const char *item_text,
int item_length,
const char *paragraph_text,
int paragraph_length,
const PangoAnalysis *analysis,
PangoGlyphString *glyphs,
PangoShapeFlags flags);
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().
This is similar to pango_shape_full(), except it also takes
flags that can influence the shaping process.
Note that the extra attributes in the analyis
that is returned from
pango_itemize() have indices that are relative to the entire paragraph,
so you do not pass the full paragraph text as paragraph_text
, you need
to subtract the item offset from their indices before calling
pango_shape_with_flags().
Parameters
item_text
valid UTF-8 text to shape
item_length
the length (in bytes) of item_text
.
-1 means nul-terminated text.
paragraph_text
text of the paragraph (see details).
May be NULL.
[allow-none]
paragraph_length
the length (in bytes) of paragraph_text
.
-1 means nul-terminated text.
analysis
PangoAnalysis structure from pango_itemize()
glyphs
glyph string in which to store results
flags
flags influencing the shaping process
Since: 1.44
Types and Values
struct PangoItem
PangoItem
struct PangoItem {
gint offset;
gint length;
gint num_chars;
PangoAnalysis analysis;
};
The PangoItem structure stores information about a segment of text.
Members
gint offset;
byte offset of the start of this item in text.
gint length;
length of this item in bytes.
gint num_chars;
number of Unicode characters in the item.
PangoAnalysis analysis;
analysis results for the item.
struct PangoAnalysis
PangoAnalysis
struct PangoAnalysis {
PangoEngineShape *shape_engine;
PangoEngineLang *lang_engine;
PangoFont *font;
guint8 level;
guint8 gravity;
guint8 flags;
guint8 script;
PangoLanguage *language;
GSList *extra_attrs;
};
The PangoAnalysis structure stores information about
the properties of a segment of text.
Members
PangoEngineShape *shape_engine;
unused
PangoEngineLang *lang_engine;
unused
PangoFont *font;
the font for this segment.
guint8 level;
the bidirectional level for this segment.
guint8 gravity;
the glyph orientation for this segment (A PangoGravity).
guint8 flags;
boolean flags for this segment (Since: 1.16).
guint8 script;
the detected script for this segment (A PangoScript) (Since: 1.18).
PangoLanguage *language;
the detected language for this segment.
GSList *;
extra attributes for this segment.
PANGO_ANALYSIS_FLAG_CENTERED_BASELINE
PANGO_ANALYSIS_FLAG_CENTERED_BASELINE
#define PANGO_ANALYSIS_FLAG_CENTERED_BASELINE (1 << 0)
Whether the segment should be shifted to center around the baseline.
Used in vertical writing directions mostly.
Since: 1.16
PANGO_ANALYSIS_FLAG_IS_ELLIPSIS
PANGO_ANALYSIS_FLAG_IS_ELLIPSIS
#define PANGO_ANALYSIS_FLAG_IS_ELLIPSIS (1 << 1)
This flag is used to mark runs that hold ellipsized text,
in an ellipsized layout.
Since: 1.36.7
PANGO_ANALYSIS_FLAG_NEED_HYPHEN
PANGO_ANALYSIS_FLAG_NEED_HYPHEN
#define PANGO_ANALYSIS_FLAG_NEED_HYPHEN (1 << 2)
This flag tells Pango to add a hyphen at the end of the
run during shaping.
Since: 1.44
PangoLogAttr
PangoLogAttr
typedef struct {
guint is_line_break : 1;
guint is_mandatory_break : 1;
guint is_char_break : 1;
guint is_white : 1;
guint is_cursor_position : 1;
guint is_word_start : 1;
guint is_word_end : 1;
guint is_sentence_boundary : 1;
guint is_sentence_start : 1;
guint is_sentence_end : 1;
guint backspace_deletes_character : 1;
guint is_expandable_space : 1;
guint is_word_boundary : 1;
} PangoLogAttr;
The PangoLogAttr structure stores information
about the attributes of a single character.
Members
guint is_line_break : 1;
if set, can break line in front of character
guint is_mandatory_break : 1;
if set, must break line in front of character
guint is_char_break : 1;
if set, can break here when doing character wrapping
guint is_white : 1;
is whitespace character
guint is_cursor_position : 1;
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 semantics.
guint is_word_start : 1;
is first character in a word
guint is_word_end : 1;
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.
guint is_sentence_boundary : 1;
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.
guint is_sentence_start : 1;
is first character in a sentence
guint is_sentence_end : 1;
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)
guint backspace_deletes_character : 1;
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 pango_break(), this
bit is set on all grapheme boundaries except
those following Latin, Cyrillic or Greek base characters.
guint is_expandable_space : 1;
is a whitespace character that can possibly be
expanded for justification purposes. (Since: 1.18)
guint is_word_boundary : 1;
is a word boundary, as defined by UAX29.
More specifically, means that this is not a position in the middle
of a word. For example, both sides of a punctuation mark are
considered word boundaries. This flag is particularly useful when
selecting text word-by-word.
This flag implements Unicode's
Word
Boundaries semantics. (Since: 1.22)
enum PangoShapeFlags
PangoShapeFlags
Flags influencing the shaping process.
These can be passed to pango_shape_with_flags().
Members
PANGO_SHAPE_NONE
Default value.
PANGO_SHAPE_ROUND_POSITIONS
Round glyph positions
and widths to whole device units. This option should
be set if the target renderer can't do subpixel
positioning of glyphs.
docs/xml/context.xml 0000664 0001750 0001750 00000151565 13751777747 014712 0 ustar mclasen mclasen
]>
Contexts
3
PANGO Library
Contexts
Global context object
Functions
PangoContext *
pango_context_new ()
void
pango_context_changed ()
guint
pango_context_get_serial ()
void
pango_context_set_font_map ()
PangoFontMap *
pango_context_get_font_map ()
PangoFontDescription *
pango_context_get_font_description ()
void
pango_context_set_font_description ()
PangoLanguage *
pango_context_get_language ()
void
pango_context_set_language ()
PangoDirection
pango_context_get_base_dir ()
void
pango_context_set_base_dir ()
PangoGravity
pango_context_get_base_gravity ()
void
pango_context_set_base_gravity ()
PangoGravity
pango_context_get_gravity ()
PangoGravityHint
pango_context_get_gravity_hint ()
void
pango_context_set_gravity_hint ()
const PangoMatrix *
pango_context_get_matrix ()
void
pango_context_set_matrix ()
gboolean
pango_context_get_round_glyph_positions ()
void
pango_context_set_round_glyph_positions ()
PangoFont *
pango_context_load_font ()
PangoFontset *
pango_context_load_fontset ()
PangoFontMetrics *
pango_context_get_metrics ()
void
pango_context_list_families ()
Types and Values
PangoContext
Object Hierarchy
GObject
╰── PangoContext
Description
The PangoContext structure stores global information
influencing Pango's operation, such as the fontmap used
to look up fonts, and default values such as the default
language, default gravity, or default font.
Functions
pango_context_new ()
pango_context_new
PangoContext *
pango_context_new (void);
Creates a new PangoContext initialized to default values.
This function is not particularly useful as it should always
be followed by a pango_context_set_font_map() call, and the
function pango_font_map_create_context() does these two steps
together and hence users are recommended to use that.
If you are using Pango as part of a higher-level system,
that system may have it's own way of create a PangoContext.
For instance, the GTK+ toolkit has, among others,
gdk_pango_context_get_for_screen(), and
gtk_widget_get_pango_context(). Use those instead.
Returns
the newly allocated PangoContext, which should
be freed with g_object_unref().
pango_context_changed ()
pango_context_changed
void
pango_context_changed (PangoContext *context);
Forces a change in the context, which will cause any PangoLayout
using this context to re-layout.
This function is only useful when implementing a new backend
for Pango, something applications won't do. Backends should
call this function if they have attached extra data to the context
and such data is changed.
Parameters
context
a PangoContext
Since: 1.32.4
pango_context_get_serial ()
pango_context_get_serial
guint
pango_context_get_serial (PangoContext *context);
Returns the current serial number of context
. The serial number is
initialized to an small number larger than zero when a new context
is created and is increased whenever the context is changed using any
of the setter functions, or the PangoFontMap it uses to find fonts has
changed. The serial may wrap, but will never have the value 0. Since it
can wrap, never compare it with "less than", always use "not equals".
This can be used to automatically detect changes to a PangoContext, and
is only useful when implementing objects that need update when their
PangoContext changes, like PangoLayout.
Parameters
context
a PangoContext
Returns
The current serial number of context
.
Since: 1.32.4
pango_context_set_font_map ()
pango_context_set_font_map
void
pango_context_set_font_map (PangoContext *context,
PangoFontMap *font_map);
Sets the font map to be searched when fonts are looked-up in this context.
This is only for internal use by Pango backends, a PangoContext obtained
via one of the recommended methods should already have a suitable font map.
Parameters
context
a PangoContext
font_map
the PangoFontMap to set.
pango_context_get_font_map ()
pango_context_get_font_map
PangoFontMap *
pango_context_get_font_map (PangoContext *context);
Gets the PangoFontMap used to look up fonts for this context.
Parameters
context
a PangoContext
Returns
the font map for the PangoContext.
This value is owned by Pango and should not be unreferenced.
[transfer none]
Since: 1.6
pango_context_get_font_description ()
pango_context_get_font_description
PangoFontDescription *
pango_context_get_font_description (PangoContext *context);
Retrieve the default font description for the context.
Parameters
context
a PangoContext
Returns
a pointer to the context's default font
description. This value must not be modified or freed.
[transfer none]
pango_context_set_font_description ()
pango_context_set_font_description
void
pango_context_set_font_description (PangoContext *context,
const PangoFontDescription *desc);
Set the default font description for the context
Parameters
context
a PangoContext
desc
the new pango font description
pango_context_get_language ()
pango_context_get_language
PangoLanguage *
pango_context_get_language (PangoContext *context);
Retrieves the global language tag for the context.
Parameters
context
a PangoContext
Returns
the global language tag.
pango_context_set_language ()
pango_context_set_language
void
pango_context_set_language (PangoContext *context,
PangoLanguage *language);
Sets the global language tag for the context. The default language
for the locale of the running process can be found using
pango_language_get_default().
Parameters
context
a PangoContext
language
the new language tag.
pango_context_get_base_dir ()
pango_context_get_base_dir
PangoDirection
pango_context_get_base_dir (PangoContext *context);
Retrieves the base direction for the context. See
pango_context_set_base_dir().
Parameters
context
a PangoContext
Returns
the base direction for the context.
pango_context_set_base_dir ()
pango_context_set_base_dir
void
pango_context_set_base_dir (PangoContext *context,
PangoDirection direction);
Sets the base direction for the context.
The base direction is used in applying the Unicode bidirectional
algorithm; if the direction
is PANGO_DIRECTION_LTR or
PANGO_DIRECTION_RTL, then the value will be used as the paragraph
direction in the Unicode bidirectional algorithm. A value of
PANGO_DIRECTION_WEAK_LTR or PANGO_DIRECTION_WEAK_RTL is used only
for paragraphs that do not contain any strong characters themselves.
Parameters
context
a PangoContext
direction
the new base direction
pango_context_get_base_gravity ()
pango_context_get_base_gravity
PangoGravity
pango_context_get_base_gravity (PangoContext *context);
Retrieves the base gravity for the context. See
pango_context_set_base_gravity().
Parameters
context
a PangoContext
Returns
the base gravity for the context.
Since: 1.16
pango_context_set_base_gravity ()
pango_context_set_base_gravity
void
pango_context_set_base_gravity (PangoContext *context,
PangoGravity gravity);
Sets the base gravity for the context.
The base gravity is used in laying vertical text out.
Parameters
context
a PangoContext
gravity
the new base gravity
Since: 1.16
pango_context_get_gravity ()
pango_context_get_gravity
PangoGravity
pango_context_get_gravity (PangoContext *context);
Retrieves the gravity for the context. This is similar to
pango_context_get_base_gravity(), except for when the base gravity
is PANGO_GRAVITY_AUTO for which pango_gravity_get_for_matrix() is used
to return the gravity from the current context matrix.
Parameters
context
a PangoContext
Returns
the resolved gravity for the context.
Since: 1.16
pango_context_get_gravity_hint ()
pango_context_get_gravity_hint
PangoGravityHint
pango_context_get_gravity_hint (PangoContext *context);
Retrieves the gravity hint for the context. See
pango_context_set_gravity_hint() for details.
Parameters
context
a PangoContext
Returns
the gravity hint for the context.
Since: 1.16
pango_context_set_gravity_hint ()
pango_context_set_gravity_hint
void
pango_context_set_gravity_hint (PangoContext *context,
PangoGravityHint hint);
Sets the gravity hint for the context.
The gravity hint is used in laying vertical text out, and is only relevant
if gravity of the context as returned by pango_context_get_gravity()
is set PANGO_GRAVITY_EAST or PANGO_GRAVITY_WEST.
Parameters
context
a PangoContext
hint
the new gravity hint
Since: 1.16
pango_context_get_matrix ()
pango_context_get_matrix
const PangoMatrix *
pango_context_get_matrix (PangoContext *context);
Gets the transformation matrix that will be applied when
rendering with this context. See pango_context_set_matrix().
Parameters
context
a PangoContext
Returns
the matrix, or NULL if no matrix has
been set (which is the same as the identity matrix). The returned
matrix is owned by Pango and must not be modified or freed.
[nullable]
Since: 1.6
pango_context_set_matrix ()
pango_context_set_matrix
void
pango_context_set_matrix (PangoContext *context,
const PangoMatrix *matrix);
Sets the transformation matrix that will be applied when rendering
with this context. Note that reported metrics are in the user space
coordinates before the application of the matrix, not device-space
coordinates after the application of the matrix. So, they don't scale
with the matrix, though they may change slightly for different
matrices, depending on how the text is fit to the pixel grid.
Parameters
context
a PangoContext
matrix
a PangoMatrix, or NULL to unset any existing
matrix. (No matrix set is the same as setting the identity matrix.).
[allow-none]
Since: 1.6
pango_context_get_round_glyph_positions ()
pango_context_get_round_glyph_positions
gboolean
pango_context_get_round_glyph_positions
(PangoContext *context);
Returns whether font rendering with this context should
round glyph positions and widths.
Parameters
context
a PangoContext
Since: 1.44
pango_context_set_round_glyph_positions ()
pango_context_set_round_glyph_positions
void
pango_context_set_round_glyph_positions
(PangoContext *context,
gboolean round_positions);
Sets whether font rendering with this context should
round glyph positions and widths to integral positions,
in device units.
This is useful when the renderer can't handle subpixel
positioning of glyphs.
The default value is to round glyph positions, to remain
compatible with previous Pango behavior.
Parameters
context
a PangoContext
round_positions
whether to round glyph positions
Since: 1.44
pango_context_load_font ()
pango_context_load_font
PangoFont *
pango_context_load_font (PangoContext *context,
const PangoFontDescription *desc);
Loads the font in one of the fontmaps in the context
that is the closest match for desc
.
Parameters
context
a PangoContext
desc
a PangoFontDescription describing the font to load
Returns
the newly allocated PangoFont
that was loaded, or NULL if no font matched.
[transfer full][nullable]
pango_context_load_fontset ()
pango_context_load_fontset
PangoFontset *
pango_context_load_fontset (PangoContext *context,
const PangoFontDescription *desc,
PangoLanguage *language);
Load a set of fonts in the context that can be used to render
a font matching desc
.
Parameters
context
a PangoContext
desc
a PangoFontDescription describing the fonts to load
language
a PangoLanguage the fonts will be used for
Returns
the newly allocated
PangoFontset loaded, or NULL if no font matched.
[transfer full][nullable]
pango_context_get_metrics ()
pango_context_get_metrics
PangoFontMetrics *
pango_context_get_metrics (PangoContext *context,
const PangoFontDescription *desc,
PangoLanguage *language);
Get overall metric information for a particular font
description. Since the metrics may be substantially different for
different scripts, a language tag can be provided to indicate that
the metrics should be retrieved that correspond to the script(s)
used by that language.
The PangoFontDescription is interpreted in the same way as
by pango_itemize(), and the family name may be a comma separated
list of figures. If characters from multiple of these families
would be used to render the string, then the returned fonts would
be a composite of the metrics for the fonts loaded for the
individual families.
Parameters
context
a PangoContext
desc
a PangoFontDescription structure. NULL means that the
font description from the context will be used.
[allow-none]
language
language tag used to determine which script to get
the metrics for. NULL means that the language tag from the context
will be used. If no language tag is set on the context, metrics
for the default language (as determined by pango_language_get_default())
will be returned.
[allow-none]
Returns
a PangoFontMetrics object. The caller must call pango_font_metrics_unref()
when finished using the object.
pango_context_list_families ()
pango_context_list_families
void
pango_context_list_families (PangoContext *context,
PangoFontFamily ***families,
int *n_families);
List all families for a context.
Parameters
context
a PangoContext
families
location to store a pointer to
an array of PangoFontFamily *. This array should be freed
with g_free().
[out][array length=n_families][transfer container]
n_families
location to store the number of elements in descs
.
[out]
Types and Values
PangoContext
PangoContext
typedef struct _PangoContext PangoContext;
The PangoContext structure stores global information
used to control the itemization process.
docs/xml/glyphs.xml 0000664 0001750 0001750 00000410523 13751777747 014524 0 ustar mclasen mclasen
]>
Glyphs
3
PANGO Library
Glyphs
Structures for storing information about glyphs
Functions
#definePANGO_PIXELS()
#definePANGO_PIXELS_FLOOR()
#definePANGO_PIXELS_CEIL()
#definePANGO_UNITS_ROUND()
double
pango_units_to_double ()
int
pango_units_from_double ()
#definePANGO_ASCENT()
#definePANGO_DESCENT()
#definePANGO_LBEARING()
#definePANGO_RBEARING()
void
pango_extents_to_pixels ()
PangoMatrix *
pango_matrix_copy ()
void
pango_matrix_free ()
void
pango_matrix_translate ()
void
pango_matrix_scale ()
void
pango_matrix_rotate ()
void
pango_matrix_concat ()
void
pango_matrix_transform_point ()
void
pango_matrix_transform_distance ()
void
pango_matrix_transform_rectangle ()
void
pango_matrix_transform_pixel_rectangle ()
double
pango_matrix_get_font_scale_factor ()
void
pango_matrix_get_font_scale_factors ()
#definePANGO_GET_UNKNOWN_GLYPH()
PangoGlyphString *
pango_glyph_string_new ()
PangoGlyphString *
pango_glyph_string_copy ()
void
pango_glyph_string_set_size ()
void
pango_glyph_string_free ()
void
pango_glyph_string_extents ()
void
pango_glyph_string_extents_range ()
int
pango_glyph_string_get_width ()
void
pango_glyph_string_index_to_x ()
void
pango_glyph_string_x_to_index ()
void
pango_glyph_string_get_logical_widths ()
PangoGlyphItem *
pango_glyph_item_copy ()
void
pango_glyph_item_free ()
PangoGlyphItem *
pango_glyph_item_split ()
GSList *
pango_glyph_item_apply_attrs ()
void
pango_glyph_item_letter_space ()
void
pango_glyph_item_get_logical_widths ()
PangoGlyphItemIter *
pango_glyph_item_iter_copy ()
void
pango_glyph_item_iter_free ()
gboolean
pango_glyph_item_iter_init_start ()
gboolean
pango_glyph_item_iter_init_end ()
gboolean
pango_glyph_item_iter_next_cluster ()
gboolean
pango_glyph_item_iter_prev_cluster ()
Types and Values
#definePANGO_SCALE
structPangoRectangle
structPangoMatrix
#definePANGO_MATRIX_INIT
typedefPangoGlyph
#definePANGO_GLYPH_EMPTY
#definePANGO_GLYPH_INVALID_INPUT
#definePANGO_GLYPH_UNKNOWN_FLAG
structPangoGlyphInfo
structPangoGlyphGeometry
typedefPangoGlyphUnit
structPangoGlyphVisAttr
structPangoGlyphString
structPangoGlyphItem
structPangoGlyphItemIter
#definePANGO_TYPE_GLYPH_STRING
Object Hierarchy
GBoxed
├── PangoGlyphItem
├── PangoGlyphItemIter
├── PangoGlyphString
╰── PangoMatrix
Description
pango_shape() produces a string of glyphs which
can be measured or drawn to the screen. The following
structures are used to store information about
glyphs.
Functions
PANGO_PIXELS()
PANGO_PIXELS
#define PANGO_PIXELS(d) (((int)(d) + 512) >> 10)
Converts a dimension to device units by rounding.
Parameters
d
a dimension in Pango units.
Returns
rounded dimension in device units.
PANGO_PIXELS_FLOOR()
PANGO_PIXELS_FLOOR
#define PANGO_PIXELS_FLOOR(d) (((int)(d)) >> 10)
Converts a dimension to device units by flooring.
Parameters
d
a dimension in Pango units.
Returns
floored dimension in device units.
Since: 1.14
PANGO_PIXELS_CEIL()
PANGO_PIXELS_CEIL
#define PANGO_PIXELS_CEIL(d) (((int)(d) + 1023) >> 10)
Converts a dimension to device units by ceiling.
Parameters
d
a dimension in Pango units.
Returns
ceiled dimension in device units.
Since: 1.14
PANGO_UNITS_ROUND()
PANGO_UNITS_ROUND
#define PANGO_UNITS_ROUND(d)
Rounds a dimension to whole device units, but does not
convert it to device units.
Parameters
d
a dimension in Pango units.
Returns
rounded dimension in Pango units.
Since: 1.18
pango_units_to_double ()
pango_units_to_double
double
pango_units_to_double (int i);
Converts a number in Pango units to floating-point: divides
it by PANGO_SCALE.
Parameters
i
value in Pango units
Returns
the double value.
Since: 1.16
pango_units_from_double ()
pango_units_from_double
int
pango_units_from_double (double d);
Converts a floating-point number to Pango units: multiplies
it by PANGO_SCALE and rounds to nearest integer.
Parameters
d
double floating-point value
Returns
the value in Pango units.
Since: 1.16
PANGO_ASCENT()
PANGO_ASCENT
#define PANGO_ASCENT(rect) (-(rect).y)
Extracts the ascent from a PangoRectangle
representing glyph extents. The ascent is the distance from the
baseline to the highest point of the character. This is positive if the
glyph ascends above the baseline.
Parameters
rect
a PangoRectangle
PANGO_DESCENT()
PANGO_DESCENT
#define PANGO_DESCENT(rect) ((rect).y + (rect).height)
Extracts the descent from a PangoRectangle
representing glyph extents. The descent is the distance from the
baseline to the lowest point of the character. This is positive if the
glyph descends below the baseline.
Parameters
rect
a PangoRectangle
PANGO_LBEARING()
PANGO_LBEARING
#define PANGO_LBEARING(rect) ((rect).x)
Extracts the left bearing from a PangoRectangle
representing glyph extents. The left bearing is the distance from the
horizontal origin to the farthest left point of the character.
This is positive for characters drawn completely to the right of the
glyph origin.
Parameters
rect
a PangoRectangle
PANGO_RBEARING()
PANGO_RBEARING
#define PANGO_RBEARING(rect) ((rect).x + (rect).width)
Extracts the right bearing from a PangoRectangle
representing glyph extents. The right bearing is the distance from the
horizontal origin to the farthest right point of the character.
This is positive except for characters drawn completely to the left of the
horizontal origin.
Parameters
rect
a PangoRectangle
pango_extents_to_pixels ()
pango_extents_to_pixels
void
pango_extents_to_pixels (PangoRectangle *inclusive,
PangoRectangle *nearest);
Converts extents from Pango units to device units, dividing by the
PANGO_SCALE factor and performing rounding.
The inclusive
rectangle is converted by flooring the x/y coordinates and extending
width/height, such that the final rectangle completely includes the original
rectangle.
The nearest
rectangle is converted by rounding the coordinates
of the rectangle to the nearest device unit (pixel).
The rule to which argument to use is: if you want the resulting device-space
rectangle to completely contain the original rectangle, pass it in as inclusive
.
If you want two touching-but-not-overlapping rectangles stay
touching-but-not-overlapping after rounding to device units, pass them in
as nearest
.
Parameters
inclusive
rectangle to round to pixels inclusively, or NULL.
[allow-none]
nearest
rectangle to round to nearest pixels, or NULL.
[allow-none]
Since: 1.16
pango_matrix_copy ()
pango_matrix_copy
PangoMatrix *
pango_matrix_copy (const PangoMatrix *matrix);
Copies a PangoMatrix.
Parameters
matrix
a PangoMatrix, may be NULL.
[nullable]
Returns
the newly allocated PangoMatrix, which
should be freed with pango_matrix_free(), or NULL if
matrix
was NULL.
[nullable]
Since: 1.6
pango_matrix_free ()
pango_matrix_free
void
pango_matrix_free (PangoMatrix *matrix);
Free a PangoMatrix created with pango_matrix_copy().
Parameters
matrix
a PangoMatrix, may be NULL.
[nullable]
Since: 1.6
pango_matrix_translate ()
pango_matrix_translate
void
pango_matrix_translate (PangoMatrix *matrix,
double tx,
double ty);
Changes the transformation represented by matrix
to be the
transformation given by first translating by (tx
, ty
)
then applying the original transformation.
Parameters
matrix
a PangoMatrix
tx
amount to translate in the X direction
ty
amount to translate in the Y direction
Since: 1.6
pango_matrix_scale ()
pango_matrix_scale
void
pango_matrix_scale (PangoMatrix *matrix,
double scale_x,
double scale_y);
Changes the transformation represented by matrix
to be the
transformation given by first scaling by sx
in the X direction
and sy
in the Y direction then applying the original
transformation.
Parameters
matrix
a PangoMatrix
scale_x
amount to scale by in X direction
scale_y
amount to scale by in Y direction
Since: 1.6
pango_matrix_rotate ()
pango_matrix_rotate
void
pango_matrix_rotate (PangoMatrix *matrix,
double degrees);
Changes the transformation represented by matrix
to be the
transformation given by first rotating by degrees
degrees
counter-clockwise then applying the original transformation.
Parameters
matrix
a PangoMatrix
degrees
degrees to rotate counter-clockwise
Since: 1.6
pango_matrix_concat ()
pango_matrix_concat
void
pango_matrix_concat (PangoMatrix *matrix,
const PangoMatrix *new_matrix);
Changes the transformation represented by matrix
to be the
transformation given by first applying transformation
given by new_matrix
then applying the original transformation.
Parameters
matrix
a PangoMatrix
new_matrix
a PangoMatrix
Since: 1.6
pango_matrix_transform_point ()
pango_matrix_transform_point
void
pango_matrix_transform_point (const PangoMatrix *matrix,
double *x,
double *y);
Transforms the point (x
, y
) by matrix
.
Parameters
matrix
a PangoMatrix, or NULL.
[nullable]
x
in/out X position.
[inout]
y
in/out Y position.
[inout]
Since: 1.16
pango_matrix_transform_distance ()
pango_matrix_transform_distance
void
pango_matrix_transform_distance (const PangoMatrix *matrix,
double *dx,
double *dy);
Transforms the distance vector (dx
,dy
) by matrix
. This is
similar to pango_matrix_transform_point() except that the translation
components of the transformation are ignored. The calculation of
the returned vector is as follows:
dx2 = dx1 * xx + dy1 * xy;
dy2 = dx1 * yx + dy1 * yy;
Affine transformations are position invariant, so the same vector
always transforms to the same vector. If (x1
,y1
) transforms
to (x2
,y2
) then (x1
+dx1
,y1
+dy1
) will transform to
(x1
+dx2
,y1
+dy2
) for all values of x1
and x2
.
Parameters
matrix
a PangoMatrix, or NULL.
[nullable]
dx
in/out X component of a distance vector.
[inout]
dy
in/out Y component of a distance vector.
[inout]
Since: 1.16
pango_matrix_transform_rectangle ()
pango_matrix_transform_rectangle
void
pango_matrix_transform_rectangle (const PangoMatrix *matrix,
PangoRectangle *rect);
First transforms rect
using matrix
, then calculates the bounding box
of the transformed rectangle. The rectangle should be in Pango units.
This function is useful for example when you want to draw a rotated
PangoLayout
to an image buffer, and want to know how large the image
should be and how much you should shift the layout when rendering.
If you have a rectangle in device units (pixels), use
pango_matrix_transform_pixel_rectangle().
If you have the rectangle in Pango units and want to convert to
transformed pixel bounding box, it is more accurate to transform it first
(using this function) and pass the result to pango_extents_to_pixels(),
first argument, for an inclusive rounded rectangle.
However, there are valid reasons that you may want to convert
to pixels first and then transform, for example when the transformed
coordinates may overflow in Pango units (large matrix translation for
example).
Parameters
matrix
a PangoMatrix, or NULL.
[nullable]
rect
in/out bounding box in Pango units, or NULL.
[inout][allow-none]
Since: 1.16
pango_matrix_transform_pixel_rectangle ()
pango_matrix_transform_pixel_rectangle
void
pango_matrix_transform_pixel_rectangle
(const PangoMatrix *matrix,
PangoRectangle *rect);
First transforms the rect
using matrix
, then calculates the bounding box
of the transformed rectangle. The rectangle should be in device units
(pixels).
This function is useful for example when you want to draw a rotated
PangoLayout
to an image buffer, and want to know how large the image
should be and how much you should shift the layout when rendering.
For better accuracy, you should use pango_matrix_transform_rectangle() on
original rectangle in Pango units and convert to pixels afterward
using pango_extents_to_pixels()'s first argument.
Parameters
matrix
a PangoMatrix, or NULL.
[nullable]
rect
in/out bounding box in device units, or NULL.
[inout][allow-none]
Since: 1.16
pango_matrix_get_font_scale_factor ()
pango_matrix_get_font_scale_factor
double
pango_matrix_get_font_scale_factor (const PangoMatrix *matrix);
Returns the scale factor of a matrix on the height of the font.
That is, the scale factor in the direction perpendicular to the
vector that the X coordinate is mapped to. If the scale in the X
coordinate is needed as well, use pango_matrix_get_font_scale_factors().
Parameters
matrix
a PangoMatrix, may be NULL.
[allow-none]
Returns
the scale factor of matrix
on the height of the font,
or 1.0 if matrix
is NULL.
Since: 1.12
pango_matrix_get_font_scale_factors ()
pango_matrix_get_font_scale_factors
void
pango_matrix_get_font_scale_factors (const PangoMatrix *matrix,
double *xscale,
double *yscale);
Calculates the scale factor of a matrix on the width and height of the font.
That is, xscale
is the scale factor in the direction of the X coordinate,
and yscale
is the scale factor in the direction perpendicular to the
vector that the X coordinate is mapped to.
Note that output numbers will always be non-negative.
Parameters
matrix
a PangoMatrix, or NULL.
[nullable]
xscale
output scale factor in the x direction, or NULL.
[out][allow-none]
yscale
output scale factor perpendicular to the x direction, or NULL.
[out][allow-none]
Since: 1.38
PANGO_GET_UNKNOWN_GLYPH()
PANGO_GET_UNKNOWN_GLYPH
#define PANGO_GET_UNKNOWN_GLYPH(wc) ((PangoGlyph)(wc)|PANGO_GLYPH_UNKNOWN_FLAG)
The way this unknown glyphs are rendered is backend specific. For example,
a box with the hexadecimal Unicode code-point of the character written in it
is what is done in the most common backends.
Parameters
wc
a Unicode character
Returns
a PangoGlyph value that means no glyph was found for wc
.
pango_glyph_string_new ()
pango_glyph_string_new
PangoGlyphString *
pango_glyph_string_new (void);
Create a new PangoGlyphString.
Returns
the newly allocated PangoGlyphString, which
should be freed with pango_glyph_string_free().
pango_glyph_string_copy ()
pango_glyph_string_copy
PangoGlyphString *
pango_glyph_string_copy (PangoGlyphString *string);
Copy a glyph string and associated storage.
Parameters
string
a PangoGlyphString, may be NULL.
[nullable]
Returns
the newly allocated PangoGlyphString,
which should be freed with pango_glyph_string_free(),
or NULL if string
was NULL.
[nullable]
pango_glyph_string_set_size ()
pango_glyph_string_set_size
void
pango_glyph_string_set_size (PangoGlyphString *string,
gint new_len);
Resize a glyph string to the given length.
Parameters
string
a PangoGlyphString.
new_len
the new length of the string.
pango_glyph_string_free ()
pango_glyph_string_free
void
pango_glyph_string_free (PangoGlyphString *string);
Free a glyph string and associated storage.
Parameters
string
a PangoGlyphString, may be NULL.
[nullable]
pango_glyph_string_extents ()
pango_glyph_string_extents
void
pango_glyph_string_extents (PangoGlyphString *glyphs,
PangoFont *font,
PangoRectangle *ink_rect,
PangoRectangle *logical_rect);
Compute the logical and ink extents of a glyph string. See the documentation
for pango_font_get_glyph_extents() for details about the interpretation
of the rectangles.
Examples of logical (red) and ink (green) rects:
Parameters
glyphs
a PangoGlyphString
font
a PangoFont
ink_rect
rectangle used to store the extents of the glyph string
as drawn or NULL to indicate that the result is not needed.
[out][allow-none]
logical_rect
rectangle used to store the logical extents of the
glyph string or NULL to indicate that the result is not needed.
[out][allow-none]
pango_glyph_string_extents_range ()
pango_glyph_string_extents_range
void
pango_glyph_string_extents_range (PangoGlyphString *glyphs,
int start,
int end,
PangoFont *font,
PangoRectangle *ink_rect,
PangoRectangle *logical_rect);
Computes the extents of a sub-portion of a glyph string. The extents are
relative to the start of the glyph string range (the origin of their
coordinate system is at the start of the range, not at the start of the entire
glyph string).
Parameters
glyphs
a PangoGlyphString
start
start index
end
end index (the range is the set of bytes with
indices such that start <= index < end)
font
a PangoFont
ink_rect
rectangle used to
store the extents of the glyph string range as drawn or
NULL to indicate that the result is not needed.
[out caller-allocates][optional]
logical_rect
rectangle used to
store the logical extents of the glyph string range or
NULL to indicate that the result is not needed.
[out caller-allocates][optional]
pango_glyph_string_get_width ()
pango_glyph_string_get_width
int
pango_glyph_string_get_width (PangoGlyphString *glyphs);
Computes the logical width of the glyph string as can also be computed
using pango_glyph_string_extents(). However, since this only computes the
width, it's much faster. This is in fact only a convenience function that
computes the sum of geometry.width for each glyph in the glyphs
.
Parameters
glyphs
a PangoGlyphString
Returns
the logical width of the glyph string.
Since: 1.14
pango_glyph_string_index_to_x ()
pango_glyph_string_index_to_x
void
pango_glyph_string_index_to_x (PangoGlyphString *glyphs,
char *text,
int length,
PangoAnalysis *analysis,
int index_,
gboolean trailing,
int *x_pos);
Converts from character position to x position. (X position
is measured from the left edge of the run). Character positions
are computed by dividing up each cluster into equal portions.
Parameters
glyphs
the glyphs return from pango_shape()
text
the text for the run
length
the number of bytes (not characters) in text
.
analysis
the analysis information return from pango_itemize()
index_
the byte index within text
trailing
whether we should compute the result for the beginning (FALSE)
or end (TRUE) of the character.
x_pos
location to store result.
[out]
pango_glyph_string_x_to_index ()
pango_glyph_string_x_to_index
void
pango_glyph_string_x_to_index (PangoGlyphString *glyphs,
char *text,
int length,
PangoAnalysis *analysis,
int x_pos,
int *index_,
int *trailing);
Convert from x offset to character position. Character positions
are computed by dividing up each cluster into equal portions.
In scripts where positioning within a cluster is not allowed
(such as Thai), the returned value may not be a valid cursor
position; the caller must combine the result with the logical
attributes for the text to compute the valid cursor position.
Parameters
glyphs
the glyphs returned from pango_shape()
text
the text for the run
length
the number of bytes (not characters) in text.
analysis
the analysis information return from pango_itemize()
x_pos
the x offset (in Pango units)
index_
location to store calculated byte index within text
.
[out]
trailing
location to store a boolean indicating
whether the user clicked on the leading or trailing
edge of the character.
[out]
pango_glyph_string_get_logical_widths ()
pango_glyph_string_get_logical_widths
void
pango_glyph_string_get_logical_widths (PangoGlyphString *glyphs,
const char *text,
int length,
int embedding_level,
int *logical_widths);
Given a PangoGlyphString resulting from pango_shape() and the corresponding
text, determine the screen width corresponding to each character. When
multiple characters compose a single cluster, the width of the entire
cluster is divided equally among the characters.
See also pango_glyph_item_get_logical_widths().
Parameters
glyphs
a PangoGlyphString
text
the text corresponding to the glyphs
length
the length of text
, in bytes
embedding_level
the embedding level of the string
logical_widths
an array whose length is the number of
characters in text (equal to g_utf8_strlen (text,
length) unless text has NUL bytes) to be filled in
with the resulting character widths.
[array]
pango_glyph_item_copy ()
pango_glyph_item_copy
PangoGlyphItem *
pango_glyph_item_copy (PangoGlyphItem *orig);
Make a deep copy of an existing PangoGlyphItem structure.
Parameters
orig
a PangoGlyphItem, may be NULL.
[nullable]
Returns
the newly allocated PangoGlyphItem, which should
be freed with pango_glyph_item_free(), or NULL
if orig
was NULL.
[nullable]
Since: 1.20
pango_glyph_item_free ()
pango_glyph_item_free
void
pango_glyph_item_free (PangoGlyphItem *glyph_item);
Frees a PangoGlyphItem and resources to which it points.
Parameters
glyph_item
a PangoGlyphItem, may be NULL.
[nullable]
Since: 1.6
pango_glyph_item_split ()
pango_glyph_item_split
PangoGlyphItem *
pango_glyph_item_split (PangoGlyphItem *orig,
const char *text,
int split_index);
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).
This function is similar in function to pango_item_split() (and uses
it internally.)
Parameters
orig
a PangoItem
text
text to which positions in orig
apply
split_index
byte index of position to split item, relative to the start of the item
Returns
the newly allocated item representing text before
split_index
, which should be freed
with pango_glyph_item_free().
Since: 1.2
pango_glyph_item_apply_attrs ()
pango_glyph_item_apply_attrs
GSList *
pango_glyph_item_apply_attrs (PangoGlyphItem *glyph_item,
const char *text,
PangoAttrList *list);
Splits a shaped item (PangoGlyphItem) into multiple items based
on an attribute list. The idea is that if you have attributes
that don't affect shaping, such as color or underline, to avoid
affecting shaping, you filter them out (pango_attr_list_filter()),
apply the shaping process and then reapply them to the result using
this function.
All attributes that start or end inside a cluster are applied
to that cluster; for instance, if half of a cluster is underlined
and the other-half strikethrough, then the cluster will end
up with both underline and strikethrough attributes. In these
cases, it may happen that item->extra_attrs for some of the
result items can have multiple attributes of the same type.
This function takes ownership of glyph_item
; it will be reused
as one of the elements in the list.
Parameters
glyph_item
a shaped item
text
text that list
applies to
list
a PangoAttrList
Returns
a
list of glyph items resulting from splitting glyph_item
. Free
the elements using pango_glyph_item_free(), the list using
g_slist_free().
[transfer full][element-type Pango.GlyphItem]
Since: 1.2
pango_glyph_item_letter_space ()
pango_glyph_item_letter_space
void
pango_glyph_item_letter_space (PangoGlyphItem *glyph_item,
const char *text,
PangoLogAttr *log_attrs,
int letter_spacing);
Adds spacing between the graphemes of glyph_item
to
give the effect of typographic letter spacing.
Parameters
glyph_item
a PangoGlyphItem
text
text that glyph_item
corresponds to
(glyph_item->item->offset is an offset from the
start of text
)
log_attrs
logical attributes for the item
(the first logical attribute refers to the position
before the first character in the item).
[array]
letter_spacing
amount of letter spacing to add
in Pango units. May be negative, though too large
negative values will give ugly results.
Since: 1.6
pango_glyph_item_get_logical_widths ()
pango_glyph_item_get_logical_widths
void
pango_glyph_item_get_logical_widths (PangoGlyphItem *glyph_item,
const char *text,
int *logical_widths);
Given a PangoGlyphItem and the corresponding
text, determine the screen width corresponding to each character. When
multiple characters compose a single cluster, the width of the entire
cluster is divided equally among the characters.
See also pango_glyph_string_get_logical_widths().
Parameters
glyph_item
a PangoGlyphItem
text
text that glyph_item
corresponds to
(glyph_item->item->offset is an offset from the
start of text
)
logical_widths
an array whose length is the number of
characters in glyph_item (equal to
glyph_item->item->num_chars) to be filled in with
the resulting character widths.
[array]
Since: 1.26
pango_glyph_item_iter_copy ()
pango_glyph_item_iter_copy
PangoGlyphItemIter *
pango_glyph_item_iter_copy (PangoGlyphItemIter *orig);
Make a shallow copy of an existing PangoGlyphItemIter structure.
Parameters
orig
a PangoGlyphItemIter, may be NULL.
[nullable]
Returns
the newly allocated PangoGlyphItemIter, which should
be freed with pango_glyph_item_iter_free(), or NULL
if orig
was NULL.
[nullable]
Since: 1.22
pango_glyph_item_iter_free ()
pango_glyph_item_iter_free
void
pango_glyph_item_iter_free (PangoGlyphItemIter *iter);
Frees a PangoGlyphItemIter created by pango_glyph_item_iter_copy().
Parameters
iter
a PangoGlyphItemIter, may be NULL.
[nullable]
Since: 1.22
pango_glyph_item_iter_init_start ()
pango_glyph_item_iter_init_start
gboolean
pango_glyph_item_iter_init_start (PangoGlyphItemIter *iter,
PangoGlyphItem *glyph_item,
const char *text);
Initializes a PangoGlyphItemIter structure to point to the
first cluster in a glyph item.
See PangoGlyphItemIter for details of cluster orders.
Parameters
iter
a PangoGlyphItemIter
glyph_item
the glyph item to iterate over
text
text corresponding to the glyph item
Returns
FALSE if there are no clusters in the glyph item
Since: 1.22
pango_glyph_item_iter_init_end ()
pango_glyph_item_iter_init_end
gboolean
pango_glyph_item_iter_init_end (PangoGlyphItemIter *iter,
PangoGlyphItem *glyph_item,
const char *text);
Initializes a PangoGlyphItemIter structure to point to the
last cluster in a glyph item.
See PangoGlyphItemIter for details of cluster orders.
Parameters
iter
a PangoGlyphItemIter
glyph_item
the glyph item to iterate over
text
text corresponding to the glyph item
Returns
FALSE if there are no clusters in the glyph item
Since: 1.22
pango_glyph_item_iter_next_cluster ()
pango_glyph_item_iter_next_cluster
gboolean
pango_glyph_item_iter_next_cluster (PangoGlyphItemIter *iter);
Advances the iterator to the next cluster in the glyph item.
See PangoGlyphItemIter for details of cluster orders.
Parameters
iter
a PangoGlyphItemIter
Returns
TRUE if the iterator was advanced, FALSE if we were already on the
last cluster.
Since: 1.22
pango_glyph_item_iter_prev_cluster ()
pango_glyph_item_iter_prev_cluster
gboolean
pango_glyph_item_iter_prev_cluster (PangoGlyphItemIter *iter);
Moves the iterator to the preceding cluster in the glyph item.
See PangoGlyphItemIter for details of cluster orders.
Parameters
iter
a PangoGlyphItemIter
Returns
TRUE if the iterator was moved, FALSE if we were already on the
first cluster.
Since: 1.22
Types and Values
PANGO_SCALE
PANGO_SCALE
#define PANGO_SCALE 1024
The PANGO_SCALE macro 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.
struct PangoRectangle
PangoRectangle
struct PangoRectangle {
int x;
int y;
int width;
int height;
};
The PangoRectangle structure represents a rectangle. It is frequently
used to represent the logical or ink extents of a single glyph or section
of text. (See, for instance, pango_font_get_glyph_extents())
Members
int x;
X coordinate of the left side of the rectangle.
int y;
Y coordinate of the the top side of the rectangle.
int width;
width of the rectangle.
int height;
height of the rectangle.
struct PangoMatrix
PangoMatrix
struct PangoMatrix {
double xx;
double xy;
double yx;
double yy;
double x0;
double y0;
};
A structure specifying a transformation between user-space
coordinates and device coordinates. The transformation
is given by
x_device = x_user * matrix->xx + y_user * matrix->xy + matrix->x0;
y_device = x_user * matrix->yx + y_user * matrix->yy + matrix->y0;
Members
double xx;
1st component of the transformation matrix
double xy;
2nd component of the transformation matrix
double yx;
3rd component of the transformation matrix
double yy;
4th component of the transformation matrix
double x0;
x translation
double y0;
y translation
Since: 1.6
PANGO_MATRIX_INIT
PANGO_MATRIX_INIT
#define PANGO_MATRIX_INIT { 1., 0., 0., 1., 0., 0. }
Constant that can be used to initialize a PangoMatrix to
the identity transform.
PangoMatrix matrix = PANGO_MATRIX_INIT;
pango_matrix_rotate (&matrix, 45.);
Since: 1.6
PangoGlyph
PangoGlyph
typedef guint32 PangoGlyph;
A PangoGlyph represents a single glyph in the output form of a string.
PANGO_GLYPH_EMPTY
PANGO_GLYPH_EMPTY
#define PANGO_GLYPH_EMPTY ((PangoGlyph)0x0FFFFFFF)
The PANGO_GLYPH_EMPTY macro represents a PangoGlyph value that has a
special meaning, which is a zero-width empty glyph. This is useful for
example in shaper modules, to use as the glyph for various zero-width
Unicode characters (those passing pango_is_zero_width()).
PANGO_GLYPH_INVALID_INPUT
PANGO_GLYPH_INVALID_INPUT
#define PANGO_GLYPH_INVALID_INPUT ((PangoGlyph)0xFFFFFFFF)
The PANGO_GLYPH_INVALID_INPUT macro represents a PangoGlyph value that has a
special meaning of invalid input. PangoLayout produces one such glyph
per invalid input UTF-8 byte and such a glyph is rendered as a crossed
box.
Note that this value is defined such that it has the PANGO_GLYPH_UNKNOWN_FLAG
on.
Since: 1.20
PANGO_GLYPH_UNKNOWN_FLAG
PANGO_GLYPH_UNKNOWN_FLAG
#define PANGO_GLYPH_UNKNOWN_FLAG ((PangoGlyph)0x10000000)
The PANGO_GLYPH_UNKNOWN_FLAG macro is a flag value that can be added to
a gunichar value of a valid Unicode character, to produce a PangoGlyph
value, representing an unknown-character glyph for the respective gunichar.
struct PangoGlyphInfo
PangoGlyphInfo
struct PangoGlyphInfo {
PangoGlyph glyph;
PangoGlyphGeometry geometry;
PangoGlyphVisAttr attr;
};
The PangoGlyphInfo structure represents a single glyph together with
positioning information and visual attributes.
It contains the following fields.
Members
PangoGlyph glyph;
the glyph itself.
PangoGlyphGeometry geometry;
the positional information about the glyph.
PangoGlyphVisAttr attr;
the visual attributes of the glyph.
struct PangoGlyphGeometry
PangoGlyphGeometry
struct PangoGlyphGeometry {
PangoGlyphUnit width;
PangoGlyphUnit x_offset;
PangoGlyphUnit y_offset;
};
The PangoGlyphGeometry structure contains width and positioning
information for a single glyph.
Members
PangoGlyphUnit width;
the logical width to use for the the character.
PangoGlyphUnit x_offset;
horizontal offset from nominal character position.
PangoGlyphUnit y_offset;
vertical offset from nominal character position.
PangoGlyphUnit
PangoGlyphUnit
typedef gint32 PangoGlyphUnit;
The PangoGlyphUnit type is used to store dimensions within
Pango. Dimensions are stored in 1/PANGO_SCALE of a device unit.
(A device unit might be a pixel for screen display, or
a point on a printer.) PANGO_SCALE is currently 1024, and
may change in the future (unlikely though), but you should not
depend on its exact value. The PANGO_PIXELS() macro can be used
to convert from glyph units into device units with correct rounding.
struct PangoGlyphVisAttr
PangoGlyphVisAttr
struct PangoGlyphVisAttr {
guint is_cluster_start : 1;
};
The PangoGlyphVisAttr is used to communicate information between
the shaping phase and the rendering phase. More attributes may be
added in the future.
Members
guint is_cluster_start : 1;
set for the first logical glyph in each cluster. (Clusters
are stored in visual order, within the cluster, glyphs
are always ordered in logical order, since visual
order is meaningless; that is, in Arabic text, accent glyphs
follow the glyphs for the base character.)
struct PangoGlyphString
PangoGlyphString
struct PangoGlyphString {
gint num_glyphs;
PangoGlyphInfo *glyphs;
gint *log_clusters;
};
The PangoGlyphString structure is used to store strings
of glyphs with geometry and visual attribute information.
The storage for the glyph information is owned
by the structure which simplifies memory management.
Members
gint num_glyphs;
number of the glyphs in this glyph string.
PangoGlyphInfo *glyphs;
array of glyph information
for the glyph string.
[array length=num_glyphs]
gint *log_clusters;
logical cluster info, indexed by the byte index
within the text corresponding to the glyph string.
struct PangoGlyphItem
PangoGlyphItem
struct PangoGlyphItem {
PangoItem *item;
PangoGlyphString *glyphs;
};
A PangoGlyphItem is a pair of a PangoItem and the glyphs
resulting from shaping the text corresponding to an item.
As an example of the usage of PangoGlyphItem, the results
of shaping text with PangoLayout is a list of PangoLayoutLine,
each of which contains a list of PangoGlyphItem.
Members
PangoItem *item;
corresponding PangoItem.
PangoGlyphString *glyphs;
corresponding PangoGlyphString.
struct PangoGlyphItemIter
PangoGlyphItemIter
struct PangoGlyphItemIter {
PangoGlyphItem *glyph_item;
const gchar *text;
int start_glyph;
int start_index;
int start_char;
int end_glyph;
int end_index;
int end_char;
};
A PangoGlyphItemIter is an iterator over the clusters in a
PangoGlyphItem. The forward direction of the
iterator is the logical direction of text. That is, with increasing
start_index
and start_char
values. If glyph_item
is right-to-left
(that is, if glyph_item->item->analysis.level
is odd),
then start_glyph
decreases as the iterator moves forward. Moreover,
in right-to-left cases, start_glyph
is greater than end_glyph
.
An iterator should be initialized using either of
pango_glyph_item_iter_init_start() and
pango_glyph_item_iter_init_end(), for forward and backward iteration
respectively, and walked over using any desired mixture of
pango_glyph_item_iter_next_cluster() and
pango_glyph_item_iter_prev_cluster(). A common idiom for doing a
forward iteration over the clusters is:
PangoGlyphItemIter cluster_iter;
gboolean have_cluster;
for (have_cluster = pango_glyph_item_iter_init_start (&cluster_iter,
glyph_item, text);
have_cluster;
have_cluster = pango_glyph_item_iter_next_cluster (&cluster_iter))
{
...
}
Note that text
is the start of the text for layout, which is then
indexed by glyph_item->item->offset
to get to the
text of glyph_item
. The start_index
and end_index
values can directly
index into text
. The start_glyph
, end_glyph
, start_char
, and end_char
values however are zero-based for the glyph_item
. For each cluster, the
item pointed at by the start variables is included in the cluster while
the one pointed at by end variables is not.
None of the members of a PangoGlyphItemIter should be modified manually.
Since: 1.22
PANGO_TYPE_GLYPH_STRING
PANGO_TYPE_GLYPH_STRING
#define PANGO_TYPE_GLYPH_STRING (pango_glyph_string_get_type ())
The GObject type for PangoGlyphString.
docs/xml/api-index-1.48.xml 0000664 0001750 0001750 00000003140 13751777750 015447 0 ustar mclasen mclasen
]>
F
pango_fc_font_get_languages, function in PangoFcFont
pango_fc_font_get_pattern, function in PangoFcFont
pango_fc_font_map_set_default_substitute, function in PangoFcFontMap
pango_fc_font_map_substitute_changed, function in PangoFcFontMap
L
pango_language_get_preferred, function in Scripts and Languages
docs/xml/coverage-maps.xml 0000664 0001750 0001750 00000057067 13751777747 015761 0 ustar mclasen mclasen
]>
Coverage Maps
3
PANGO Library
Coverage Maps
Unicode character range coverage storage
Functions
PangoCoverage *
pango_coverage_new ()
PangoCoverage *
pango_coverage_ref ()
void
pango_coverage_unref ()
PangoCoverage *
pango_coverage_copy ()
PangoCoverageLevel
pango_coverage_get ()
void
pango_coverage_max ()
void
pango_coverage_set ()
void
pango_coverage_to_bytes ()
PangoCoverage *
pango_coverage_from_bytes ()
Types and Values
enumPangoCoverageLevel
#definePANGO_TYPE_COVERAGE_LEVEL
PangoCoverage
Object Hierarchy
GEnum
╰── PangoCoverageLevel
GObject
╰── PangoCoverage
Description
It is often necessary in Pango to determine if a particular font can
represent a particular character, and also how well it can represent
that character. The PangoCoverage is a data structure that is used
to represent that information.
Functions
pango_coverage_new ()
pango_coverage_new
PangoCoverage *
pango_coverage_new (void);
Create a new PangoCoverage
Returns
the newly allocated PangoCoverage,
initialized to PANGO_COVERAGE_NONE
with a reference count of one, which
should be freed with pango_coverage_unref().
pango_coverage_ref ()
pango_coverage_ref
PangoCoverage *
pango_coverage_ref (PangoCoverage *coverage);
Increase the reference count on the PangoCoverage by one
Parameters
coverage
a PangoCoverage.
[not nullable]
Returns
coverage
.
[transfer full]
pango_coverage_unref ()
pango_coverage_unref
void
pango_coverage_unref (PangoCoverage *coverage);
Decrease the reference count on the PangoCoverage by one.
If the result is zero, free the coverage and all associated memory.
Parameters
coverage
a PangoCoverage.
[transfer full][not nullable]
pango_coverage_copy ()
pango_coverage_copy
PangoCoverage *
pango_coverage_copy (PangoCoverage *coverage);
Copy an existing PangoCoverage. (This function may now be unnecessary
since we refcount the structure. File a bug if you use it.)
Parameters
coverage
a PangoCoverage
Returns
the newly allocated PangoCoverage,
with a reference count of one, which should be freed
with pango_coverage_unref().
[transfer full]
pango_coverage_get ()
pango_coverage_get
PangoCoverageLevel
pango_coverage_get (PangoCoverage *coverage,
int index_);
Determine whether a particular index is covered by coverage
Parameters
coverage
a PangoCoverage
index_
the index to check
Returns
the coverage level of coverage
for character index_
.
pango_coverage_max ()
pango_coverage_max
void
pango_coverage_max (PangoCoverage *coverage,
PangoCoverage *other);
pango_coverage_max has been deprecated since version 1.44 and should not be used in newly-written code. This function does nothing
Set the coverage for each index in coverage
to be the max (better)
value of the current coverage for the index and the coverage for
the corresponding index in other
.
Parameters
coverage
a PangoCoverage
other
another PangoCoverage
pango_coverage_set ()
pango_coverage_set
void
pango_coverage_set (PangoCoverage *coverage,
int index_,
PangoCoverageLevel level);
Modify a particular index within coverage
Parameters
coverage
a PangoCoverage
index_
the index to modify
level
the new level for index_
pango_coverage_to_bytes ()
pango_coverage_to_bytes
void
pango_coverage_to_bytes (PangoCoverage *coverage,
guchar **bytes,
int *n_bytes);
pango_coverage_to_bytes has been deprecated since version 1.44 and should not be used in newly-written code. This returns NULL
Convert a PangoCoverage structure into a flat binary format
Parameters
coverage
a PangoCoverage
bytes
location to store result (must be freed with g_free()).
[out][array length=n_bytes][element-type guint8]
n_bytes
location to store size of result.
[out]
pango_coverage_from_bytes ()
pango_coverage_from_bytes
PangoCoverage *
pango_coverage_from_bytes (guchar *bytes,
int n_bytes);
pango_coverage_from_bytes has been deprecated since version 1.44 and should not be used in newly-written code. This returns NULL
Convert data generated from pango_coverage_to_bytes() back
to a PangoCoverage
Parameters
bytes
binary data
representing a PangoCoverage.
[array length=n_bytes][element-type guint8]
n_bytes
the size of bytes
in bytes
Returns
a newly allocated
PangoCoverage, or NULL if the data was invalid.
[transfer full][nullable]
Types and Values
enum PangoCoverageLevel
PangoCoverageLevel
Used to indicate how well a font can represent a particular Unicode
character point for a particular script.
Since 1.44, only PANGO_COVERAGE_NONE and PANGO_COVERAGE_EXACT
will be returned.
Members
PANGO_COVERAGE_NONE
The character is not representable with the font.
PANGO_COVERAGE_FALLBACK
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.
PANGO_COVERAGE_APPROXIMATE
The character is represented as basically the correct
graphical form, but with a stylistic variant inappropriate for
the current script.
PANGO_COVERAGE_EXACT
The character is represented as the correct graphical form.
PANGO_TYPE_COVERAGE_LEVEL
PANGO_TYPE_COVERAGE_LEVEL
#define PANGO_TYPE_COVERAGE_LEVEL (pango_coverage_level_get_type ())
PangoCoverage
PangoCoverage
typedef struct _PangoCoverage PangoCoverage;
The PangoCoverage structure represents a map from Unicode characters
to PangoCoverageLevel. It is an opaque structure with no public fields.
docs/xml/fonts.xml 0000664 0001750 0001750 00000625461 13751777747 014360 0 ustar mclasen mclasen
]>
Fonts
3
PANGO Library
Fonts
Structures representing abstract fonts
Functions
PangoFontDescription *
pango_font_description_new ()
PangoFontDescription *
pango_font_description_copy ()
PangoFontDescription *
pango_font_description_copy_static ()
guint
pango_font_description_hash ()
gboolean
pango_font_description_equal ()
void
pango_font_description_free ()
void
pango_font_descriptions_free ()
void
pango_font_description_set_family ()
void
pango_font_description_set_family_static ()
const char *
pango_font_description_get_family ()
void
pango_font_description_set_style ()
PangoStyle
pango_font_description_get_style ()
void
pango_font_description_set_variant ()
PangoVariant
pango_font_description_get_variant ()
void
pango_font_description_set_weight ()
PangoWeight
pango_font_description_get_weight ()
void
pango_font_description_set_stretch ()
PangoStretch
pango_font_description_get_stretch ()
void
pango_font_description_set_size ()
gint
pango_font_description_get_size ()
void
pango_font_description_set_absolute_size ()
gboolean
pango_font_description_get_size_is_absolute ()
void
pango_font_description_set_gravity ()
PangoGravity
pango_font_description_get_gravity ()
void
pango_font_description_set_variations ()
void
pango_font_description_set_variations_static ()
const char *
pango_font_description_get_variations ()
PangoFontMask
pango_font_description_get_set_fields ()
void
pango_font_description_unset_fields ()
void
pango_font_description_merge ()
void
pango_font_description_merge_static ()
gboolean
pango_font_description_better_match ()
PangoFontDescription *
pango_font_description_from_string ()
char *
pango_font_description_to_string ()
char *
pango_font_description_to_filename ()
PangoFontMetrics *
pango_font_metrics_ref ()
void
pango_font_metrics_unref ()
int
pango_font_metrics_get_ascent ()
int
pango_font_metrics_get_descent ()
int
pango_font_metrics_get_height ()
int
pango_font_metrics_get_approximate_char_width ()
int
pango_font_metrics_get_approximate_digit_width ()
int
pango_font_metrics_get_underline_thickness ()
int
pango_font_metrics_get_underline_position ()
int
pango_font_metrics_get_strikethrough_thickness ()
int
pango_font_metrics_get_strikethrough_position ()
PangoEngineShape *
pango_font_find_shaper ()
PangoFontDescription *
pango_font_describe ()
PangoFontDescription *
pango_font_describe_with_absolute_size ()
PangoFontFace *
pango_font_get_face ()
PangoCoverage *
pango_font_get_coverage ()
gboolean
pango_font_has_char ()
void
pango_font_get_glyph_extents ()
PangoFontMetrics *
pango_font_get_metrics ()
PangoFontMap *
pango_font_get_font_map ()
void
pango_font_get_features ()
hb_font_t *
pango_font_get_hb_font ()
const char *
pango_font_family_get_name ()
gboolean
pango_font_family_is_monospace ()
gboolean
pango_font_family_is_variable ()
void
pango_font_family_list_faces ()
PangoFontFace *
pango_font_family_get_face ()
const char *
pango_font_face_get_face_name ()
void
pango_font_face_list_sizes ()
PangoFontDescription *
pango_font_face_describe ()
gboolean
pango_font_face_is_synthesized ()
PangoFontFamily *
pango_font_face_get_family ()
PangoContext *
pango_font_map_create_context ()
PangoFont *
pango_font_map_load_font ()
PangoFontset *
pango_font_map_load_fontset ()
void
pango_font_map_list_families ()
PangoFontFamily *
pango_font_map_get_family ()
guint
pango_font_map_get_serial ()
void
pango_font_map_changed ()
PangoFont *
pango_fontset_get_font ()
PangoFontMetrics *
pango_fontset_get_metrics ()
gboolean
(*PangoFontsetForeachFunc) ()
void
pango_fontset_foreach ()
Types and Values
PangoFontDescription
enumPangoStyle
enumPangoWeight
enumPangoVariant
enumPangoStretch
enumPangoFontMask
structPangoFontMetrics
PangoFont
structPangoFontFamily
structPangoFontFace
PangoFontMap
structPangoFontMapClass
structPangoFontset
structPangoFontsetClass
Object Hierarchy
GBoxed
├── PangoFontDescription
╰── PangoFontMetrics
GEnum
├── PangoStretch
├── PangoStyle
├── PangoVariant
╰── PangoWeight
GFlags
╰── PangoFontMask
GObject
├── PangoFont
│ ╰── PangoFcFont
├── PangoFontFace
├── PangoFontFamily
├── PangoFontMap
│ ╰── PangoFcFontMap
╰── PangoFontset
Known Derived Interfaces
PangoFont is required by
PangoCairoFont.
PangoFontMap is required by
PangoCairoFontMap.
Implemented Interfaces
PangoFontFamily implements
GListModel.
PangoFontMap implements
GListModel.
Description
Pango supports a flexible architecture where a
particular rendering architecture can supply an
implementation of fonts. The PangoFont structure
represents an abstract rendering-system-independent font.
Pango provides routines to list available fonts, and
to load a font matching a given description.
Functions
pango_font_description_new ()
pango_font_description_new
PangoFontDescription *
pango_font_description_new (void);
Creates a new font description structure with all fields unset.
Returns
the newly allocated PangoFontDescription, which
should be freed using pango_font_description_free().
pango_font_description_copy ()
pango_font_description_copy
PangoFontDescription *
pango_font_description_copy (const PangoFontDescription *desc);
Make a copy of a PangoFontDescription.
Parameters
desc
a PangoFontDescription, may be NULL.
[nullable]
Returns
the newly allocated
PangoFontDescription, which should be freed with
pango_font_description_free(), or NULL if desc
was
NULL.
[nullable]
pango_font_description_copy_static ()
pango_font_description_copy_static
PangoFontDescription *
pango_font_description_copy_static (const PangoFontDescription *desc);
Like pango_font_description_copy(), but only a shallow copy is made
of the family name and other allocated fields. The result can only
be used until desc
is modified or freed. This is meant to be used
when the copy is only needed temporarily.
Parameters
desc
a PangoFontDescription, may be NULL.
[nullable]
Returns
the newly allocated
PangoFontDescription, which should be freed with
pango_font_description_free(), or NULL if desc
was
NULL.
[nullable]
pango_font_description_hash ()
pango_font_description_hash
guint
pango_font_description_hash (const PangoFontDescription *desc);
Computes a hash of a PangoFontDescription structure suitable
to be used, for example, as an argument to g_hash_table_new().
The hash value is independent of desc->mask
.
Parameters
desc
a PangoFontDescription
Returns
the hash value.
pango_font_description_equal ()
pango_font_description_equal
gboolean
pango_font_description_equal (const PangoFontDescription *desc1,
const PangoFontDescription *desc2);
Compares two font descriptions for equality. Two font descriptions
are considered equal if the fonts they describe are provably identical.
This means that their masks do not have to match, as long as other fields
are all the same. (Two font descriptions may result in identical fonts
being loaded, but still compare FALSE.)
Parameters
desc1
a PangoFontDescription
desc2
another PangoFontDescription
Returns
TRUE if the two font descriptions are identical,
FALSE otherwise.
pango_font_description_free ()
pango_font_description_free
void
pango_font_description_free (PangoFontDescription *desc);
Frees a font description.
Parameters
desc
a PangoFontDescription, may be NULL.
[nullable]
pango_font_descriptions_free ()
pango_font_descriptions_free
void
pango_font_descriptions_free (PangoFontDescription **descs,
int n_descs);
Frees an array of font descriptions.
Parameters
descs
a pointer
to an array of PangoFontDescription, may be NULL.
[allow-none][array length=n_descs][transfer full]
n_descs
number of font descriptions in descs
pango_font_description_set_family ()
pango_font_description_set_family
void
pango_font_description_set_family (PangoFontDescription *desc,
const char *family);
Sets the family name field of a font description. The family
name represents a family of related font styles, and will
resolve to a particular PangoFontFamily. In some uses of
PangoFontDescription, it is also possible to use a comma
separated list of family names for this field.
Parameters
desc
a PangoFontDescription.
family
a string representing the family name.
pango_font_description_set_family_static ()
pango_font_description_set_family_static
void
pango_font_description_set_family_static
(PangoFontDescription *desc,
const char *family);
Like pango_font_description_set_family(), except that no
copy of family
is made. The caller must make sure that the
string passed in stays around until desc
has been freed
or the name is set again. This function can be used if
family
is a static string such as a C string literal, or
if desc
is only needed temporarily.
Parameters
desc
a PangoFontDescription
family
a string representing the family name.
pango_font_description_get_family ()
pango_font_description_get_family
const char *
pango_font_description_get_family (const PangoFontDescription *desc);
Gets the family name field of a font description. See
pango_font_description_set_family().
Parameters
desc
a PangoFontDescription.
Returns
the family name field for the font
description, or NULL if not previously set. This
has the same life-time as the font description itself
and should not be freed.
[nullable]
pango_font_description_set_style ()
pango_font_description_set_style
void
pango_font_description_set_style (PangoFontDescription *desc,
PangoStyle style);
Sets the style field of a PangoFontDescription. The
PangoStyle enumeration describes whether the font is slanted and
the manner in which it is slanted; it can be either
PANGO_STYLE_NORMAL, PANGO_STYLE_ITALIC, or PANGO_STYLE_OBLIQUE.
Most fonts will either have a italic style or an oblique
style, but not both, and font matching in Pango will
match italic specifications with oblique fonts and vice-versa
if an exact match is not found.
Parameters
desc
a PangoFontDescription
style
the style for the font description
pango_font_description_get_style ()
pango_font_description_get_style
PangoStyle
pango_font_description_get_style (const PangoFontDescription *desc);
Gets the style field of a PangoFontDescription. See
pango_font_description_set_style().
Parameters
desc
a PangoFontDescription
Returns
the style field for the font description.
Use pango_font_description_get_set_fields() to find out if
the field was explicitly set or not.
pango_font_description_set_variant ()
pango_font_description_set_variant
void
pango_font_description_set_variant (PangoFontDescription *desc,
PangoVariant variant);
Sets the variant field of a font description. The PangoVariant
can either be PANGO_VARIANT_NORMAL or PANGO_VARIANT_SMALL_CAPS.
Parameters
desc
a PangoFontDescription
variant
the variant type for the font description.
pango_font_description_get_variant ()
pango_font_description_get_variant
PangoVariant
pango_font_description_get_variant (const PangoFontDescription *desc);
Gets the variant field of a PangoFontDescription. See
pango_font_description_set_variant().
Parameters
desc
a PangoFontDescription.
Returns
the variant field for the font description. Use
pango_font_description_get_set_fields() to find out if
the field was explicitly set or not.
pango_font_description_set_weight ()
pango_font_description_set_weight
void
pango_font_description_set_weight (PangoFontDescription *desc,
PangoWeight weight);
Sets the weight field of a font description. The weight field
specifies how bold or light the font should be. In addition
to the values of the PangoWeight enumeration, other intermediate
numeric values are possible.
Parameters
desc
a PangoFontDescription
weight
the weight for the font description.
pango_font_description_get_weight ()
pango_font_description_get_weight
PangoWeight
pango_font_description_get_weight (const PangoFontDescription *desc);
Gets the weight field of a font description. See
pango_font_description_set_weight().
Parameters
desc
a PangoFontDescription
Returns
the weight field for the font description. Use
pango_font_description_get_set_fields() to find out if
the field was explicitly set or not.
pango_font_description_set_stretch ()
pango_font_description_set_stretch
void
pango_font_description_set_stretch (PangoFontDescription *desc,
PangoStretch stretch);
Sets the stretch field of a font description. The stretch field
specifies how narrow or wide the font should be.
Parameters
desc
a PangoFontDescription
stretch
the stretch for the font description
pango_font_description_get_stretch ()
pango_font_description_get_stretch
PangoStretch
pango_font_description_get_stretch (const PangoFontDescription *desc);
Gets the stretch field of a font description.
See pango_font_description_set_stretch().
Parameters
desc
a PangoFontDescription.
Returns
the stretch field for the font description. Use
pango_font_description_get_set_fields() to find out if
the field was explicitly set or not.
pango_font_description_set_size ()
pango_font_description_set_size
void
pango_font_description_set_size (PangoFontDescription *desc,
gint size);
Sets the size field of a font description in fractional points. This is mutually
exclusive with pango_font_description_set_absolute_size().
Parameters
desc
a PangoFontDescription
size
the size of the font in points, scaled by PANGO_SCALE. (That is,
a size
value of 10 * PANGO_SCALE is a 10 point font. The conversion
factor between points and device units depends on system configuration
and the output device. For screen display, a logical DPI of 96 is
common, in which case a 10 point font corresponds to a 10 * (96 / 72) = 13.3
pixel font. Use pango_font_description_set_absolute_size() if you need
a particular size in device units.
pango_font_description_get_size ()
pango_font_description_get_size
gint
pango_font_description_get_size (const PangoFontDescription *desc);
Gets the size field of a font description.
See pango_font_description_set_size().
Parameters
desc
a PangoFontDescription
Returns
the size field for the font description in points or device units.
You must call pango_font_description_get_size_is_absolute()
to find out which is the case. Returns 0 if the size field has not
previously been set or it has been set to 0 explicitly.
Use pango_font_description_get_set_fields() to
find out if the field was explicitly set or not.
pango_font_description_set_absolute_size ()
pango_font_description_set_absolute_size
void
pango_font_description_set_absolute_size
(PangoFontDescription *desc,
double size);
Sets the size field of a font description, in device units. This is mutually
exclusive with pango_font_description_set_size() which sets the font size
in points.
Parameters
desc
a PangoFontDescription
size
the new size, in Pango units. There are PANGO_SCALE Pango units in one
device unit. For an output backend where a device unit is a pixel, a size
value of 10 * PANGO_SCALE gives a 10 pixel font.
Since: 1.8
pango_font_description_get_size_is_absolute ()
pango_font_description_get_size_is_absolute
gboolean
pango_font_description_get_size_is_absolute
(const PangoFontDescription *desc);
Determines whether the size of the font is in points (not absolute) or device units (absolute).
See pango_font_description_set_size() and pango_font_description_set_absolute_size().
Parameters
desc
a PangoFontDescription
Returns
whether the size for the font description is in
points or device units. Use pango_font_description_get_set_fields() to
find out if the size field of the font description was explicitly set or not.
Since: 1.8
pango_font_description_set_gravity ()
pango_font_description_set_gravity
void
pango_font_description_set_gravity (PangoFontDescription *desc,
PangoGravity gravity);
Sets the gravity field of a font description. The gravity field
specifies how the glyphs should be rotated. If gravity
is
PANGO_GRAVITY_AUTO, this actually unsets the gravity mask on
the font description.
This function is seldom useful to the user. Gravity should normally
be set on a PangoContext.
Parameters
desc
a PangoFontDescription
gravity
the gravity for the font description.
Since: 1.16
pango_font_description_get_gravity ()
pango_font_description_get_gravity
PangoGravity
pango_font_description_get_gravity (const PangoFontDescription *desc);
Gets the gravity field of a font description. See
pango_font_description_set_gravity().
Parameters
desc
a PangoFontDescription
Returns
the gravity field for the font description. Use
pango_font_description_get_set_fields() to find out if
the field was explicitly set or not.
Since: 1.16
pango_font_description_set_variations ()
pango_font_description_set_variations
void
pango_font_description_set_variations (PangoFontDescription *desc,
const char *variations);
Sets the variations field of a font description. OpenType
font variations allow to select a font instance by specifying
values for a number of axes, such as width or weight.
The format of the variations string is AXIS1=VALUE,AXIS2=VALUE...,
with each AXIS a 4 character tag that identifies a font axis,
and each VALUE a floating point number. Unknown axes are ignored,
and values are clamped to their allowed range.
Pango does not currently have a way to find supported axes of
a font. Both harfbuzz or freetype have API for this.
Parameters
desc
a PangoFontDescription.
variations
a string representing the variations
Since: 1.42
pango_font_description_set_variations_static ()
pango_font_description_set_variations_static
void
pango_font_description_set_variations_static
(PangoFontDescription *desc,
const char *variations);
Like pango_font_description_set_variations(), except that no
copy of variations
is made. The caller must make sure that the
string passed in stays around until desc
has been freed
or the name is set again. This function can be used if
variations
is a static string such as a C string literal, or
if desc
is only needed temporarily.
Parameters
desc
a PangoFontDescription
variations
a string representing the variations
Since: 1.42
pango_font_description_get_variations ()
pango_font_description_get_variations
const char *
pango_font_description_get_variations (const PangoFontDescription *desc);
Gets the variations field of a font description. See
pango_font_description_set_variations().
Parameters
desc
a PangoFontDescription
Returns
the varitions field for the font
description, or NULL if not previously set. This
has the same life-time as the font description itself
and should not be freed.
[nullable]
Since: 1.42
pango_font_description_get_set_fields ()
pango_font_description_get_set_fields
PangoFontMask
pango_font_description_get_set_fields (const PangoFontDescription *desc);
Determines which fields in a font description have been set.
Parameters
desc
a PangoFontDescription
Returns
a bitmask with bits set corresponding to the
fields in desc
that have been set.
pango_font_description_unset_fields ()
pango_font_description_unset_fields
void
pango_font_description_unset_fields (PangoFontDescription *desc,
PangoFontMask to_unset);
Unsets some of the fields in a PangoFontDescription. The unset
fields will get back to their default values.
Parameters
desc
a PangoFontDescription
to_unset
bitmask of fields in the desc
to unset.
pango_font_description_merge ()
pango_font_description_merge
void
pango_font_description_merge (PangoFontDescription *desc,
const PangoFontDescription *desc_to_merge,
gboolean replace_existing);
Merges the fields that are set in desc_to_merge
into the fields in
desc
. If replace_existing
is FALSE, only fields in desc
that
are not already set are affected. If TRUE, then fields that are
already set will be replaced as well.
If desc_to_merge
is NULL, this function performs nothing.
Parameters
desc
a PangoFontDescription
desc_to_merge
the PangoFontDescription to merge from, or NULL.
[allow-none]
replace_existing
if TRUE, replace fields in desc
with the
corresponding values from desc_to_merge
, even if they
are already exist.
pango_font_description_merge_static ()
pango_font_description_merge_static
void
pango_font_description_merge_static (PangoFontDescription *desc,
const PangoFontDescription *desc_to_merge,
gboolean replace_existing);
Like pango_font_description_merge(), but only a shallow copy is made
of the family name and other allocated fields. desc
can only be
used until desc_to_merge
is modified or freed. This is meant
to be used when the merged font description is only needed temporarily.
Parameters
desc
a PangoFontDescription
desc_to_merge
the PangoFontDescription to merge from
replace_existing
if TRUE, replace fields in desc
with the
corresponding values from desc_to_merge
, even if they
are already exist.
pango_font_description_better_match ()
pango_font_description_better_match
gboolean
pango_font_description_better_match (const PangoFontDescription *desc,
const PangoFontDescription *old_match,
const PangoFontDescription *new_match);
Determines if the style attributes of new_match
are a closer match
for desc
than those of old_match
are, or if old_match
is NULL,
determines if new_match
is a match at all.
Approximate matching is done for
weight and style; other style attributes must match exactly.
Style attributes are all attributes other than family and size-related
attributes. Approximate matching for style considers PANGO_STYLE_OBLIQUE
and PANGO_STYLE_ITALIC as matches, but not as good a match as when the
styles are equal.
Note that old_match
must match desc
.
Parameters
desc
a PangoFontDescription
old_match
a PangoFontDescription, or NULL.
[allow-none]
new_match
a PangoFontDescription
Returns
TRUE if new_match
is a better match
pango_font_description_from_string ()
pango_font_description_from_string
PangoFontDescription *
pango_font_description_from_string (const char *str);
Creates a new font description from a string representation in the
form
"[FAMILY-LIST] [STYLE-OPTIONS] [SIZE] [VARIATIONS]",
where FAMILY-LIST is a comma-separated list of families optionally
terminated by a comma, STYLE_OPTIONS is a whitespace-separated list
of words where each word describes one of style, variant, weight,
stretch, or gravity, and SIZE is a decimal number (size in points)
or optionally followed by the unit modifier "px" for absolute size.
VARIATIONS is a comma-separated list of font variation
specifications of the form "@axis=value" (the = sign is optional).
The following words are understood as styles:
"Normal", "Roman", "Oblique", "Italic".
The following words are understood as variants:
"Small-Caps".
The following words are understood as weights:
"Thin", "Ultra-Light", "Extra-Light", "Light", "Semi-Light",
"Demi-Light", "Book", "Regular", "Medium", "Semi-Bold", "Demi-Bold",
"Bold", "Ultra-Bold", "Extra-Bold", "Heavy", "Black", "Ultra-Black",
"Extra-Black".
The following words are understood as stretch values:
"Ultra-Condensed", "Extra-Condensed", "Condensed", "Semi-Condensed",
"Semi-Expanded", "Expanded", "Extra-Expanded", "Ultra-Expanded".
The following words are understood as gravity values:
"Not-Rotated", "South", "Upside-Down", "North", "Rotated-Left",
"East", "Rotated-Right", "West".
Any one of the options may be absent. If FAMILY-LIST is absent, then
the family_name field of the resulting font description will be
initialized to NULL. If STYLE-OPTIONS is missing, then all style
options will be set to the default values. If SIZE is missing, the
size in the resulting font description will be set to 0.
A typical example:
"Cantarell Italic Light 15 @wght=200"
Parameters
str
string representation of a font description.
Returns
a new PangoFontDescription.
pango_font_description_to_string ()
pango_font_description_to_string
char *
pango_font_description_to_string (const PangoFontDescription *desc);
Creates a string representation of a font description. See
pango_font_description_from_string() for a description of the
format of the string representation. The family list in the
string description will only have a terminating comma if the
last word of the list is a valid style option.
Parameters
desc
a PangoFontDescription
Returns
a new string that must be freed with g_free().
pango_font_description_to_filename ()
pango_font_description_to_filename
char *
pango_font_description_to_filename (const PangoFontDescription *desc);
Creates a filename representation of a font description. The
filename is identical to the result from calling
pango_font_description_to_string(), but with underscores instead of
characters that are untypical in filenames, and in lower case only.
Parameters
desc
a PangoFontDescription
Returns
a new string that must be freed with g_free().
pango_font_metrics_ref ()
pango_font_metrics_ref
PangoFontMetrics *
pango_font_metrics_ref (PangoFontMetrics *metrics);
Increase the reference count of a font metrics structure by one.
Parameters
metrics
a PangoFontMetrics structure, may be NULL.
[nullable]
Returns
metrics
.
[nullable]
pango_font_metrics_unref ()
pango_font_metrics_unref
void
pango_font_metrics_unref (PangoFontMetrics *metrics);
Decrease the reference count of a font metrics structure by one. If
the result is zero, frees the structure and any associated
memory.
Parameters
metrics
a PangoFontMetrics structure, may be NULL.
[nullable]
pango_font_metrics_get_ascent ()
pango_font_metrics_get_ascent
int
pango_font_metrics_get_ascent (PangoFontMetrics *metrics);
Gets the ascent from a font metrics structure. The ascent is
the distance from the baseline to the logical top of a line
of text. (The logical top may be above or below the top of the
actual drawn ink. It is necessary to lay out the text to figure
where the ink will be.)
Parameters
metrics
a PangoFontMetrics structure
Returns
the ascent, in Pango units.
pango_font_metrics_get_descent ()
pango_font_metrics_get_descent
int
pango_font_metrics_get_descent (PangoFontMetrics *metrics);
Gets the descent from a font metrics structure. The descent is
the distance from the baseline to the logical bottom of a line
of text. (The logical bottom may be above or below the bottom of the
actual drawn ink. It is necessary to lay out the text to figure
where the ink will be.)
Parameters
metrics
a PangoFontMetrics structure
Returns
the descent, in Pango units.
pango_font_metrics_get_height ()
pango_font_metrics_get_height
int
pango_font_metrics_get_height (PangoFontMetrics *metrics);
Gets the line height from a font metrics structure. The
line height is the distance between successive baselines
in wrapped text.
If the line height is not available, 0 is returned.
Parameters
metrics
a PangoFontMetrics structure
Returns
the height, in Pango units
Since: 1.44
pango_font_metrics_get_approximate_char_width ()
pango_font_metrics_get_approximate_char_width
int
pango_font_metrics_get_approximate_char_width
(PangoFontMetrics *metrics);
Gets the approximate character width for a font metrics structure.
This is merely a representative value useful, for example, for
determining the initial size for a window. Actual characters in
text will be wider and narrower than this.
Parameters
metrics
a PangoFontMetrics structure
Returns
the character width, in Pango units.
pango_font_metrics_get_approximate_digit_width ()
pango_font_metrics_get_approximate_digit_width
int
pango_font_metrics_get_approximate_digit_width
(PangoFontMetrics *metrics);
Gets the approximate digit width for a font metrics structure.
This is merely a representative value useful, for example, for
determining the initial size for a window. Actual digits in
text can be wider or narrower than this, though this value
is generally somewhat more accurate than the result of
pango_font_metrics_get_approximate_char_width() for digits.
Parameters
metrics
a PangoFontMetrics structure
Returns
the digit width, in Pango units.
pango_font_metrics_get_underline_thickness ()
pango_font_metrics_get_underline_thickness
int
pango_font_metrics_get_underline_thickness
(PangoFontMetrics *metrics);
Gets the suggested thickness to draw for the underline.
Parameters
metrics
a PangoFontMetrics structure
Returns
the suggested underline thickness, in Pango units.
Since: 1.6
pango_font_metrics_get_underline_position ()
pango_font_metrics_get_underline_position
int
pango_font_metrics_get_underline_position
(PangoFontMetrics *metrics);
Gets the suggested position to draw the underline.
The value returned is the distance above the
baseline of the top of the underline. Since most fonts have
underline positions beneath the baseline, this value is typically
negative.
Parameters
metrics
a PangoFontMetrics structure
Returns
the suggested underline position, in Pango units.
Since: 1.6
pango_font_metrics_get_strikethrough_thickness ()
pango_font_metrics_get_strikethrough_thickness
int
pango_font_metrics_get_strikethrough_thickness
(PangoFontMetrics *metrics);
Gets the suggested thickness to draw for the strikethrough.
Parameters
metrics
a PangoFontMetrics structure
Returns
the suggested strikethrough thickness, in Pango units.
Since: 1.6
pango_font_metrics_get_strikethrough_position ()
pango_font_metrics_get_strikethrough_position
int
pango_font_metrics_get_strikethrough_position
(PangoFontMetrics *metrics);
Gets the suggested position to draw the strikethrough.
The value returned is the distance above the
baseline of the top of the strikethrough.
Parameters
metrics
a PangoFontMetrics structure
Returns
the suggested strikethrough position, in Pango units.
Since: 1.6
pango_font_find_shaper ()
pango_font_find_shaper
PangoEngineShape *
pango_font_find_shaper (PangoFont *font,
PangoLanguage *language,
guint32 ch);
pango_font_find_shaper is deprecated and should not be used in newly-written code. Shape engines are no longer used
Finds the best matching shaper for a font for a particular
language tag and character point.
Parameters
font
a PangoFont
language
the language tag
ch
a Unicode character.
Returns
the best matching shaper.
[transfer none]
pango_font_describe ()
pango_font_describe
PangoFontDescription *
pango_font_describe (PangoFont *font);
Returns a description of the font, with font size set in points.
Use pango_font_describe_with_absolute_size() if you want the font
size in device units.
Parameters
font
a PangoFont
Returns
a newly-allocated PangoFontDescription object.
pango_font_describe_with_absolute_size ()
pango_font_describe_with_absolute_size
PangoFontDescription *
pango_font_describe_with_absolute_size
(PangoFont *font);
Returns a description of the font, with absolute font size set
(in device units). Use pango_font_describe() if you want the font
size in points.
Parameters
font
a PangoFont
Returns
a newly-allocated PangoFontDescription object.
Since: 1.14
pango_font_get_face ()
pango_font_get_face
PangoFontFace *
pango_font_get_face (PangoFont *font);
Gets the PangoFontFace to which font
belongs.
Parameters
font
a PangoFont
Returns
the PangoFontFace.
[transfer none]
Since: 1.46
pango_font_get_coverage ()
pango_font_get_coverage
PangoCoverage *
pango_font_get_coverage (PangoFont *font,
PangoLanguage *language);
Computes the coverage map for a given font and language tag.
Parameters
font
a PangoFont
language
the language tag
Returns
a newly-allocated PangoCoverage
object.
[transfer full]
pango_font_has_char ()
pango_font_has_char
gboolean
pango_font_has_char (PangoFont *font,
gunichar wc);
Returns whether the font provides a glyph for this character.
Returns TRUE if font
can render wc
Parameters
font
a PangoFont
wc
a Unicode character
Since: 1.44
pango_font_get_glyph_extents ()
pango_font_get_glyph_extents
void
pango_font_get_glyph_extents (PangoFont *font,
PangoGlyph glyph,
PangoRectangle *ink_rect,
PangoRectangle *logical_rect);
Gets the logical and ink extents of a glyph within a font. The
coordinate system for each rectangle has its origin at the
base line and horizontal origin of the character with increasing
coordinates extending to the right and down. The macros PANGO_ASCENT(),
PANGO_DESCENT(), PANGO_LBEARING(), and PANGO_RBEARING() can be used to convert
from the extents rectangle to more traditional font metrics. The units
of the rectangles are in 1/PANGO_SCALE of a device unit.
If font
is NULL, this function gracefully sets some sane values in the
output variables and returns.
Parameters
font
a PangoFont.
[nullable]
glyph
the glyph index
ink_rect
rectangle used to store the extents of the glyph
as drawn or NULL to indicate that the result is not needed.
[out][allow-none]
logical_rect
rectangle used to store the logical extents of
the glyph or NULL to indicate that the result is not needed.
[out][allow-none]
pango_font_get_metrics ()
pango_font_get_metrics
PangoFontMetrics *
pango_font_get_metrics (PangoFont *font,
PangoLanguage *language);
Gets overall metric information for a font. Since the metrics may be
substantially different for different scripts, a language tag can
be provided to indicate that the metrics should be retrieved that
correspond to the script(s) used by that language.
If font
is NULL, this function gracefully sets some sane values in the
output variables and returns.
Parameters
font
a PangoFont.
[nullable]
language
language tag used to determine which script to get the metrics
for, or NULL to indicate to get the metrics for the entire font.
[allow-none]
Returns
a PangoFontMetrics object. The caller must call pango_font_metrics_unref()
when finished using the object.
pango_font_get_font_map ()
pango_font_get_font_map
PangoFontMap *
pango_font_get_font_map (PangoFont *font);
Gets the font map for which the font was created.
Note that the font maintains a weak reference
to the font map, so if all references to font map are dropped, the font
map will be finalized even if there are fonts created with the font
map that are still alive. In that case this function will return NULL.
It is the responsibility of the user to ensure that the font map is kept
alive. In most uses this is not an issue as a PangoContext holds
a reference to the font map.
Parameters
font
a PangoFont, or NULL.
[nullable]
Returns
the PangoFontMap for the
font, or NULL if font
is NULL.
[transfer none][nullable]
Since: 1.10
pango_font_get_features ()
pango_font_get_features
void
pango_font_get_features (PangoFont *font,
hb_feature_t *features,
guint len,
guint *num_features);
Obtain the OpenType features that are provided by the font.
These are passed to the rendering system, together with features
that have been explicitly set via attributes.
Note that this does not include OpenType features which the
rendering system enables by default.
Parameters
font
a PangoFont
features
Array to features in.
[out caller-allocates][array length=len]
len
the length of features
num_features
the number of used items in features
.
[inout]
Since: 1.44
pango_font_get_hb_font ()
pango_font_get_hb_font
hb_font_t *
pango_font_get_hb_font (PangoFont *font);
Get a hb_font_t object backing this font.
Note that the objects returned by this function
are cached and immutable. If you need to make
changes to the hb_font_t, use hb_font_create_sub_font().
[skip]
Parameters
font
a PangoFont
Returns
the hb_font_t object backing the
font, or NULL if the font does not have one.
[transfer none][nullable]
Since: 1.44
pango_font_family_get_name ()
pango_font_family_get_name
const char *
pango_font_family_get_name (PangoFontFamily *family);
Gets the name of the family. The name is unique among all
fonts for the font backend and can be used in a PangoFontDescription
to specify that a face from this family is desired.
Parameters
family
a PangoFontFamily
Returns
the name of the family. This string is owned
by the family object and must not be modified or freed.
pango_font_family_is_monospace ()
pango_font_family_is_monospace
gboolean
pango_font_family_is_monospace (PangoFontFamily *family);
A monospace font is a font designed for text display where the the
characters form a regular grid. For Western languages this would
mean that the advance width of all characters are the same, but
this categorization also includes Asian fonts which include
double-width characters: characters that occupy two grid cells.
g_unichar_iswide() returns a result that indicates whether a
character is typically double-width in a monospace font.
The best way to find out the grid-cell size is to call
pango_font_metrics_get_approximate_digit_width(), since the results
of pango_font_metrics_get_approximate_char_width() may be affected
by double-width characters.
Parameters
family
a PangoFontFamily
Returns
TRUE if the family is monospace.
Since: 1.4
pango_font_family_is_variable ()
pango_font_family_is_variable
gboolean
pango_font_family_is_variable (PangoFontFamily *family);
A variable font is a font which has axes that can be modified to
produce different faces.
Parameters
family
a PangoFontFamily
Returns
TRUE if the family is variable
Since: 1.44
pango_font_family_list_faces ()
pango_font_family_list_faces
void
pango_font_family_list_faces (PangoFontFamily *family,
PangoFontFace ***faces,
int *n_faces);
Lists the different font faces that make up family
. The faces
in a family share a common design, but differ in slant, weight,
width and other aspects.
Parameters
family
a PangoFontFamily
faces
location to store an array of pointers to PangoFontFace objects,
or NULL. This array should be freed with g_free() when it is no
longer needed.
[out][allow-none][array length=n_faces][transfer container]
n_faces
location to store number of elements in faces
.
[out]
pango_font_family_get_face ()
pango_font_family_get_face
PangoFontFace *
pango_font_family_get_face (PangoFontFamily *family,
const char *name);
Gets the PangoFontFace of family
with the given name.
Parameters
family
a PangoFontFamily
name
the name of a face. If the name is NULL,
the family's default face (fontconfig calls it "Regular")
will be returned.
[nullable]
Returns
the PangoFontFace,
or NULL if no face with the given name exists.
[transfer none][nullable]
Since: 1.46
pango_font_face_get_face_name ()
pango_font_face_get_face_name
const char *
pango_font_face_get_face_name (PangoFontFace *face);
Gets a name representing the style of this face among the
different faces in the PangoFontFamily for the face. This
name is unique among all faces in the family and is suitable
for displaying to users.
Parameters
face
a PangoFontFace.
Returns
the face name for the face. This string is
owned by the face object and must not be modified or freed.
pango_font_face_list_sizes ()
pango_font_face_list_sizes
void
pango_font_face_list_sizes (PangoFontFace *face,
int **sizes,
int *n_sizes);
List the available sizes for a font. This is only applicable to bitmap
fonts. For scalable fonts, stores NULL at the location pointed to by
sizes
and 0 at the location pointed to by n_sizes
. The sizes returned
are in Pango units and are sorted in ascending order.
Parameters
face
a PangoFontFace.
sizes
location to store a pointer to an array of int. This array
should be freed with g_free().
[out][array length=n_sizes][nullable][optional]
n_sizes
location to store the number of elements in sizes
Since: 1.4
pango_font_face_describe ()
pango_font_face_describe
PangoFontDescription *
pango_font_face_describe (PangoFontFace *face);
Returns the family, style, variant, weight and stretch of
a PangoFontFace. The size field of the resulting font description
will be unset.
Parameters
face
a PangoFontFace
Returns
a newly-created PangoFontDescription structure
holding the description of the face. Use pango_font_description_free()
to free the result.
pango_font_face_is_synthesized ()
pango_font_face_is_synthesized
gboolean
pango_font_face_is_synthesized (PangoFontFace *face);
Returns whether a PangoFontFace is synthesized by the underlying
font rendering engine from another face, perhaps by shearing, emboldening,
or lightening it.
Parameters
face
a PangoFontFace
Returns
whether face
is synthesized.
Since: 1.18
pango_font_face_get_family ()
pango_font_face_get_family
PangoFontFamily *
pango_font_face_get_family (PangoFontFace *face);
Gets the PangoFontFamily that face
belongs to.
Parameters
face
a PangoFontFace
Returns
the PangoFontFamily.
[transfer none]
Since: 1.46
pango_font_map_create_context ()
pango_font_map_create_context
PangoContext *
pango_font_map_create_context (PangoFontMap *fontmap);
Creates a PangoContext connected to fontmap
. This is equivalent
to pango_context_new() followed by pango_context_set_font_map().
If you are using Pango as part of a higher-level system,
that system may have it's own way of create a PangoContext.
For instance, the GTK+ toolkit has, among others,
gdk_pango_context_get_for_screen(), and
gtk_widget_get_pango_context(). Use those instead.
Parameters
fontmap
a PangoFontMap
Returns
the newly allocated PangoContext,
which should be freed with g_object_unref().
[transfer full]
Since: 1.22
pango_font_map_load_font ()
pango_font_map_load_font
PangoFont *
pango_font_map_load_font (PangoFontMap *fontmap,
PangoContext *context,
const PangoFontDescription *desc);
Load the font in the fontmap that is the closest match for desc
.
Parameters
fontmap
a PangoFontMap
context
the PangoContext the font will be used with
desc
a PangoFontDescription describing the font to load
Returns
the newly allocated PangoFont
loaded, or NULL if no font matched.
[transfer full][nullable]
pango_font_map_load_fontset ()
pango_font_map_load_fontset
PangoFontset *
pango_font_map_load_fontset (PangoFontMap *fontmap,
PangoContext *context,
const PangoFontDescription *desc,
PangoLanguage *language);
Load a set of fonts in the fontmap that can be used to render
a font matching desc
.
Parameters
fontmap
a PangoFontMap
context
the PangoContext the font will be used with
desc
a PangoFontDescription describing the font to load
language
a PangoLanguage the fonts will be used for
Returns
the newly allocated
PangoFontset loaded, or NULL if no font matched.
[transfer full][nullable]
pango_font_map_list_families ()
pango_font_map_list_families
void
pango_font_map_list_families (PangoFontMap *fontmap,
PangoFontFamily ***families,
int *n_families);
List all families for a fontmap.
Parameters
fontmap
a PangoFontMap
families
location to store a pointer to an array of PangoFontFamily *.
This array should be freed with g_free().
[out][array length=n_families][transfer container]
n_families
location to store the number of elements in families
.
[out]
pango_font_map_get_family ()
pango_font_map_get_family
PangoFontFamily *
pango_font_map_get_family (PangoFontMap *fontmap,
const char *name);
Gets a font family by name.
Parameters
fontmap
a PangoFontMap
name
a family name
Returns
the PangoFontFamily.
[transfer none]
Since: 1.46
pango_font_map_get_serial ()
pango_font_map_get_serial
guint
pango_font_map_get_serial (PangoFontMap *fontmap);
Returns the current serial number of fontmap
. The serial number is
initialized to an small number larger than zero when a new fontmap
is created and is increased whenever the fontmap is changed. It may
wrap, but will never have the value 0. Since it can wrap, never compare
it with "less than", always use "not equals".
The fontmap can only be changed using backend-specific API, like changing
fontmap resolution.
This can be used to automatically detect changes to a PangoFontMap, like
in PangoContext.
Parameters
fontmap
a PangoFontMap
Returns
The current serial number of fontmap
.
Since: 1.32.4
pango_font_map_changed ()
pango_font_map_changed
void
pango_font_map_changed (PangoFontMap *fontmap);
Forces a change in the context, which will cause any PangoContext
using this fontmap to change.
This function is only useful when implementing a new backend
for Pango, something applications won't do. Backends should
call this function if they have attached extra data to the context
and such data is changed.
Parameters
fontmap
a PangoFontMap
Since: 1.34
pango_fontset_get_font ()
pango_fontset_get_font
PangoFont *
pango_fontset_get_font (PangoFontset *fontset,
guint wc);
Returns the font in the fontset that contains the best glyph for the
Unicode character wc
.
Parameters
fontset
a PangoFontset
wc
a Unicode character
Returns
a PangoFont. The caller must call
g_object_unref when finished with the font.
[transfer full]
pango_fontset_get_metrics ()
pango_fontset_get_metrics
PangoFontMetrics *
pango_fontset_get_metrics (PangoFontset *fontset);
Get overall metric information for the fonts in the fontset.
Parameters
fontset
a PangoFontset
Returns
a PangoFontMetrics object. The caller must call pango_font_metrics_unref()
when finished using the object.
PangoFontsetForeachFunc ()
PangoFontsetForeachFunc
gboolean
(*PangoFontsetForeachFunc) (PangoFontset *fontset,
PangoFont *font,
gpointer user_data);
A callback function used by pango_fontset_foreach() when enumerating
the fonts in a fontset.
Parameters
fontset
a PangoFontset
font
a font from fontset
user_data
callback data
Returns
if TRUE, stop iteration and return immediately.
Since: 1.4
pango_fontset_foreach ()
pango_fontset_foreach
void
pango_fontset_foreach (PangoFontset *fontset,
PangoFontsetForeachFunc func,
gpointer data);
Iterates through all the fonts in a fontset, calling func
for
each one. If func
returns TRUE, that stops the iteration.
Parameters
fontset
a PangoFontset
func
Callback function.
[closure data][scope call]
data
data to pass to the callback function.
[closure]
Since: 1.4
Types and Values
PangoFontDescription
PangoFontDescription
typedef struct _PangoFontDescription PangoFontDescription;
The PangoFontDescription structure represents the description
of an ideal font. These structures are used both to list
what fonts are available on the system and also for specifying
the characteristics of a font to load.
enum PangoStyle
PangoStyle
An enumeration specifying the various slant styles possible for a font.
Members
PANGO_STYLE_NORMAL
the font is upright.
PANGO_STYLE_OBLIQUE
the font is slanted, but in a roman style.
PANGO_STYLE_ITALIC
the font is slanted in an italic style.
enum PangoWeight
PangoWeight
An enumeration specifying the weight (boldness) of a font. This is a numerical
value ranging from 100 to 1000, but there are some predefined values:
Members
PANGO_WEIGHT_THIN
the thin weight (= 100; Since: 1.24)
PANGO_WEIGHT_ULTRALIGHT
the ultralight weight (= 200)
PANGO_WEIGHT_LIGHT
the light weight (= 300)
PANGO_WEIGHT_SEMILIGHT
the semilight weight (= 350; Since: 1.36.7)
PANGO_WEIGHT_BOOK
the book weight (= 380; Since: 1.24)
PANGO_WEIGHT_NORMAL
the default weight (= 400)
PANGO_WEIGHT_MEDIUM
the normal weight (= 500; Since: 1.24)
PANGO_WEIGHT_SEMIBOLD
the semibold weight (= 600)
PANGO_WEIGHT_BOLD
the bold weight (= 700)
PANGO_WEIGHT_ULTRABOLD
the ultrabold weight (= 800)
PANGO_WEIGHT_HEAVY
the heavy weight (= 900)
PANGO_WEIGHT_ULTRAHEAVY
the ultraheavy weight (= 1000; Since: 1.24)
enum PangoVariant
PangoVariant
An enumeration specifying capitalization variant of the font.
Members
PANGO_VARIANT_NORMAL
A normal font.
PANGO_VARIANT_SMALL_CAPS
A font with the lower case characters
replaced by smaller variants of the capital characters.
enum PangoStretch
PangoStretch
An enumeration specifying the width of the font relative to other designs
within a family.
Members
PANGO_STRETCH_ULTRA_CONDENSED
ultra condensed width
extra condensed width
PANGO_STRETCH_CONDENSED
condensed width
PANGO_STRETCH_SEMI_CONDENSED
semi condensed width
PANGO_STRETCH_NORMAL
the normal width
PANGO_STRETCH_SEMI_EXPANDED
semi expanded width
PANGO_STRETCH_EXPANDED
expanded width
PANGO_STRETCH_EXTRA_EXPANDED
extra expanded width
PANGO_STRETCH_ULTRA_EXPANDED
ultra expanded width
enum PangoFontMask
PangoFontMask
The bits in a PangoFontMask correspond to fields in a
PangoFontDescription that have been set.
Members
PANGO_FONT_MASK_FAMILY
the font family is specified.
PANGO_FONT_MASK_STYLE
the font style is specified.
PANGO_FONT_MASK_VARIANT
the font variant is specified.
PANGO_FONT_MASK_WEIGHT
the font weight is specified.
PANGO_FONT_MASK_STRETCH
the font stretch is specified.
PANGO_FONT_MASK_SIZE
the font size is specified.
PANGO_FONT_MASK_GRAVITY
the font gravity is specified (Since: 1.16.)
PANGO_FONT_MASK_VARIATIONS
OpenType font variations are specified (Since: 1.42)
struct PangoFontMetrics
PangoFontMetrics
struct PangoFontMetrics {
};
A PangoFontMetrics structure holds the overall metric information
for a font (possibly restricted to a script). The fields of this
structure are private to implementations of a font backend. See
the documentation of the corresponding getters for documentation
of their meaning.
PangoFont
PangoFont
typedef struct _PangoFont PangoFont;
PangoFont is deprecated and should not be used in newly-written code.
The PangoFont structure is used to represent
a font in a rendering-system-independent matter.
To create an implementation of a PangoFont,
the rendering-system specific code should allocate
a larger structure that contains a nested
PangoFont, fill in the klass member of
the nested PangoFont with a pointer to
a appropriate PangoFontClass, then call
pango_font_init() on the structure.
The PangoFont structure contains one member
which the implementation fills in.
struct PangoFontFamily
PangoFontFamily
struct PangoFontFamily;
PangoFontFamily is deprecated and should not be used in newly-written code.
The PangoFontFamily structure is used to represent a family of related
font faces. The faces in a family share a common design, but differ in
slant, weight, width and other aspects.
struct PangoFontFace
PangoFontFace
struct PangoFontFace;
PangoFontFace is deprecated and should not be used in newly-written code.
The PangoFontFace structure is used to represent a group of fonts with
the same family, slant, weight, width, but varying sizes.
PangoFontMap
PangoFontMap
typedef struct _PangoFontMap PangoFontMap;
The PangoFontMap represents the set of fonts available for a
particular rendering system. This is a virtual object with
implementations being specific to particular rendering systems. To
create an implementation of a PangoFontMap, the rendering-system
specific code should allocate a larger structure that contains a nested
PangoFontMap, fill in the klass member of the nested PangoFontMap with a
pointer to a appropriate PangoFontMapClass, then call
pango_font_map_init() on the structure.
The PangoFontMap structure contains one member which the implementation
fills in.
struct PangoFontMapClass
PangoFontMapClass
struct PangoFontMapClass {
GObjectClass parent_class;
PangoFont * (*load_font) (PangoFontMap *fontmap,
PangoContext *context,
const PangoFontDescription *desc);
void (*list_families) (PangoFontMap *fontmap,
PangoFontFamily ***families,
int *n_families);
PangoFontset *(*load_fontset) (PangoFontMap *fontmap,
PangoContext *context,
const PangoFontDescription *desc,
PangoLanguage *language);
const char *shape_engine_type;
guint (*get_serial) (PangoFontMap *fontmap);
void (*changed) (PangoFontMap *fontmap);
PangoFontFamily * (*get_family) (PangoFontMap *fontmap,
const char *name);
PangoFontFace * (*get_face) (PangoFontMap *fontmap,
PangoFont *font);
};
The PangoFontMapClass structure holds the virtual functions for
a particular PangoFontMap implementation.
Members
load_font ()
a function to load a font with a given description. See
pango_font_map_load_font().
list_families ()
A function to list available font families. See
pango_font_map_list_families().
load_fontset ()
a function to load a fontset with a given given description
suitable for a particular language. See pango_font_map_load_fontset().
const char *shape_engine_type;
the type of rendering-system-dependent engines that
can handle fonts of this fonts loaded with this fontmap.
get_serial ()
a function to get the serial number of the fontmap.
See pango_font_map_get_serial().
changed ()
See pango_font_map_changed()
get_family ()
get_face ()
struct PangoFontset
PangoFontset
struct PangoFontset;
A PangoFontset represents a set of PangoFont to use
when rendering text. It is the result of resolving a
PangoFontDescription against a particular PangoContext.
It has operations for finding the component font for
a particular Unicode character, and for finding a composite
set of metrics for the entire fontset.
struct PangoFontsetClass
PangoFontsetClass
struct PangoFontsetClass {
GObjectClass parent_class;
PangoFont * (*get_font) (PangoFontset *fontset,
guint wc);
PangoFontMetrics *(*get_metrics) (PangoFontset *fontset);
PangoLanguage * (*get_language) (PangoFontset *fontset);
void (*foreach) (PangoFontset *fontset,
PangoFontsetForeachFunc func,
gpointer data);
};
The PangoFontsetClass structure holds the virtual functions for
a particular PangoFontset implementation.
Members
get_font ()
a function to get the font in the fontset that contains the
best glyph for the given Unicode character; see pango_fontset_get_font().
get_metrics ()
a function to get overall metric information for the fonts
in the fontset; see pango_fontset_get_metrics().
get_language ()
a function to get the language of the fontset.
foreach ()
a function to loop over the fonts in the fontset. See
pango_fontset_foreach().
docs/xml/api-index-1.46.xml 0000664 0001750 0001750 00000005252 13751777750 015453 0 ustar mclasen mclasen
]>
A
pango_attr_list_equal, function in Text Attributes
pango_attr_overline_color_new, function in Text Attributes
pango_attr_overline_new, function in Text Attributes
C
pango_color_parse_with_alpha, function in Text Attributes
F
pango_font_face_get_family, function in Fonts
pango_font_family_get_face, function in Fonts
pango_font_get_face, function in Fonts
pango_font_map_get_family, function in Fonts
L
pango_layout_get_direction, function in Layout Objects
O
PangoOverline, enum in Text Attributes
docs/xml/text-attributes.xml 0000664 0001750 0001750 00000570026 13751777747 016373 0 ustar mclasen mclasen
]>
Attributes
3
PANGO Library
Attributes
Font and other attributes for annotating text
Functions
PangoAttrType
pango_attr_type_register ()
const char *
pango_attr_type_get_name ()
void
pango_attribute_init ()
PangoAttribute *
pango_attribute_copy ()
gboolean
pango_attribute_equal ()
void
pango_attribute_destroy ()
PangoAttribute *
pango_attr_language_new ()
PangoAttribute *
pango_attr_family_new ()
PangoAttribute *
pango_attr_style_new ()
PangoAttribute *
pango_attr_variant_new ()
PangoAttribute *
pango_attr_stretch_new ()
PangoAttribute *
pango_attr_weight_new ()
PangoAttribute *
pango_attr_size_new ()
PangoAttribute *
pango_attr_size_new_absolute ()
PangoAttribute *
pango_attr_font_desc_new ()
PangoAttribute *
pango_attr_foreground_new ()
PangoAttribute *
pango_attr_background_new ()
PangoAttribute *
pango_attr_strikethrough_new ()
PangoAttribute *
pango_attr_strikethrough_color_new ()
PangoAttribute *
pango_attr_underline_new ()
PangoAttribute *
pango_attr_underline_color_new ()
PangoAttribute *
pango_attr_overline_new ()
PangoAttribute *
pango_attr_overline_color_new ()
PangoAttribute *
pango_attr_shape_new ()
PangoAttribute *
pango_attr_shape_new_with_data ()
gpointer
(*PangoAttrDataCopyFunc) ()
PangoAttribute *
pango_attr_scale_new ()
PangoAttribute *
pango_attr_rise_new ()
PangoAttribute *
pango_attr_letter_spacing_new ()
PangoAttribute *
pango_attr_fallback_new ()
PangoAttribute *
pango_attr_gravity_new ()
PangoAttribute *
pango_attr_gravity_hint_new ()
PangoAttribute *
pango_attr_font_features_new ()
PangoAttribute *
pango_attr_foreground_alpha_new ()
PangoAttribute *
pango_attr_background_alpha_new ()
PangoAttribute *
pango_attr_allow_breaks_new ()
PangoAttribute *
pango_attr_insert_hyphens_new ()
PangoAttribute *
pango_attr_show_new ()
gboolean
pango_color_parse ()
gboolean
pango_color_parse_with_alpha ()
PangoColor *
pango_color_copy ()
void
pango_color_free ()
gchar *
pango_color_to_string ()
PangoAttrList *
pango_attr_list_new ()
PangoAttrList *
pango_attr_list_ref ()
void
pango_attr_list_unref ()
PangoAttrList *
pango_attr_list_copy ()
void
pango_attr_list_insert ()
void
pango_attr_list_insert_before ()
void
pango_attr_list_change ()
void
pango_attr_list_splice ()
PangoAttrList *
pango_attr_list_filter ()
void
pango_attr_list_update ()
gboolean
(*PangoAttrFilterFunc) ()
GSList *
pango_attr_list_get_attributes ()
gboolean
pango_attr_list_equal ()
PangoAttrIterator *
pango_attr_list_get_iterator ()
PangoAttrIterator *
pango_attr_iterator_copy ()
gboolean
pango_attr_iterator_next ()
void
pango_attr_iterator_range ()
PangoAttribute *
pango_attr_iterator_get ()
void
pango_attr_iterator_get_font ()
GSList *
pango_attr_iterator_get_attrs ()
void
pango_attr_iterator_destroy ()
Types and Values
enumPangoAttrType
structPangoAttrClass
structPangoAttribute
#definePANGO_ATTR_INDEX_FROM_TEXT_BEGINNING
#definePANGO_ATTR_INDEX_TO_TEXT_END
structPangoAttrString
structPangoAttrLanguage
structPangoAttrColor
structPangoAttrInt
structPangoAttrFloat
structPangoAttrFontDesc
structPangoAttrShape
structPangoAttrSize
structPangoAttrFontFeatures
enumPangoUnderline
enumPangoOverline
#definePANGO_SCALE_XX_SMALL
#definePANGO_SCALE_X_SMALL
#definePANGO_SCALE_SMALL
#definePANGO_SCALE_MEDIUM
#definePANGO_SCALE_LARGE
#definePANGO_SCALE_X_LARGE
#definePANGO_SCALE_XX_LARGE
enumPangoShowFlags
structPangoColor
PangoAttrList
PangoAttrIterator
Object Hierarchy
GBoxed
├── PangoAttrIterator
├── PangoAttrList
├── PangoAttribute
╰── PangoColor
GEnum
├── PangoAttrType
╰── PangoUnderline
GFlags
╰── PangoShowFlags
Description
Attributed text is used in a number of places in Pango. It
is used as the input to the itemization process and also when
creating a PangoLayout. The data types and functions in
this section are used to represent and manipulate sets
of attributes applied to a portion of text.
Functions
pango_attr_type_register ()
pango_attr_type_register
PangoAttrType
pango_attr_type_register (const gchar *name);
Allocate a new attribute type ID. The attribute type name can be accessed
later by using pango_attr_type_get_name().
Parameters
name
an identifier for the type
Returns
the new type ID.
pango_attr_type_get_name ()
pango_attr_type_get_name
const char *
pango_attr_type_get_name (PangoAttrType type);
Fetches the attribute type name passed in when registering the type using
pango_attr_type_register().
The returned value is an interned string (see g_intern_string() for what
that means) that should not be modified or freed.
Parameters
type
an attribute type ID to fetch the name for
Returns
the type ID name (which may be NULL), or
NULL if type
is a built-in Pango attribute type or invalid.
[nullable]
Since: 1.22
pango_attribute_init ()
pango_attribute_init
void
pango_attribute_init (PangoAttribute *attr,
const PangoAttrClass *klass);
Initializes attr
's klass to klass
,
it's start_index to PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING
and end_index to PANGO_ATTR_INDEX_TO_TEXT_END
such that the attribute applies
to the entire text by default.
Parameters
attr
a PangoAttribute
klass
a PangoAttrClass
Since: 1.20
pango_attribute_copy ()
pango_attribute_copy
PangoAttribute *
pango_attribute_copy (const PangoAttribute *attr);
Make a copy of an attribute.
Parameters
attr
a PangoAttribute
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
pango_attribute_equal ()
pango_attribute_equal
gboolean
pango_attribute_equal (const PangoAttribute *attr1,
const PangoAttribute *attr2);
Compare two attributes for equality. This compares only the
actual value of the two attributes and not the ranges that the
attributes apply to.
Parameters
attr1
a PangoAttribute
attr2
another PangoAttribute
Returns
TRUE if the two attributes have the same value.
pango_attribute_destroy ()
pango_attribute_destroy
void
pango_attribute_destroy (PangoAttribute *attr);
Destroy a PangoAttribute and free all associated memory.
Parameters
attr
a PangoAttribute.
pango_attr_language_new ()
pango_attr_language_new
PangoAttribute *
pango_attr_language_new (PangoLanguage *language);
Create a new language tag attribute.
Parameters
language
language tag
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
pango_attr_family_new ()
pango_attr_family_new
PangoAttribute *
pango_attr_family_new (const char *family);
Create a new font family attribute.
Parameters
family
the family or comma separated list of families
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
pango_attr_style_new ()
pango_attr_style_new
PangoAttribute *
pango_attr_style_new (PangoStyle style);
Create a new font slant style attribute.
Parameters
style
the slant style
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
pango_attr_variant_new ()
pango_attr_variant_new
PangoAttribute *
pango_attr_variant_new (PangoVariant variant);
Create a new font variant attribute (normal or small caps)
Parameters
variant
the variant
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
pango_attr_stretch_new ()
pango_attr_stretch_new
PangoAttribute *
pango_attr_stretch_new (PangoStretch stretch);
Create a new font stretch attribute
Parameters
stretch
the stretch
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
pango_attr_weight_new ()
pango_attr_weight_new
PangoAttribute *
pango_attr_weight_new (PangoWeight weight);
Create a new font weight attribute.
Parameters
weight
the weight
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
pango_attr_size_new ()
pango_attr_size_new
PangoAttribute *
pango_attr_size_new (int size);
Create a new font-size attribute in fractional points.
Parameters
size
the font size, in PANGO_SCALEths of a point.
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
pango_attr_size_new_absolute ()
pango_attr_size_new_absolute
PangoAttribute *
pango_attr_size_new_absolute (int size);
Create a new font-size attribute in device units.
Parameters
size
the font size, in PANGO_SCALEths of a device unit.
Returns
the newly allocated PangoAttribute, which should be
freed with pango_attribute_destroy().
Since: 1.8
pango_attr_font_desc_new ()
pango_attr_font_desc_new
PangoAttribute *
pango_attr_font_desc_new (const PangoFontDescription *desc);
Create a new font description attribute. This attribute
allows setting family, style, weight, variant, stretch,
and size simultaneously.
Parameters
desc
the font description
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
pango_attr_foreground_new ()
pango_attr_foreground_new
PangoAttribute *
pango_attr_foreground_new (guint16 red,
guint16 green,
guint16 blue);
Create a new foreground color attribute.
Parameters
red
the red value (ranging from 0 to 65535)
green
the green value
blue
the blue value
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
pango_attr_background_new ()
pango_attr_background_new
PangoAttribute *
pango_attr_background_new (guint16 red,
guint16 green,
guint16 blue);
Create a new background color attribute.
Parameters
red
the red value (ranging from 0 to 65535)
green
the green value
blue
the blue value
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
pango_attr_strikethrough_new ()
pango_attr_strikethrough_new
PangoAttribute *
pango_attr_strikethrough_new (gboolean strikethrough);
Create a new strike-through attribute.
Parameters
strikethrough
TRUE if the text should be struck-through.
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
pango_attr_strikethrough_color_new ()
pango_attr_strikethrough_color_new
PangoAttribute *
pango_attr_strikethrough_color_new (guint16 red,
guint16 green,
guint16 blue);
Create a new strikethrough color attribute. This attribute
modifies the color of strikethrough lines. If not set, strikethrough
lines will use the foreground color.
Parameters
red
the red value (ranging from 0 to 65535)
green
the green value
blue
the blue value
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
Since: 1.8
pango_attr_underline_new ()
pango_attr_underline_new
PangoAttribute *
pango_attr_underline_new (PangoUnderline underline);
Create a new underline-style attribute.
Parameters
underline
the underline style.
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
pango_attr_underline_color_new ()
pango_attr_underline_color_new
PangoAttribute *
pango_attr_underline_color_new (guint16 red,
guint16 green,
guint16 blue);
Create a new underline color attribute. This attribute
modifies the color of underlines. If not set, underlines
will use the foreground color.
Parameters
red
the red value (ranging from 0 to 65535)
green
the green value
blue
the blue value
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
Since: 1.8
pango_attr_overline_new ()
pango_attr_overline_new
PangoAttribute *
pango_attr_overline_new (PangoOverline overline);
Create a new overline-style attribute.
Parameters
overline
the overline style
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
Since: 1.46
pango_attr_overline_color_new ()
pango_attr_overline_color_new
PangoAttribute *
pango_attr_overline_color_new (guint16 red,
guint16 green,
guint16 blue);
Create a new overline color attribute. This attribute
modifies the color of overlines. If not set, overlines
will use the foreground color.
Parameters
red
the red value (ranging from 0 to 65535)
green
the green value
blue
the blue value
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
Since: 1.46
pango_attr_shape_new ()
pango_attr_shape_new
PangoAttribute *
pango_attr_shape_new (const PangoRectangle *ink_rect,
const PangoRectangle *logical_rect);
Create a new shape attribute. A shape is used to impose a
particular ink and logical rectangle on the result of shaping a
particular glyph. This might be used, for instance, for
embedding a picture or a widget inside a PangoLayout.
Parameters
ink_rect
ink rectangle to assign to each character
logical_rect
logical rectangle to assign to each character
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
pango_attr_shape_new_with_data ()
pango_attr_shape_new_with_data
PangoAttribute *
pango_attr_shape_new_with_data (const PangoRectangle *ink_rect,
const PangoRectangle *logical_rect,
gpointer data,
PangoAttrDataCopyFunc copy_func,
GDestroyNotify destroy_func);
Like pango_attr_shape_new(), but a user data pointer is also
provided; this pointer can be accessed when later
rendering the glyph.
Parameters
ink_rect
ink rectangle to assign to each character
logical_rect
logical rectangle to assign to each character
data
user data pointer
copy_func
function to copy data
when the
attribute is copied. If NULL, data
is simply
copied as a pointer.
[allow-none]
destroy_func
function to free data
when the
attribute is freed, or NULL.
[allow-none]
Returns
the newly allocated PangoAttribute, which should be
freed with pango_attribute_destroy().
Since: 1.8
PangoAttrDataCopyFunc ()
PangoAttrDataCopyFunc
gpointer
(*PangoAttrDataCopyFunc) (gconstpointer user_data);
Type of a function that can duplicate user data for an attribute.
Parameters
user_data
user data to copy
Returns
new copy of user_data
.
pango_attr_scale_new ()
pango_attr_scale_new
PangoAttribute *
pango_attr_scale_new (double scale_factor);
Create a new font size scale attribute. The base font for the
affected text will have its size multiplied by scale_factor
.
Parameters
scale_factor
factor to scale the font
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
pango_attr_rise_new ()
pango_attr_rise_new
PangoAttribute *
pango_attr_rise_new (int rise);
Create a new baseline displacement attribute.
Parameters
rise
the amount that the text should be displaced vertically,
in Pango units. Positive values displace the text upwards.
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
pango_attr_letter_spacing_new ()
pango_attr_letter_spacing_new
PangoAttribute *
pango_attr_letter_spacing_new (int letter_spacing);
Create a new letter-spacing attribute.
Parameters
letter_spacing
amount of extra space to add between graphemes
of the text, in Pango units.
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
Since: 1.6
pango_attr_fallback_new ()
pango_attr_fallback_new
PangoAttribute *
pango_attr_fallback_new (gboolean enable_fallback);
Create a new font fallback attribute.
If fallback is disabled, characters will only be used from the
closest matching font on the system. No fallback will be done to
other fonts on the system that might contain the characters in the
text.
Parameters
enable_fallback
TRUE if we should fall back on other fonts
for characters the active font is missing.
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
Since: 1.4
pango_attr_gravity_new ()
pango_attr_gravity_new
PangoAttribute *
pango_attr_gravity_new (PangoGravity gravity);
Create a new gravity attribute.
Parameters
gravity
the gravity value; should not be PANGO_GRAVITY_AUTO.
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
Since: 1.16
pango_attr_gravity_hint_new ()
pango_attr_gravity_hint_new
PangoAttribute *
pango_attr_gravity_hint_new (PangoGravityHint hint);
Create a new gravity hint attribute.
Parameters
hint
the gravity hint value.
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
Since: 1.16
pango_attr_font_features_new ()
pango_attr_font_features_new
PangoAttribute *
pango_attr_font_features_new (const gchar *features);
Create a new font features tag attribute.
Parameters
features
a string with OpenType font features, in CSS syntax
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
Since: 1.38
pango_attr_foreground_alpha_new ()
pango_attr_foreground_alpha_new
PangoAttribute *
pango_attr_foreground_alpha_new (guint16 alpha);
Create a new foreground alpha attribute.
Parameters
alpha
the alpha value, between 1 and 65536
Returns
the new allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
Since: 1.38
pango_attr_background_alpha_new ()
pango_attr_background_alpha_new
PangoAttribute *
pango_attr_background_alpha_new (guint16 alpha);
Create a new background alpha attribute.
Parameters
alpha
the alpha value, between 1 and 65536
Returns
the new allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
Since: 1.38
pango_attr_allow_breaks_new ()
pango_attr_allow_breaks_new
PangoAttribute *
pango_attr_allow_breaks_new (gboolean allow_breaks);
Create a new allow-breaks attribute.
If breaks are disabled, the range will be kept in a
single run, as far as possible.
Parameters
allow_breaks
TRUE if we line breaks are allowed
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
Since: 1.44
pango_attr_insert_hyphens_new ()
pango_attr_insert_hyphens_new
PangoAttribute *
pango_attr_insert_hyphens_new (gboolean insert_hyphens);
Create a new insert-hyphens attribute.
Pango will insert hyphens when breaking lines in the middle
of a word. This attribute can be used to suppress the hyphen.
Parameters
insert_hyphens
TRUE if hyphens should be inserted
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
Since: 1.44
pango_attr_show_new ()
pango_attr_show_new
PangoAttribute *
pango_attr_show_new (PangoShowFlags flags);
Create a new attribute that influences how invisible
characters are rendered.
Parameters
flags
PangoShowFlags to apply
Returns
the newly allocated PangoAttribute,
which should be freed with pango_attribute_destroy().
[transfer full]
Since: 1.44
pango_color_parse ()
pango_color_parse
gboolean
pango_color_parse (PangoColor *color,
const char *spec);
Fill in the fields of a color from a string specification. The
string can either one of a large set of standard names. (Taken
from the CSS specification), or it can be a hexadecimal
value in the
form '#rgb' '#rrggbb' '#rrrgggbbb' or '#rrrrggggbbbb' where
'r', 'g' and 'b' are hex digits of the red, green, and blue
components of the color, respectively. (White in the four
forms is '#fff' '#ffffff' '#fffffffff' and '#ffffffffffff')
Parameters
color
a PangoColor structure in which to store the
result, or NULL.
[nullable]
spec
a string specifying the new color
Returns
TRUE if parsing of the specifier succeeded,
otherwise false.
pango_color_parse_with_alpha ()
pango_color_parse_with_alpha
gboolean
pango_color_parse_with_alpha (PangoColor *color,
guint16 *alpha,
const char *spec);
Fill in the fields of a color from a string specification. The
string can either one of a large set of standard names. (Taken
from the CSS specification), or it can be a hexadecimal
value in the
form '#rgb' '#rrggbb' '#rrrgggbbb' or '#rrrrggggbbbb' where
'r', 'g' and 'b' are hex digits of the red, green, and blue
components of the color, respectively. (White in the four
forms is '#fff' '#ffffff' '#fffffffff' and '#ffffffffffff')
Additionally, parse strings of the form
'#rgba', '#rrggbbaa', '#rrrrggggbbbbaaaa',
if alpha
is not NULL, and set alpha
to the value specified
by the hex digits for 'a'. If no alpha component is found
in spec
, alpha
is set to 0xffff (for a solid color).
Parameters
color
a PangoColor structure in which to store the
result, or NULL.
[nullable]
alpha
return location for alpha, or NULL.
[out][optional]
spec
a string specifying the new color
Returns
TRUE if parsing of the specifier succeeded,
otherwise false.
Since: 1.46
pango_color_copy ()
pango_color_copy
PangoColor *
pango_color_copy (const PangoColor *src);
Creates a copy of src
, which should be freed with
pango_color_free(). Primarily used by language bindings,
not that useful otherwise (since colors can just be copied
by assignment in C).
Parameters
src
color to copy, may be NULL.
[nullable]
Returns
the newly allocated PangoColor, which
should be freed with pango_color_free(), or NULL if
src
was NULL.
[nullable]
pango_color_free ()
pango_color_free
void
pango_color_free (PangoColor *color);
Frees a color allocated by pango_color_copy().
Parameters
color
an allocated PangoColor, may be NULL.
[nullable]
pango_color_to_string ()
pango_color_to_string
gchar *
pango_color_to_string (const PangoColor *color);
Returns a textual specification of color
in the hexadecimal form
#rrrrggggbbbb, where r,
g and b are hex digits representing
the red, green, and blue components respectively.
Parameters
color
a PangoColor
Returns
a newly-allocated text string that must be freed with g_free().
Since: 1.16
pango_attr_list_new ()
pango_attr_list_new
PangoAttrList *
pango_attr_list_new (void);
Create a new empty attribute list with a reference count of one.
Returns
the newly allocated PangoAttrList,
which should be freed with pango_attr_list_unref().
[transfer full]
pango_attr_list_ref ()
pango_attr_list_ref
PangoAttrList *
pango_attr_list_ref (PangoAttrList *list);
Increase the reference count of the given attribute list by one.
Parameters
list
a PangoAttrList, may be NULL.
[nullable]
Returns
The attribute list passed in
Since: 1.10
pango_attr_list_unref ()
pango_attr_list_unref
void
pango_attr_list_unref (PangoAttrList *list);
Decrease the reference count of the given attribute list by one.
If the result is zero, free the attribute list and the attributes
it contains.
Parameters
list
a PangoAttrList, may be NULL.
[nullable]
pango_attr_list_copy ()
pango_attr_list_copy
PangoAttrList *
pango_attr_list_copy (PangoAttrList *list);
Copy list
and return an identical new list.
Parameters
list
a PangoAttrList, may be NULL.
[nullable]
Returns
the newly allocated PangoAttrList, with a
reference count of one, which should
be freed with pango_attr_list_unref().
Returns NULL if list
was NULL.
[nullable]
pango_attr_list_insert ()
pango_attr_list_insert
void
pango_attr_list_insert (PangoAttrList *list,
PangoAttribute *attr);
Insert the given attribute into the PangoAttrList. It will
be inserted after all other attributes with a matching
start_index
.
Parameters
list
a PangoAttrList
attr
the attribute to insert. Ownership of this
value is assumed by the list.
[transfer full]
pango_attr_list_insert_before ()
pango_attr_list_insert_before
void
pango_attr_list_insert_before (PangoAttrList *list,
PangoAttribute *attr);
Insert the given attribute into the PangoAttrList. It will
be inserted before all other attributes with a matching
start_index
.
Parameters
list
a PangoAttrList
attr
the attribute to insert. Ownership of this
value is assumed by the list.
[transfer full]
pango_attr_list_change ()
pango_attr_list_change
void
pango_attr_list_change (PangoAttrList *list,
PangoAttribute *attr);
Insert the given attribute into the PangoAttrList. It will
replace any attributes of the same type on that segment
and be merged with any adjoining attributes that are identical.
This function is slower than pango_attr_list_insert() for
creating an attribute list in order (potentially much slower
for large lists). However, pango_attr_list_insert() is not
suitable for continually changing a set of attributes
since it never removes or combines existing attributes.
Parameters
list
a PangoAttrList
attr
the attribute to insert. Ownership of this
value is assumed by the list.
[transfer full]
pango_attr_list_splice ()
pango_attr_list_splice
void
pango_attr_list_splice (PangoAttrList *list,
PangoAttrList *other,
gint pos,
gint len);
This function opens up a hole in list
, fills it in with attributes from
the left, and then merges other
on top of the hole.
This operation is equivalent to stretching every attribute
that applies at position pos
in list
by an amount len
,
and then calling pango_attr_list_change() with a copy
of each attribute in other
in sequence (offset in position by pos
).
This operation proves useful for, for instance, inserting
a pre-edit string in the middle of an edit buffer.
Parameters
list
a PangoAttrList
other
another PangoAttrList
pos
the position in list
at which to insert other
len
the length of the spliced segment. (Note that this
must be specified since the attributes in other
may only be present at some subsection of this range)
pango_attr_list_filter ()
pango_attr_list_filter
PangoAttrList *
pango_attr_list_filter (PangoAttrList *list,
PangoAttrFilterFunc func,
gpointer data);
Given a PangoAttrList and callback function, removes any elements
of list
for which func
returns TRUE and inserts them into
a new list.
Parameters
list
a PangoAttrList
func
callback function; returns TRUE
if an attribute should be filtered out.
[scope call][closure data]
data
Data to be passed to func
.
[closure]
Returns
the new PangoAttrList or
NULL if no attributes of the given types were found.
[transfer full][nullable]
Since: 1.2
pango_attr_list_update ()
pango_attr_list_update
void
pango_attr_list_update (PangoAttrList *list,
int pos,
int remove,
int add);
Update indices of attributes in list
for
a change in the text they refer to.
The change that this function applies is
removing remove
bytes at position pos
and inserting add
bytes instead.
Attributes that fall entirely in the
(pos
, pos
+ remove
) range are removed.
Attributes that start or end inside the
(pos
, pos
+ remove
) range are shortened to
reflect the removal.
Attributes start and end positions are updated
if they are behind pos
+ remove
.
Parameters
list
a PangoAttrList
pos
the position of the change
remove
the number of removed bytes
add
the number of added bytes
Since: 1.44
PangoAttrFilterFunc ()
PangoAttrFilterFunc
gboolean
(*PangoAttrFilterFunc) (PangoAttribute *attribute,
gpointer user_data);
Type of a function filtering a list of attributes.
Parameters
attribute
a Pango attribute
user_data
user data passed to the function
Returns
TRUE if the attribute should be selected for
filtering, FALSE otherwise.
pango_attr_list_get_attributes ()
pango_attr_list_get_attributes
GSList *
pango_attr_list_get_attributes (PangoAttrList *list);
Gets a list of all attributes in list
.
Parameters
list
a PangoAttrList
Returns
a list of all attributes in list
. To free this value, call
pango_attribute_destroy() on each value and g_slist_free()
on the list.
[element-type Pango.Attribute][transfer full]
Since: 1.44
pango_attr_list_equal ()
pango_attr_list_equal
gboolean
pango_attr_list_equal (PangoAttrList *list,
PangoAttrList *other_list);
Checks whether list
and other_list
contain the same attributes and
whether those attributes apply to the same ranges. Beware that this
will return wrong values if any list contains duplicates.
Parameters
list
a PangoAttrList
other_list
the other PangoAttrList
Returns
TRUE if the lists are equal, FALSE if they aren't.
Since: 1.46
pango_attr_list_get_iterator ()
pango_attr_list_get_iterator
PangoAttrIterator *
pango_attr_list_get_iterator (PangoAttrList *list);
Create a iterator initialized to the beginning of the list.
list
must not be modified until this iterator is freed.
Parameters
list
a PangoAttrList
Returns
the newly allocated PangoAttrIterator, which should
be freed with pango_attr_iterator_destroy().
[transfer full]
pango_attr_iterator_copy ()
pango_attr_iterator_copy
PangoAttrIterator *
pango_attr_iterator_copy (PangoAttrIterator *iterator);
Copy a PangoAttrIterator
Parameters
iterator
a PangoAttrIterator.
Returns
the newly allocated
PangoAttrIterator, which should be freed with
pango_attr_iterator_destroy().
[transfer full]
pango_attr_iterator_next ()
pango_attr_iterator_next
gboolean
pango_attr_iterator_next (PangoAttrIterator *iterator);
Advance the iterator until the next change of style.
Parameters
iterator
a PangoAttrIterator
Returns
FALSE if the iterator is at the end of the list, otherwise TRUE
pango_attr_iterator_range ()
pango_attr_iterator_range
void
pango_attr_iterator_range (PangoAttrIterator *iterator,
gint *start,
gint *end);
Get the range of the current segment. Note that the
stored return values are signed, not unsigned like
the values in PangoAttribute. To deal with this API
oversight, stored return values that wouldn't fit into
a signed integer are clamped to G_MAXINT.
Parameters
iterator
a PangoAttrIterator
start
location to store the start of the range.
[out]
end
location to store the end of the range.
[out]
pango_attr_iterator_get ()
pango_attr_iterator_get
PangoAttribute *
pango_attr_iterator_get (PangoAttrIterator *iterator,
PangoAttrType type);
Find the current attribute of a particular type at the iterator
location. When multiple attributes of the same type overlap,
the attribute whose range starts closest to the current location
is used.
Parameters
iterator
a PangoAttrIterator
type
the type of attribute to find.
Returns
the current attribute of the given type,
or NULL if no attribute of that type applies to the
current location.
[nullable][transfer none]
pango_attr_iterator_get_font ()
pango_attr_iterator_get_font
void
pango_attr_iterator_get_font (PangoAttrIterator *iterator,
PangoFontDescription *desc,
PangoLanguage **language,
GSList **extra_attrs);
Get the font and other attributes at the current iterator position.
Parameters
iterator
a PangoAttrIterator
desc
a PangoFontDescription to fill in with the current values.
The family name in this structure will be set using
pango_font_description_set_family_static() using values from
an attribute in the PangoAttrList associated with the iterator,
so if you plan to keep it around, you must call:
pango_font_description_set_family (desc, pango_font_description_get_family (desc)).
language
if non-NULL, location to store language tag for item, or NULL
if none is found.
[allow-none]
extra_attrs
if non-NULL,
location in which to store a list of non-font
attributes at the the current position; only the highest priority
value of each attribute will be added to this list. In order
to free this value, you must call pango_attribute_destroy() on
each member.
[allow-none][element-type Pango.Attribute][transfer full]
pango_attr_iterator_get_attrs ()
pango_attr_iterator_get_attrs
GSList *
pango_attr_iterator_get_attrs (PangoAttrIterator *iterator);
Gets a list of all attributes at the current position of the
iterator.
Parameters
iterator
a PangoAttrIterator
Returns
a list of
all attributes for the current range.
To free this value, call pango_attribute_destroy() on
each value and g_slist_free() on the list.
[element-type Pango.Attribute][transfer full]
Since: 1.2
pango_attr_iterator_destroy ()
pango_attr_iterator_destroy
void
pango_attr_iterator_destroy (PangoAttrIterator *iterator);
Destroy a PangoAttrIterator and free all associated memory.
Parameters
iterator
a PangoAttrIterator.
Types and Values
enum PangoAttrType
PangoAttrType
The PangoAttrType
distinguishes between different types of attributes. Along with the
predefined values, it is possible to allocate additional values
for custom attributes using pango_attr_type_register(). The predefined
values are given below. The type of structure used to store the
attribute is listed in parentheses after the description.
Members
PANGO_ATTR_INVALID
does not happen
PANGO_ATTR_LANGUAGE
language (PangoAttrLanguage)
PANGO_ATTR_FAMILY
font family name list (PangoAttrString)
PANGO_ATTR_STYLE
font slant style (PangoAttrInt)
PANGO_ATTR_WEIGHT
font weight (PangoAttrInt)
PANGO_ATTR_VARIANT
font variant (normal or small caps) (PangoAttrInt)
PANGO_ATTR_STRETCH
font stretch (PangoAttrInt)
PANGO_ATTR_SIZE
font size in points scaled by PANGO_SCALE (PangoAttrInt)
PANGO_ATTR_FONT_DESC
font description (PangoAttrFontDesc)
PANGO_ATTR_FOREGROUND
foreground color (PangoAttrColor)
PANGO_ATTR_BACKGROUND
background color (PangoAttrColor)
PANGO_ATTR_UNDERLINE
whether the text has an underline (PangoAttrInt)
PANGO_ATTR_STRIKETHROUGH
whether the text is struck-through (PangoAttrInt)
PANGO_ATTR_RISE
baseline displacement (PangoAttrInt)
PANGO_ATTR_SHAPE
shape (PangoAttrShape)
PANGO_ATTR_SCALE
font size scale factor (PangoAttrFloat)
PANGO_ATTR_FALLBACK
whether fallback is enabled (PangoAttrInt)
PANGO_ATTR_LETTER_SPACING
letter spacing (PangoAttrInt)
PANGO_ATTR_UNDERLINE_COLOR
underline color (PangoAttrColor)
PANGO_ATTR_STRIKETHROUGH_COLOR
strikethrough color (PangoAttrColor)
PANGO_ATTR_ABSOLUTE_SIZE
font size in pixels scaled by PANGO_SCALE (PangoAttrInt)
PANGO_ATTR_GRAVITY
base text gravity (PangoAttrInt)
PANGO_ATTR_GRAVITY_HINT
gravity hint (PangoAttrInt)
PANGO_ATTR_FONT_FEATURES
OpenType font features (PangoAttrString). Since 1.38
PANGO_ATTR_FOREGROUND_ALPHA
foreground alpha (PangoAttrInt). Since 1.38
PANGO_ATTR_BACKGROUND_ALPHA
background alpha (PangoAttrInt). Since 1.38
PANGO_ATTR_ALLOW_BREAKS
whether breaks are allowed (PangoAttrInt). Since 1.44
PANGO_ATTR_SHOW
how to render invisible characters (PangoAttrInt). Since 1.44
PANGO_ATTR_INSERT_HYPHENS
whether to insert hyphens at intra-word line breaks (PangoAttrInt). Since 1.44
PANGO_ATTR_OVERLINE
whether the text has an overline (PangoAttrInt). Since 1.46
PANGO_ATTR_OVERLINE_COLOR
overline color (PangoAttrColor). Since 1.46
struct PangoAttrClass
PangoAttrClass
struct PangoAttrClass {
PangoAttrType type;
PangoAttribute * (*copy) (const PangoAttribute *attr);
void (*destroy) (PangoAttribute *attr);
gboolean (*equal) (const PangoAttribute *attr1, const PangoAttribute *attr2);
};
The PangoAttrClass structure stores the type and operations for
a particular type of attribute. The functions in this structure should
not be called directly. Instead, one should use the wrapper functions
provided for PangoAttribute.
Members
PangoAttrType type;
the type ID for this attribute
copy ()
function to duplicate an attribute of this type (see pango_attribute_copy())
destroy ()
function to free an attribute of this type (see pango_attribute_destroy())
equal ()
function to check two attributes of this type for equality (see pango_attribute_equal())
struct PangoAttribute
PangoAttribute
struct PangoAttribute {
const PangoAttrClass *klass;
guint start_index; /* in bytes */
guint end_index; /* in bytes. The character at this index is not included */
};
The PangoAttribute structure represents the common portions of all
attributes. Particular types of attributes include this structure
as their initial portion. The common portion of the attribute holds
the range to which the value in the type-specific part of the attribute
applies and should be initialized using pango_attribute_init().
By default an attribute will have an all-inclusive range of [0,G_MAXUINT].
Members
const PangoAttrClass *klass;
the class structure holding information about the type of the attribute
guint start_index;
the start index of the range (in bytes).
guint end_index;
end index of the range (in bytes). The character at this index
is not included in the range.
PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING
PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING
#define PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING 0
This value can be used to set the start_index member of a PangoAttribute
such that the attribute covers from the beginning of the text.
Since: 1.24
PANGO_ATTR_INDEX_TO_TEXT_END
PANGO_ATTR_INDEX_TO_TEXT_END
#define PANGO_ATTR_INDEX_TO_TEXT_END G_MAXUINT
This value can be used to set the end_index member of a PangoAttribute
such that the attribute covers to the end of the text.
Since: 1.24
struct PangoAttrString
PangoAttrString
struct PangoAttrString {
PangoAttribute attr;
char *value;
};
The PangoAttrString structure is used to represent attributes with
a string value.
Members
PangoAttribute attr;
the common portion of the attribute
char *value;
the string which is the value of the attribute
struct PangoAttrLanguage
PangoAttrLanguage
struct PangoAttrLanguage {
PangoAttribute attr;
PangoLanguage *value;
};
The PangoAttrLanguage structure is used to represent attributes that
are languages.
Members
PangoAttribute attr;
the common portion of the attribute
PangoLanguage *value;
the PangoLanguage which is the value of the attribute
struct PangoAttrColor
PangoAttrColor
struct PangoAttrColor {
PangoAttribute attr;
PangoColor color;
};
The PangoAttrColor structure is used to represent attributes that
are colors.
Members
PangoAttribute attr;
the common portion of the attribute
PangoColor color;
the PangoColor which is the value of the attribute
struct PangoAttrInt
PangoAttrInt
struct PangoAttrInt {
PangoAttribute attr;
int value;
};
The PangoAttrInt structure is used to represent attributes with
an integer or enumeration value.
Members
PangoAttribute attr;
the common portion of the attribute
int value;
the value of the attribute
struct PangoAttrFloat
PangoAttrFloat
struct PangoAttrFloat {
PangoAttribute attr;
double value;
};
The PangoAttrFloat structure is used to represent attributes with
a float or double value.
Members
PangoAttribute attr;
the common portion of the attribute
double value;
the value of the attribute
struct PangoAttrFontDesc
PangoAttrFontDesc
struct PangoAttrFontDesc {
PangoAttribute attr;
PangoFontDescription *desc;
};
The PangoAttrFontDesc structure is used to store an attribute that
sets all aspects of the font description at once.
Members
PangoAttribute attr;
the common portion of the attribute
PangoFontDescription *desc;
the font description which is the value of this attribute
struct PangoAttrShape
PangoAttrShape
struct PangoAttrShape {
PangoAttribute attr;
PangoRectangle ink_rect;
PangoRectangle logical_rect;
gpointer data;
PangoAttrDataCopyFunc copy_func;
GDestroyNotify destroy_func;
};
The PangoAttrShape structure is used to represent attributes which
impose shape restrictions.
Members
PangoAttribute attr;
the common portion of the attribute
PangoRectangle ink_rect;
the ink rectangle to restrict to
PangoRectangle logical_rect;
the logical rectangle to restrict to
gpointer data;
user data set (see pango_attr_shape_new_with_data())
PangoAttrDataCopyFunc copy_func;
copy function for the user data
GDestroyNotify destroy_func;
destroy function for the user data
struct PangoAttrSize
PangoAttrSize
struct PangoAttrSize {
PangoAttribute attr;
int size;
guint absolute : 1;
};
The PangoAttrSize structure is used to represent attributes which
set font size.
Members
PangoAttribute attr;
the common portion of the attribute
int size;
size of font, in units of 1/PANGO_SCALE of a point (for
PANGO_ATTR_SIZE) or of a device uni (for PANGO_ATTR_ABSOLUTE_SIZE)
guint absolute : 1;
whether the font size is in device units or points.
This field is only present for compatibility with Pango-1.8.0
(PANGO_ATTR_ABSOLUTE_SIZE was added in 1.8.1); and always will
be FALSE for PANGO_ATTR_SIZE and TRUE for PANGO_ATTR_ABSOLUTE_SIZE.
struct PangoAttrFontFeatures
PangoAttrFontFeatures
struct PangoAttrFontFeatures {
PangoAttribute attr;
gchar *features;
};
The PangoAttrFontFeatures structure is used to represent OpenType
font features as an attribute.
Members
PangoAttribute attr;
the common portion of the attribute
gchar *features;
the featues, as a string in CSS syntax
Since: 1.38
enum PangoUnderline
PangoUnderline
The PangoUnderline enumeration is used to specify
whether text should be underlined, and if so, the type
of underlining.
Members
PANGO_UNDERLINE_NONE
no underline should be drawn
PANGO_UNDERLINE_SINGLE
a single underline should be drawn
PANGO_UNDERLINE_DOUBLE
a double underline should be drawn
PANGO_UNDERLINE_LOW
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.
PANGO_UNDERLINE_ERROR
a wavy underline should be drawn below.
This underline is typically used to indicate an error such
as a possible mispelling; in some cases a contrasting color
may automatically be used. This type of underlining is
available since Pango 1.4.
PANGO_UNDERLINE_SINGLE_LINE
Like PANGO_UNDERLINE_SINGLE
, but
drawn continuously across multiple runs. This type
of underlining is available since Pango 1.46.
PANGO_UNDERLINE_DOUBLE_LINE
Like PANGO_UNDERLINE_DOUBLE
, but
drawn continuously across multiple runs. This type
of underlining is available since Pango 1.46.
PANGO_UNDERLINE_ERROR_LINE
Like PANGO_UNDERLINE_ERROR
, but
drawn continuously across multiple runs. This type
of underlining is available since Pango 1.46.
enum PangoOverline
PangoOverline
The PangoOverline enumeration is used to specify
whether text should be overlined, and if so, the type
of line.
Members
PANGO_OVERLINE_NONE
no overline should be drawn
PANGO_OVERLINE_SINGLE
Draw a single line above the ink
extents of the text being underlined.
Since: 1.46
PANGO_SCALE_XX_SMALL
PANGO_SCALE_XX_SMALL
#define PANGO_SCALE_XX_SMALL ((double)0.5787037037037)
The scale factor for three shrinking steps (1 / (1.2 * 1.2 * 1.2)).
PANGO_SCALE_X_SMALL
PANGO_SCALE_X_SMALL
#define PANGO_SCALE_X_SMALL ((double)0.6944444444444)
The scale factor for two shrinking steps (1 / (1.2 * 1.2)).
PANGO_SCALE_SMALL
PANGO_SCALE_SMALL
#define PANGO_SCALE_SMALL ((double)0.8333333333333)
The scale factor for one shrinking step (1 / 1.2).
PANGO_SCALE_MEDIUM
PANGO_SCALE_MEDIUM
#define PANGO_SCALE_MEDIUM ((double)1.0)
The scale factor for normal size (1.0).
PANGO_SCALE_LARGE
PANGO_SCALE_LARGE
#define PANGO_SCALE_LARGE ((double)1.2)
The scale factor for one magnification step (1.2).
PANGO_SCALE_X_LARGE
PANGO_SCALE_X_LARGE
#define PANGO_SCALE_X_LARGE ((double)1.44)
The scale factor for two magnification steps (1.2 * 1.2).
PANGO_SCALE_XX_LARGE
PANGO_SCALE_XX_LARGE
#define PANGO_SCALE_XX_LARGE ((double)1.728)
The scale factor for three magnification steps (1.2 * 1.2 * 1.2).
enum PangoShowFlags
PangoShowFlags
These flags affect how Pango treats characters that are normally
not visible in the output.
Members
PANGO_SHOW_NONE
No special treatment for invisible characters
PANGO_SHOW_SPACES
Render spaces, tabs and newlines visibly
PANGO_SHOW_LINE_BREAKS
Render line breaks visibly
PANGO_SHOW_IGNORABLES
Render default-ignorable Unicode
characters visibly
struct PangoColor
PangoColor
struct PangoColor {
guint16 red;
guint16 green;
guint16 blue;
};
The PangoColor structure is used to
represent a color in an uncalibrated RGB color-space.
Members
guint16 red;
value of red component
guint16 green;
value of green component
guint16 blue;
value of blue component
PangoAttrList
PangoAttrList
typedef struct {
guint ref_count;
GPtrArray *attributes;
} PangoAttrList;
The PangoAttrList structure represents a list of attributes
that apply to a section of text. The attributes are, in general,
allowed to overlap in an arbitrary fashion, however, if the
attributes are manipulated only through pango_attr_list_change(),
the overlap between properties will meet stricter criteria.
Since the PangoAttrList structure is stored as a linear list,
it is not suitable for storing attributes for large amounts
of text. In general, you should not use a single PangoAttrList
for more than one paragraph of text.
PangoAttrIterator
PangoAttrIterator
typedef struct {
GPtrArray *attrs; /* From the list */
guint n_attrs; /* Copied from the list */
GPtrArray *attribute_stack;
guint attr_index;
guint start_index;
guint end_index;
} PangoAttrIterator;
The PangoAttrIterator structure is used to represent an
iterator through a PangoAttrList. A new iterator is created
with pango_attr_list_get_iterator(). Once the iterator
is created, it can be advanced through the style changes
in the text using pango_attr_iterator_next(). At each
style change, the range of the current style segment and the
attributes currently in effect can be queried.
docs/xml/markup.xml 0000664 0001750 0001750 00000056633 13751777747 014525 0 ustar mclasen mclasen
]>
Markup
3
PANGO Library
Markup
Simple markup language for text with attributes
Functions
gboolean
pango_parse_markup ()
GMarkupParseContext *
pango_markup_parser_new ()
gboolean
pango_markup_parser_finish ()
Description
Frequently, you want to display some text to the user with attributes
applied to part of the text (for example, you might want bold or
italicized words). With the base Pango interfaces, you could create a
PangoAttrList and apply it to the text; the problem is that you'd
need to apply attributes to some numeric range of characters, for
example "characters 12-17." This is broken from an internationalization
standpoint; once the text is translated, the word you wanted to
italicize could be in a different position.
The solution is to include the text attributes in the string to be
translated. Pango provides this feature with a small markup language.
You can parse a marked-up string into the string text plus a
PangoAttrList using either of pango_parse_markup() or
pango_markup_parser_new().
A simple example of a marked-up string might be:
Blue text is cool!
]]>
Pango uses GMarkup to parse this language, which means that XML
features such as numeric character entities such as &#169; for
© can be used too.
The root tag of a marked-up document is <markup>, but
pango_parse_markup() allows you to omit this tag, so you will most
likely never need to use it. The most general markup tag is <span>,
then there are some convenience tags.
Span attributes<span> has the following attributes:
font_desc:
A font description string, such as "Sans Italic 12".
See pango_font_description_from_string() for a description of the
format of the string representation . Note that any other span
attributes will override this description. So if you have "Sans Italic"
and also a style="normal" attribute, you will get Sans normal,
not italic.
font_family:
A font family name
font_size, size:
Font size in 1024ths of a point, or one of the absolute
sizes xx-small, x-small, small, medium, large,
x-large, xx-large, or one of the relative sizes smaller
or larger. If you want to specify a absolute size, it's usually
easier to take advantage of the ability to specify a partial
font description using font; you can use font='12.5'
rather than size='12800'.
font_style:
One of normal, oblique, italic
font_weight:
One of ultralight, light, normal, bold,
ultrabold, heavy, or a numeric weight
font_variant:
One of normal or smallcaps
font_stretch, stretch:
One of ultracondensed, extracondensed, condensed,
semicondensed, normal, semiexpanded, expanded,
extraexpanded, ultraexpanded
font_features:
A comma-separated list of OpenType font feature
settings, in the same syntax as accepted by CSS. E.g:
font_features='dlig=1, -kern, afrc on'
foreground, fgcolor:
An RGB color specification such as #00FF00 or a color
name such as red. Since 1.38, an RGBA color specification such
as #00FF007F will be interpreted as specifying both a foreground
color and foreground alpha.
background, bgcolor:
An RGB color specification such as #00FF00 or a color
name such as red.
Since 1.38, an RGBA color specification such as #00FF007F will
be interpreted as specifying both a background color and
background alpha.
alpha, fgalpha:
An alpha value for the foreground color, either a plain
integer between 1 and 65536 or a percentage value like 50%.
background_alpha, bgalpha:
An alpha value for the background color, either a plain
integer between 1 and 65536 or a percentage value like 50%.
underline:
One of none, single, double, low, error,
single-line, double-line or error-line.
underline_color:
The color of underlines; an RGB color
specification such as #00FF00 or a color name such as red
overline:
One of none or single
overline_color:
The color of overlines; an RGB color
specification such as #00FF00 or a color name such as red
rise:
Vertical displacement, in Pango units. Can be negative for
subscript, positive for superscript.
strikethrough
true or false whether to strike through the text
strikethrough_color:
The color of strikethrough lines; an RGB
color specification such as #00FF00 or a color name such as red
fallback:
true or false whether to enable fallback. If
disabled, then characters will only be used from the closest
matching font on the system. No fallback will be done to other
fonts on the system that might contain the characters in the text.
Fallback is enabled by default. Most applications should not
disable fallback.
allow_breaks:
true or false whether to allow line breaks or not. If
not allowed, the range will be kept in a single run as far
as possible. Breaks are allowed by default.
insert_hyphens:
true or false` whether to insert hyphens when breaking
lines in the middle of a word. Hyphens are inserted by default.
show:
A value determining how invisible characters are treated.
Possible values are spaces, line-breaks, ignorables
or combinations, such as spaces|line-breaks.
lang:
A language code, indicating the text language
letter_spacing:
Inter-letter spacing in 1024ths of a point.
gravity:
One of south, east, north, west, auto.
gravity_hint:
One of natural, strong, line.
Convenience tagsThe following convenience tags are provided:
<b>:
Bold
<big>:
Makes font relatively larger, equivalent to <span size="larger">
<i>:
Italic
<s>:
Strikethrough
<sub>:
Subscript
<sup>:
Superscript
<small>:
Makes font relatively smaller, equivalent to <span size="smaller">
<tt>:
Monospace
<u>:
Underline
Functions
pango_parse_markup ()
pango_parse_markup
gboolean
pango_parse_markup (const char *markup_text,
int length,
gunichar accel_marker,
PangoAttrList **attr_list,
char **text,
gunichar *accel_char,
GError **error);
Parses marked-up text (see
markup format) to create
a plain-text string and an attribute list.
If accel_marker
is nonzero, the given character will mark the
character following it as an accelerator. For example, 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.
To parse a stream of pango markup incrementally, use pango_markup_parser_new().
If any error happens, none of the output arguments are touched except
for error
.
Parameters
markup_text
markup to parse (see markup format)
length
length of markup_text
, or -1 if nul-terminated
accel_marker
character that precedes an accelerator, or 0 for none
attr_list
address of return location for a PangoAttrList, or NULL.
[out][allow-none]
text
address of return location for text with tags stripped, or NULL.
[out][allow-none]
accel_char
address of return location for accelerator char, or NULL.
[out][allow-none]
error
address of return location for errors, or NULL
Returns
FALSE if error
is set, otherwise TRUE
pango_markup_parser_new ()
pango_markup_parser_new
GMarkupParseContext *
pango_markup_parser_new (gunichar accel_marker);
Parses marked-up text (see
markup format) to create
a plain-text string and an attribute list.
If accel_marker
is nonzero, the given character will mark the
character following it as an accelerator. For example, 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
,
when calling finish(). Two accel_marker
characters following each
other produce a single literal accel_marker
character.
To feed markup to the parser, use g_markup_parse_context_parse()
on the returned GMarkupParseContext. When done with feeding markup
to the parser, use pango_markup_parser_finish() to get the data out
of it, and then use g_markup_parse_context_free() to free it.
This function is designed for applications that read pango markup
from streams. To simply parse a string containing pango markup,
the simpler pango_parse_markup() API is recommended instead.
Parameters
accel_marker
character that precedes an accelerator, or 0 for none
Returns
a GMarkupParseContext that should be
destroyed with g_markup_parse_context_free().
[transfer none]
Since: 1.31.0
pango_markup_parser_finish ()
pango_markup_parser_finish
gboolean
pango_markup_parser_finish (GMarkupParseContext *context,
PangoAttrList **attr_list,
char **text,
gunichar *accel_char,
GError **error);
After feeding a pango markup parser some data with g_markup_parse_context_parse(),
use this function to get the list of pango attributes and text out of the
markup. This function will not free context
, use g_markup_parse_context_free()
to do so.
Parameters
context
A valid parse context that was returned from pango_markup_parser_new()
attr_list
address of return location for a PangoAttrList, or NULL.
[out][allow-none]
text
address of return location for text with tags stripped, or NULL.
[out][allow-none]
accel_char
address of return location for accelerator char, or NULL.
[out][allow-none]
error
address of return location for errors, or NULL
Returns
FALSE if error
is set, otherwise TRUE
Since: 1.31.0
docs/xml/tab-stops.xml 0000664 0001750 0001750 00000062030 13751777747 015126 0 ustar mclasen mclasen
]>
Tab Stops
3
PANGO Library
Tab Stops
Structures for storing tab stops
Functions
PangoTabArray *
pango_tab_array_new ()
PangoTabArray *
pango_tab_array_new_with_positions ()
PangoTabArray *
pango_tab_array_copy ()
void
pango_tab_array_free ()
gint
pango_tab_array_get_size ()
void
pango_tab_array_resize ()
void
pango_tab_array_set_tab ()
void
pango_tab_array_get_tab ()
void
pango_tab_array_get_tabs ()
gboolean
pango_tab_array_get_positions_in_pixels ()
Types and Values
PangoTabArray
enumPangoTabAlign
Object Hierarchy
GBoxed
╰── PangoTabArray
GEnum
╰── PangoTabAlign
Description
Functions in this section are used to deal with PangoTabArray objects
that can be used to set tab stop positions in a PangoLayout.
Functions
pango_tab_array_new ()
pango_tab_array_new
PangoTabArray *
pango_tab_array_new (gint initial_size,
gboolean positions_in_pixels);
Creates an array of initial_size
tab stops. Tab stops are specified in
pixel units if positions_in_pixels
is TRUE, otherwise in Pango
units. All stops are initially at position 0.
Parameters
initial_size
Initial number of tab stops to allocate, can be 0
positions_in_pixels
whether positions are in pixel units
Returns
the newly allocated PangoTabArray, which should
be freed with pango_tab_array_free().
pango_tab_array_new_with_positions ()
pango_tab_array_new_with_positions
PangoTabArray *
pango_tab_array_new_with_positions (gint size,
gboolean positions_in_pixels,
PangoTabAlign first_alignment,
gint first_position,
...);
This is a convenience function that creates a PangoTabArray
and allows you to specify the alignment and position of each
tab stop. You must provide an alignment
and position for size
tab stops.
Parameters
size
number of tab stops in the array
positions_in_pixels
whether positions are in pixel units
first_alignment
alignment of first tab stop
first_position
position of first tab stop
...
additional alignment/position pairs
Returns
the newly allocated PangoTabArray, which should
be freed with pango_tab_array_free().
pango_tab_array_copy ()
pango_tab_array_copy
PangoTabArray *
pango_tab_array_copy (PangoTabArray *src);
Copies a PangoTabArray
Parameters
src
PangoTabArray to copy
Returns
the newly allocated PangoTabArray, which should
be freed with pango_tab_array_free().
pango_tab_array_free ()
pango_tab_array_free
void
pango_tab_array_free (PangoTabArray *tab_array);
Frees a tab array and associated resources.
Parameters
tab_array
a PangoTabArray
pango_tab_array_get_size ()
pango_tab_array_get_size
gint
pango_tab_array_get_size (PangoTabArray *tab_array);
Gets the number of tab stops in tab_array
.
Parameters
tab_array
a PangoTabArray
Returns
the number of tab stops in the array.
pango_tab_array_resize ()
pango_tab_array_resize
void
pango_tab_array_resize (PangoTabArray *tab_array,
gint new_size);
Resizes a tab array. You must subsequently initialize any tabs that
were added as a result of growing the array.
Parameters
tab_array
a PangoTabArray
new_size
new size of the array
pango_tab_array_set_tab ()
pango_tab_array_set_tab
void
pango_tab_array_set_tab (PangoTabArray *tab_array,
gint tab_index,
PangoTabAlign alignment,
gint location);
Sets the alignment and location of a tab stop.
alignment
must always be PANGO_TAB_LEFT in the current
implementation.
Parameters
tab_array
a PangoTabArray
tab_index
the index of a tab stop
alignment
tab alignment
location
tab location in Pango units
pango_tab_array_get_tab ()
pango_tab_array_get_tab
void
pango_tab_array_get_tab (PangoTabArray *tab_array,
gint tab_index,
PangoTabAlign *alignment,
gint *location);
Gets the alignment and position of a tab stop.
Parameters
tab_array
a PangoTabArray
tab_index
tab stop index
alignment
location to store alignment, or NULL.
[out][allow-none]
location
location to store tab position, or NULL.
[out][allow-none]
pango_tab_array_get_tabs ()
pango_tab_array_get_tabs
void
pango_tab_array_get_tabs (PangoTabArray *tab_array,
PangoTabAlign **alignments,
gint **locations);
If non-NULL, alignments
and locations
are filled with allocated
arrays of length pango_tab_array_get_size(). You must free the
returned array.
Parameters
tab_array
a PangoTabArray
alignments
location to store an array of tab
stop alignments, or NULL.
[out][allow-none]
locations
location to store an array
of tab positions, or NULL.
[out][allow-none][array]
pango_tab_array_get_positions_in_pixels ()
pango_tab_array_get_positions_in_pixels
gboolean
pango_tab_array_get_positions_in_pixels
(PangoTabArray *tab_array);
Returns TRUE if the tab positions are in pixels, FALSE if they are
in Pango units.
Parameters
tab_array
a PangoTabArray
Returns
whether positions are in pixels.
Types and Values
PangoTabArray
PangoTabArray
typedef struct _PangoTabArray PangoTabArray;
A PangoTabArray struct contains an array
of tab stops. Each tab stop has an alignment and a position.
enum PangoTabAlign
PangoTabAlign
A PangoTabAlign specifies where a tab stop appears relative to the text.
Members
PANGO_TAB_LEFT
the tab stop appears to the left of the text.
docs/xml/layout.xml 0000664 0001750 0001750 00000652457 13751777747 014551 0 ustar mclasen mclasen
]>
Layout Objects
3
PANGO Library
Layout Objects
High-level layout driver objects
Functions
PangoLayout *
pango_layout_new ()
PangoLayout *
pango_layout_copy ()
PangoContext *
pango_layout_get_context ()
void
pango_layout_context_changed ()
guint
pango_layout_get_serial ()
void
pango_layout_set_text ()
const char *
pango_layout_get_text ()
gint
pango_layout_get_character_count ()
void
pango_layout_set_markup ()
void
pango_layout_set_markup_with_accel ()
void
pango_layout_set_attributes ()
PangoAttrList *
pango_layout_get_attributes ()
void
pango_layout_set_font_description ()
const PangoFontDescription *
pango_layout_get_font_description ()
void
pango_layout_set_width ()
int
pango_layout_get_width ()
void
pango_layout_set_height ()
int
pango_layout_get_height ()
void
pango_layout_set_wrap ()
PangoWrapMode
pango_layout_get_wrap ()
gboolean
pango_layout_is_wrapped ()
void
pango_layout_set_ellipsize ()
PangoEllipsizeMode
pango_layout_get_ellipsize ()
gboolean
pango_layout_is_ellipsized ()
void
pango_layout_set_indent ()
int
pango_layout_get_indent ()
int
pango_layout_get_spacing ()
void
pango_layout_set_spacing ()
void
pango_layout_set_line_spacing ()
float
pango_layout_get_line_spacing ()
void
pango_layout_set_justify ()
gboolean
pango_layout_get_justify ()
void
pango_layout_set_auto_dir ()
gboolean
pango_layout_get_auto_dir ()
PangoDirection
pango_layout_get_direction ()
void
pango_layout_set_alignment ()
PangoAlignment
pango_layout_get_alignment ()
void
pango_layout_set_tabs ()
PangoTabArray *
pango_layout_get_tabs ()
void
pango_layout_set_single_paragraph_mode ()
gboolean
pango_layout_get_single_paragraph_mode ()
int
pango_layout_get_unknown_glyphs_count ()
void
pango_layout_get_log_attrs ()
const PangoLogAttr *
pango_layout_get_log_attrs_readonly ()
void
pango_layout_index_to_pos ()
void
pango_layout_index_to_line_x ()
gboolean
pango_layout_xy_to_index ()
void
pango_layout_get_cursor_pos ()
void
pango_layout_move_cursor_visually ()
void
pango_layout_get_extents ()
void
pango_layout_get_pixel_extents ()
void
pango_layout_get_size ()
void
pango_layout_get_pixel_size ()
int
pango_layout_get_baseline ()
int
pango_layout_get_line_count ()
PangoLayoutLine *
pango_layout_get_line ()
PangoLayoutLine *
pango_layout_get_line_readonly ()
GSList *
pango_layout_get_lines ()
GSList *
pango_layout_get_lines_readonly ()
PangoLayoutIter *
pango_layout_get_iter ()
PangoLayoutIter *
pango_layout_iter_copy ()
void
pango_layout_iter_free ()
gboolean
pango_layout_iter_next_run ()
gboolean
pango_layout_iter_next_char ()
gboolean
pango_layout_iter_next_cluster ()
gboolean
pango_layout_iter_next_line ()
gboolean
pango_layout_iter_at_last_line ()
int
pango_layout_iter_get_index ()
int
pango_layout_iter_get_baseline ()
PangoLayoutRun *
pango_layout_iter_get_run ()
PangoLayoutRun *
pango_layout_iter_get_run_readonly ()
PangoLayoutLine *
pango_layout_iter_get_line ()
PangoLayoutLine *
pango_layout_iter_get_line_readonly ()
PangoLayout *
pango_layout_iter_get_layout ()
void
pango_layout_iter_get_char_extents ()
void
pango_layout_iter_get_cluster_extents ()
void
pango_layout_iter_get_run_extents ()
void
pango_layout_iter_get_line_yrange ()
void
pango_layout_iter_get_line_extents ()
void
pango_layout_iter_get_layout_extents ()
PangoLayoutLine *
pango_layout_line_ref ()
void
pango_layout_line_unref ()
void
pango_layout_line_get_extents ()
void
pango_layout_line_get_pixel_extents ()
void
pango_layout_line_index_to_x ()
gboolean
pango_layout_line_x_to_index ()
void
pango_layout_line_get_x_ranges ()
void
pango_layout_line_get_height ()
Types and Values
PangoLayout
PangoLayoutIter
enumPangoWrapMode
enumPangoEllipsizeMode
enumPangoAlignment
structPangoLayoutLine
typedefPangoLayoutRun
Object Hierarchy
GBoxed
├── PangoLayoutIter
╰── PangoLayoutLine
GEnum
├── PangoAlignment
├── PangoEllipsizeMode
╰── PangoWrapMode
GObject
╰── PangoLayout
Description
While complete access to the layout capabilities of Pango is provided
using the detailed interfaces for itemization and shaping, using
that functionality directly involves writing a fairly large amount
of code. The objects and functions in this section provide a
high-level driver for formatting entire paragraphs of text
at once. This includes paragraph-level functionality such as
line-breaking, justification, alignment and ellipsization.
Functions
pango_layout_new ()
pango_layout_new
PangoLayout *
pango_layout_new (PangoContext *context);
Create a new PangoLayout object with attributes initialized to
default values for a particular PangoContext.
Parameters
context
a PangoContext
Returns
the newly allocated PangoLayout, with a reference
count of one, which should be freed with
g_object_unref().
pango_layout_copy ()
pango_layout_copy
PangoLayout *
pango_layout_copy (PangoLayout *src);
Does a deep copy-by-value of the src
layout. The attribute list,
tab array, and text from the original layout are all copied by
value.
Parameters
src
a PangoLayout
Returns
the newly allocated PangoLayout,
with a reference count of one, which should be freed
with g_object_unref().
[transfer full]
pango_layout_get_context ()
pango_layout_get_context
PangoContext *
pango_layout_get_context (PangoLayout *layout);
Retrieves the PangoContext used for this layout.
Parameters
layout
a PangoLayout
Returns
the PangoContext for the layout.
This does not have an additional refcount added, so if you want to
keep a copy of this around, you must reference it yourself.
[transfer none]
pango_layout_context_changed ()
pango_layout_context_changed
void
pango_layout_context_changed (PangoLayout *layout);
Forces recomputation of any state in the PangoLayout that
might depend on the layout's context. This function should
be called if you make changes to the context subsequent
to creating the layout.
Parameters
layout
a PangoLayout
pango_layout_get_serial ()
pango_layout_get_serial
guint
pango_layout_get_serial (PangoLayout *layout);
Returns the current serial number of layout
. The serial number is
initialized to an small number larger than zero when a new layout
is created and is increased whenever the layout is changed using any
of the setter functions, or the PangoContext it uses has changed.
The serial may wrap, but will never have the value 0. Since it
can wrap, never compare it with "less than", always use "not equals".
This can be used to automatically detect changes to a PangoLayout, and
is useful for example to decide whether a layout needs redrawing.
To force the serial to be increased, use pango_layout_context_changed().
Parameters
layout
a PangoLayout
Returns
The current serial number of layout
.
Since: 1.32.4
pango_layout_set_text ()
pango_layout_set_text
void
pango_layout_set_text (PangoLayout *layout,
const char *text,
int length);
Sets the text of the layout.
This function validates text
and renders invalid UTF-8
with a placeholder glyph.
Note that if you have used pango_layout_set_markup() or
pango_layout_set_markup_with_accel() on layout
before, you may
want to call pango_layout_set_attributes() to clear the attributes
set on the layout from the markup as this function does not clear
attributes.
Parameters
layout
a PangoLayout
text
the text
length
maximum length of text
, in bytes. -1 indicates that
the string is nul-terminated and the length should be
calculated. The text will also be truncated on
encountering a nul-termination even when length
is
positive.
pango_layout_get_text ()
pango_layout_get_text
const char *
pango_layout_get_text (PangoLayout *layout);
Gets the text in the layout. The returned text should not
be freed or modified.
Parameters
layout
a PangoLayout
Returns
the text in the layout
.
pango_layout_get_character_count ()
pango_layout_get_character_count
gint
pango_layout_get_character_count (PangoLayout *layout);
Returns the number of Unicode characters in the
the text of layout
.
Parameters
layout
a PangoLayout
Returns
the number of Unicode characters
in the text of layout
Since: 1.30
pango_layout_set_markup ()
pango_layout_set_markup
void
pango_layout_set_markup (PangoLayout *layout,
const char *markup,
int length);
Same as pango_layout_set_markup_with_accel(), but
the markup text isn't scanned for accelerators.
Parameters
layout
a PangoLayout
markup
marked-up text
length
length of marked-up text in bytes, or -1 if markup
is
null-terminated
pango_layout_set_markup_with_accel ()
pango_layout_set_markup_with_accel
void
pango_layout_set_markup_with_accel (PangoLayout *layout,
const char *markup,
int length,
gunichar accel_marker,
gunichar *accel_char);
Sets the layout text and attribute list from marked-up text (see
markup format). Replaces
the current text and attribute list.
If accel_marker
is nonzero, the given character will mark the
character following it as an accelerator. For example, 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.
Parameters
layout
a PangoLayout
markup
marked-up text
(see markup format)
length
length of marked-up text in bytes, or -1 if markup
is
null-terminated
accel_marker
marker for accelerators in the text
accel_char
return location
for first located accelerator, or NULL.
[out caller-allocates][allow-none]
pango_layout_set_attributes ()
pango_layout_set_attributes
void
pango_layout_set_attributes (PangoLayout *layout,
PangoAttrList *attrs);
Sets the text attributes for a layout object.
References attrs
, so the caller can unref its reference.
Parameters
layout
a PangoLayout
attrs
a PangoAttrList, can be NULL.
[allow-none][transfer none]
pango_layout_get_attributes ()
pango_layout_get_attributes
PangoAttrList *
pango_layout_get_attributes (PangoLayout *layout);
Gets the attribute list for the layout, if any.
Parameters
layout
a PangoLayout
Returns
a PangoAttrList or NULL
if none was set.
[transfer none][nullable]
pango_layout_set_font_description ()
pango_layout_set_font_description
void
pango_layout_set_font_description (PangoLayout *layout,
const PangoFontDescription *desc);
Sets the default font description for the layout. If no font
description is set on the layout, the font description from
the layout's context is used.
Parameters
layout
a PangoLayout
desc
the new PangoFontDescription, or NULL to unset the
current font description.
[allow-none]
pango_layout_get_font_description ()
pango_layout_get_font_description
const PangoFontDescription *
pango_layout_get_font_description (PangoLayout *layout);
Gets the font description for the layout, if any.
Parameters
layout
a PangoLayout
Returns
a pointer to the layout's font
description, or NULL if the font description from the layout's
context is inherited. This value is owned by the layout and must
not be modified or freed.
[nullable]
Since: 1.8
pango_layout_set_width ()
pango_layout_set_width
void
pango_layout_set_width (PangoLayout *layout,
int width);
Sets the width to which the lines of the PangoLayout should wrap or
ellipsized. The default value is -1: no width set.
Parameters
layout
a PangoLayout.
width
the desired width in Pango units, or -1 to indicate that no
wrapping or ellipsization should be performed.
pango_layout_get_width ()
pango_layout_get_width
int
pango_layout_get_width (PangoLayout *layout);
Gets the width to which the lines of the PangoLayout should wrap.
Parameters
layout
a PangoLayout
Returns
the width in Pango units, or -1 if no width set.
pango_layout_set_height ()
pango_layout_set_height
void
pango_layout_set_height (PangoLayout *layout,
int height);
Sets the height to which the PangoLayout should be ellipsized at. There
are two different behaviors, based on whether height
is positive or
negative.
If height
is positive, it will be the maximum height of the layout. Only
lines would be shown that would fit, and if there is any text omitted,
an ellipsis added. At least one line is included in each paragraph regardless
of how small the height value is. A value of zero will render exactly one
line for the entire layout.
If height
is negative, it will be the (negative of) maximum number of lines per
paragraph. That is, the total number of lines shown may well be more than
this value if the layout contains multiple paragraphs of text.
The default value of -1 means that first line of each paragraph is ellipsized.
This behvaior may be changed in the future to act per layout instead of per
paragraph. File a bug against pango at http://bugzilla.gnome.org/ if your
code relies on this behavior.
Height setting only has effect if a positive width is set on
layout
and ellipsization mode of layout
is not PANGO_ELLIPSIZE_NONE.
The behavior is undefined if a height other than -1 is set and
ellipsization mode is set to PANGO_ELLIPSIZE_NONE, and may change in the
future.
Parameters
layout
a PangoLayout.
height
the desired height of the layout in Pango units if positive,
or desired number of lines if negative.
Since: 1.20
pango_layout_get_height ()
pango_layout_get_height
int
pango_layout_get_height (PangoLayout *layout);
Gets the height of layout used for ellipsization. See
pango_layout_set_height() for details.
Parameters
layout
a PangoLayout
Returns
the height, in Pango units if positive, or
number of lines if negative.
Since: 1.20
pango_layout_set_wrap ()
pango_layout_set_wrap
void
pango_layout_set_wrap (PangoLayout *layout,
PangoWrapMode wrap);
Sets the wrap mode; the wrap mode only has effect if a width
is set on the layout with pango_layout_set_width().
To turn off wrapping, set the width to -1.
Parameters
layout
a PangoLayout
wrap
the wrap mode
pango_layout_get_wrap ()
pango_layout_get_wrap
PangoWrapMode
pango_layout_get_wrap (PangoLayout *layout);
Gets the wrap mode for the layout.
Use pango_layout_is_wrapped() to query whether any paragraphs
were actually wrapped.
Parameters
layout
a PangoLayout
Returns
active wrap mode.
pango_layout_is_wrapped ()
pango_layout_is_wrapped
gboolean
pango_layout_is_wrapped (PangoLayout *layout);
Queries whether the layout had to wrap any paragraphs.
This returns TRUE if a positive width is set on layout
,
ellipsization mode of layout
is set to PANGO_ELLIPSIZE_NONE,
and there are paragraphs exceeding the layout width that have
to be wrapped.
Parameters
layout
a PangoLayout
Returns
TRUE if any paragraphs had to be wrapped, FALSE
otherwise.
Since: 1.16
pango_layout_set_ellipsize ()
pango_layout_set_ellipsize
void
pango_layout_set_ellipsize (PangoLayout *layout,
PangoEllipsizeMode ellipsize);
Sets the type of ellipsization being performed for layout
.
Depending on the ellipsization mode ellipsize
text is
removed from the start, middle, or end of text so they
fit within the width and height of layout set with
pango_layout_set_width() and pango_layout_set_height().
If the layout contains characters such as newlines that
force it to be layed out in multiple paragraphs, then whether
each paragraph is ellipsized separately or the entire layout
is ellipsized as a whole depends on the set height of the layout.
See pango_layout_set_height() for details.
Parameters
layout
a PangoLayout
ellipsize
the new ellipsization mode for layout
Since: 1.6
pango_layout_get_ellipsize ()
pango_layout_get_ellipsize
PangoEllipsizeMode
pango_layout_get_ellipsize (PangoLayout *layout);
Gets the type of ellipsization being performed for layout
.
See pango_layout_set_ellipsize()
Parameters
layout
a PangoLayout
Returns
the current ellipsization mode for layout
.
Use pango_layout_is_ellipsized() to query whether any paragraphs
were actually ellipsized.
Since: 1.6
pango_layout_is_ellipsized ()
pango_layout_is_ellipsized
gboolean
pango_layout_is_ellipsized (PangoLayout *layout);
Queries whether the layout had to ellipsize any paragraphs.
This returns TRUE if the ellipsization mode for layout
is not PANGO_ELLIPSIZE_NONE, a positive width is set on layout
,
and there are paragraphs exceeding that width that have to be
ellipsized.
Parameters
layout
a PangoLayout
Returns
TRUE if any paragraphs had to be ellipsized, FALSE
otherwise.
Since: 1.16
pango_layout_set_indent ()
pango_layout_set_indent
void
pango_layout_set_indent (PangoLayout *layout,
int indent);
Sets the width in Pango units to indent each paragraph. A negative value
of indent
will produce a hanging indentation. That is, the first line will
have the full width, and subsequent lines will be indented by the
absolute value of indent
.
The indent setting is ignored if layout alignment is set to
PANGO_ALIGN_CENTER.
Parameters
layout
a PangoLayout.
indent
the amount by which to indent.
pango_layout_get_indent ()
pango_layout_get_indent
int
pango_layout_get_indent (PangoLayout *layout);
Gets the paragraph indent width in Pango units. A negative value
indicates a hanging indentation.
Parameters
layout
a PangoLayout
Returns
the indent in Pango units.
pango_layout_get_spacing ()
pango_layout_get_spacing
int
pango_layout_get_spacing (PangoLayout *layout);
Gets the amount of spacing between the lines of the layout.
Parameters
layout
a PangoLayout
Returns
the spacing in Pango units.
pango_layout_set_spacing ()
pango_layout_set_spacing
void
pango_layout_set_spacing (PangoLayout *layout,
int spacing);
Sets the amount of spacing in Pango unit between
the lines of the layout. When placing lines with
spacing, Pango arranges things so that
line2.top = line1.bottom + spacing
Note: Since 1.44, Pango defaults to using the
line height (as determined by the font) for placing
lines. The spacing
set with this function is only
taken into account when the line-height factor is
set to zero with pango_layout_set_line_spacing().
Parameters
layout
a PangoLayout.
spacing
the amount of spacing
pango_layout_set_line_spacing ()
pango_layout_set_line_spacing
void
pango_layout_set_line_spacing (PangoLayout *layout,
float factor);
Sets a factor for line spacing.
Typical values are: 0, 1, 1.5, 2.
The default values is 0.
If factor
is non-zero, lines are placed
so that
baseline2 = baseline1 + factor * height2
where height2 is the line height of the
second line (as determined by the font(s)).
In this case, the spacing set with
pango_layout_set_spacing() is ignored.
If factor
is zero, spacing is applied as
before.
Parameters
layout
a PangoLayout
factor
the new line spacing factor
Since: 1.44
pango_layout_get_line_spacing ()
pango_layout_get_line_spacing
float
pango_layout_get_line_spacing (PangoLayout *layout);
Gets the value that has been
set with pango_layout_set_line_spacing().
Parameters
layout
a PangoLayout
Since: 1.44
pango_layout_set_justify ()
pango_layout_set_justify
void
pango_layout_set_justify (PangoLayout *layout,
gboolean justify);
Sets whether each complete line should be stretched to
fill the entire width of the layout. This stretching is typically
done by adding whitespace, but for some scripts (such as Arabic),
the justification may be done in more complex ways, like extending
the characters.
Note that this setting is not implemented and so is ignored in Pango
older than 1.18.
Parameters
layout
a PangoLayout
justify
whether the lines in the layout should be justified.
pango_layout_get_justify ()
pango_layout_get_justify
gboolean
pango_layout_get_justify (PangoLayout *layout);
Gets whether each complete line should be stretched to fill the entire
width of the layout.
Parameters
layout
a PangoLayout
Returns
the justify.
pango_layout_set_auto_dir ()
pango_layout_set_auto_dir
void
pango_layout_set_auto_dir (PangoLayout *layout,
gboolean auto_dir);
Sets whether to calculate the bidirectional base direction
for the layout according to the contents of the layout;
when this flag is on (the default), then paragraphs in
layout
that begin with strong right-to-left characters
(Arabic and Hebrew principally), will have right-to-left
layout, paragraphs with letters from other scripts will
have left-to-right layout. Paragraphs with only neutral
characters get their direction from the surrounding paragraphs.
When FALSE, the choice between left-to-right and
right-to-left layout is done according to the base direction
of the layout's PangoContext. (See pango_context_set_base_dir()).
When the auto-computed direction of a paragraph differs from the
base direction of the context, the interpretation of
PANGO_ALIGN_LEFT and PANGO_ALIGN_RIGHT are swapped.
Parameters
layout
a PangoLayout
auto_dir
if TRUE, compute the bidirectional base direction
from the layout's contents.
Since: 1.4
pango_layout_get_auto_dir ()
pango_layout_get_auto_dir
gboolean
pango_layout_get_auto_dir (PangoLayout *layout);
Gets whether to calculate the bidirectional base direction
for the layout according to the contents of the layout.
See pango_layout_set_auto_dir().
Parameters
layout
a PangoLayout
Returns
TRUE if the bidirectional base direction
is computed from the layout's contents, FALSE otherwise.
Since: 1.4
pango_layout_get_direction ()
pango_layout_get_direction
PangoDirection
pango_layout_get_direction (PangoLayout *layout,
int index);
Gets the text direction at the given character
position in layout
.
Parameters
layout
a PangoLayout
index
the byte index of the char
Returns
the text direction at index
Since: 1.46
pango_layout_set_alignment ()
pango_layout_set_alignment
void
pango_layout_set_alignment (PangoLayout *layout,
PangoAlignment alignment);
Sets the alignment for the layout: how partial lines are
positioned within the horizontal space available.
Parameters
layout
a PangoLayout
alignment
the alignment
pango_layout_get_alignment ()
pango_layout_get_alignment
PangoAlignment
pango_layout_get_alignment (PangoLayout *layout);
Gets the alignment for the layout: how partial lines are
positioned within the horizontal space available.
Parameters
layout
a PangoLayout
Returns
the alignment.
pango_layout_set_tabs ()
pango_layout_set_tabs
void
pango_layout_set_tabs (PangoLayout *layout,
PangoTabArray *tabs);
Sets the tabs to use for layout
, overriding the default tabs
(by default, tabs are every 8 spaces). If tabs
is NULL, the default
tabs are reinstated. tabs
is copied into the layout; you must
free your copy of tabs
yourself.
Parameters
layout
a PangoLayout
tabs
a PangoTabArray, or NULL.
[allow-none]
pango_layout_get_tabs ()
pango_layout_get_tabs
PangoTabArray *
pango_layout_get_tabs (PangoLayout *layout);
Gets the current PangoTabArray used by this layout. If no
PangoTabArray has been set, then the default tabs are in use
and NULL is returned. Default tabs are every 8 spaces.
The return value should be freed with pango_tab_array_free().
Parameters
layout
a PangoLayout
Returns
a copy of the tabs for this layout, or
NULL.
[nullable]
pango_layout_set_single_paragraph_mode ()
pango_layout_set_single_paragraph_mode
void
pango_layout_set_single_paragraph_mode
(PangoLayout *layout,
gboolean setting);
If setting
is TRUE, do not treat newlines and similar characters
as paragraph separators; instead, keep all text in a single paragraph,
and display a glyph for paragraph separator characters. Used when
you want to allow editing of newlines on a single text line.
Parameters
layout
a PangoLayout
setting
new setting
pango_layout_get_single_paragraph_mode ()
pango_layout_get_single_paragraph_mode
gboolean
pango_layout_get_single_paragraph_mode
(PangoLayout *layout);
Obtains the value set by pango_layout_set_single_paragraph_mode().
Parameters
layout
a PangoLayout
Returns
TRUE if the layout does not break paragraphs at
paragraph separator characters, FALSE otherwise.
pango_layout_get_unknown_glyphs_count ()
pango_layout_get_unknown_glyphs_count
int
pango_layout_get_unknown_glyphs_count (PangoLayout *layout);
Counts the number unknown glyphs in layout
. That is, zero if
glyphs for all characters in the layout text were found, or more
than zero otherwise.
This function can be used to determine if there are any fonts
available to render all characters in a certain string, or when
used in combination with PANGO_ATTR_FALLBACK, to check if a
certain font supports all the characters in the string.
Parameters
layout
a PangoLayout
Returns
The number of unknown glyphs in layout
.
Since: 1.16
pango_layout_get_log_attrs ()
pango_layout_get_log_attrs
void
pango_layout_get_log_attrs (PangoLayout *layout,
PangoLogAttr **attrs,
gint *n_attrs);
Retrieves an array of logical attributes for each character in
the layout
.
Parameters
layout
a PangoLayout
attrs
location to store a pointer to an array of logical attributes
This value must be freed with g_free().
[out][array length=n_attrs][transfer container]
n_attrs
location to store the number of the attributes in the
array. (The stored value will be one more than the total number
of characters in the layout, since there need to be attributes
corresponding to both the position before the first character
and the position after the last character.).
[out]
pango_layout_get_log_attrs_readonly ()
pango_layout_get_log_attrs_readonly
const PangoLogAttr *
pango_layout_get_log_attrs_readonly (PangoLayout *layout,
gint *n_attrs);
Retrieves an array of logical attributes for each character in
the layout
.
This is a faster alternative to pango_layout_get_log_attrs().
The returned array is part of layout
and must not be modified.
Modifying the layout will invalidate the returned array.
The number of attributes returned in n_attrs
will be one more
than the total number of characters in the layout, since there
need to be attributes corresponding to both the position before
the first character and the position after the last character.
Parameters
layout
a PangoLayout
n_attrs
location to store the number of the attributes in
the array.
[out]
Returns
an array of logical attributes.
[array length=n_attrs]
Since: 1.30
pango_layout_index_to_pos ()
pango_layout_index_to_pos
void
pango_layout_index_to_pos (PangoLayout *layout,
int index_,
PangoRectangle *pos);
Converts from an index within a PangoLayout to the onscreen position
corresponding to the grapheme at that index, which is represented
as rectangle. Note that pos->x is always the leading
edge of the grapheme and pos->x + pos->width the trailing
edge of the grapheme. If the directionality of the grapheme is right-to-left,
then pos->width will be negative.
Parameters
layout
a PangoLayout
index_
byte index within layout
pos
rectangle in which to store the position of the grapheme.
[out]
pango_layout_index_to_line_x ()
pango_layout_index_to_line_x
void
pango_layout_index_to_line_x (PangoLayout *layout,
int index_,
gboolean trailing,
int *line,
int *x_pos);
Converts from byte index_
within the layout
to line and X position.
(X position is measured from the left edge of the line)
Parameters
layout
a PangoLayout
index_
the byte index of a grapheme within the layout.
trailing
an integer indicating the edge of the grapheme to retrieve the
position of. If > 0, the trailing edge of the grapheme, if 0,
the leading of the grapheme.
line
location to store resulting line index. (which will
between 0 and pango_layout_get_line_count(layout) - 1), or NULL.
[out][allow-none]
x_pos
location to store resulting position within line
(PANGO_SCALE units per device unit), or NULL.
[out][allow-none]
pango_layout_xy_to_index ()
pango_layout_xy_to_index
gboolean
pango_layout_xy_to_index (PangoLayout *layout,
int x,
int y,
int *index_,
int *trailing);
Converts from X and Y position within a layout to the byte
index to the character at that logical position. If the
Y position is not inside the layout, the closest position is chosen
(the position will be clamped inside the layout). If the
X position is not within the layout, then the start or the
end of the line is chosen as described for pango_layout_line_x_to_index().
If either the X or Y positions were not inside the layout, then the
function returns FALSE; on an exact hit, it returns TRUE.
Parameters
layout
a PangoLayout
x
the X offset (in Pango units)
from the left edge of the layout.
y
the Y offset (in Pango units)
from the top edge of the layout
index_
location to store calculated byte index.
[out]
trailing
location to store a integer indicating where
in the grapheme the user clicked. It will either
be zero, or the number of characters in the
grapheme. 0 represents the leading edge of the grapheme.
[out]
Returns
TRUE if the coordinates were inside text, FALSE otherwise.
pango_layout_get_cursor_pos ()
pango_layout_get_cursor_pos
void
pango_layout_get_cursor_pos (PangoLayout *layout,
int index_,
PangoRectangle *strong_pos,
PangoRectangle *weak_pos);
Given an index within a layout, determines the positions that of the
strong and weak cursors if the insertion point is at that
index. The position of each cursor is stored as a zero-width
rectangle. The strong cursor location is the location where
characters of the directionality equal to the base direction of the
layout are inserted. The weak cursor location is the location
where characters of the directionality opposite to the base
direction of the layout are inserted.
Parameters
layout
a PangoLayout
index_
the byte index of the cursor
strong_pos
location to store the strong cursor position
(may be NULL).
[out][allow-none]
weak_pos
location to store the weak cursor position (may be NULL).
[out][allow-none]
pango_layout_move_cursor_visually ()
pango_layout_move_cursor_visually
void
pango_layout_move_cursor_visually (PangoLayout *layout,
gboolean strong,
int old_index,
int old_trailing,
int direction,
int *new_index,
int *new_trailing);
Computes a new cursor position from an old position and
a count of positions to move visually. If direction
is positive,
then the new strong cursor position will be one position
to the right of the old cursor position. If direction
is negative,
then the new strong cursor position will be one position
to the left of the old cursor position.
In the presence of bidirectional text, the correspondence
between logical and visual order will depend on the direction
of the current run, and there may be jumps when the cursor
is moved off of the end of a run.
Motion here is in cursor positions, not in characters, so a
single call to pango_layout_move_cursor_visually() may move the
cursor over multiple characters when multiple characters combine
to form a single grapheme.
Parameters
layout
a PangoLayout.
strong
whether the moving cursor is the strong cursor or the
weak cursor. The strong cursor is the cursor corresponding
to text insertion in the base direction for the layout.
old_index
the byte index of the grapheme for the old index
old_trailing
if 0, the cursor was at the leading edge of the
grapheme indicated by old_index
, if > 0, the cursor
was at the trailing edge.
direction
direction to move cursor. A negative
value indicates motion to the left.
new_index
location to store the new cursor byte index. A value of -1
indicates that the cursor has been moved off the beginning
of the layout. A value of G_MAXINT indicates that
the cursor has been moved off the end of the layout.
[out]
new_trailing
number of characters to move forward from the
location returned for new_index
to get the position
where the cursor should be displayed. This allows
distinguishing the position at the beginning of one
line from the position at the end of the preceding
line. new_index
is always on the line where the
cursor should be displayed.
[out]
pango_layout_get_extents ()
pango_layout_get_extents
void
pango_layout_get_extents (PangoLayout *layout,
PangoRectangle *ink_rect,
PangoRectangle *logical_rect);
Computes the logical and ink extents of layout
. Logical extents
are usually what you want for positioning things. Note that both extents
may have non-zero x and y. You may want to use those to offset where you
render the layout. Not doing that is a very typical bug that shows up as
right-to-left layouts not being correctly positioned in a layout with
a set width.
The extents are given in layout coordinates and in Pango units; layout
coordinates begin at the top left corner of the layout.
Parameters
layout
a PangoLayout
ink_rect
rectangle used to store the extents of the
layout as drawn or NULL to indicate that the result is
not needed.
[out][allow-none]
logical_rect
rectangle used to store the logical
extents of the layout or NULL to indicate that the
result is not needed.
[out][allow-none]
pango_layout_get_pixel_extents ()
pango_layout_get_pixel_extents
void
pango_layout_get_pixel_extents (PangoLayout *layout,
PangoRectangle *ink_rect,
PangoRectangle *logical_rect);
Computes the logical and ink extents of layout
in device units.
This function just calls pango_layout_get_extents() followed by
two pango_extents_to_pixels() calls, rounding ink_rect
and logical_rect
such that the rounded rectangles fully contain the unrounded one (that is,
passes them as first argument to pango_extents_to_pixels()).
Parameters
layout
a PangoLayout
ink_rect
rectangle used to store the extents of the
layout as drawn or NULL to indicate that the result is
not needed.
[out][allow-none]
logical_rect
rectangle used to store the logical
extents of the layout or NULL to indicate that the
result is not needed.
[out][allow-none]
pango_layout_get_size ()
pango_layout_get_size
void
pango_layout_get_size (PangoLayout *layout,
int *width,
int *height);
Determines the logical width and height of a PangoLayout
in Pango units (device units scaled by PANGO_SCALE). This
is simply a convenience function around pango_layout_get_extents().
Parameters
layout
a PangoLayout
width
location to store the logical width, or NULL.
[out][allow-none]
height
location to store the logical height, or NULL.
[out][allow-none]
pango_layout_get_pixel_size ()
pango_layout_get_pixel_size
void
pango_layout_get_pixel_size (PangoLayout *layout,
int *width,
int *height);
Determines the logical width and height of a PangoLayout
in device units. (pango_layout_get_size() returns the width
and height scaled by PANGO_SCALE.) This
is simply a convenience function around
pango_layout_get_pixel_extents().
Parameters
layout
a PangoLayout
width
location to store the logical width, or NULL.
[out][allow-none]
height
location to store the logical height, or NULL.
[out][allow-none]
pango_layout_get_baseline ()
pango_layout_get_baseline
int
pango_layout_get_baseline (PangoLayout *layout);
Gets the Y position of baseline of the first line in layout
.
Parameters
layout
a PangoLayout
Returns
baseline of first line, from top of layout
.
Since: 1.22
pango_layout_get_line_count ()
pango_layout_get_line_count
int
pango_layout_get_line_count (PangoLayout *layout);
Retrieves the count of lines for the layout
.
Parameters
layout
PangoLayout
Returns
the line count.
pango_layout_get_line ()
pango_layout_get_line
PangoLayoutLine *
pango_layout_get_line (PangoLayout *layout,
int line);
Retrieves a particular line from a PangoLayout.
Use the faster pango_layout_get_line_readonly() if you do not plan
to modify the contents of the line (glyphs, glyph widths, etc.).
Parameters
layout
a PangoLayout
line
the index of a line, which must be between 0 and
pango_layout_get_line_count(layout) - 1, inclusive.
Returns
the requested
PangoLayoutLine, or NULL if the index is out of
range. This layout line can be ref'ed and retained,
but will become invalid if changes are made to the
PangoLayout.
[transfer none][nullable]
pango_layout_get_line_readonly ()
pango_layout_get_line_readonly
PangoLayoutLine *
pango_layout_get_line_readonly (PangoLayout *layout,
int line);
Retrieves a particular line from a PangoLayout.
This is a faster alternative to pango_layout_get_line(),
but the user is not expected
to modify the contents of the line (glyphs, glyph widths, etc.).
Parameters
layout
a PangoLayout
line
the index of a line, which must be between 0 and
pango_layout_get_line_count(layout) - 1, inclusive.
Returns
the requested
PangoLayoutLine, or NULL if the index is out of
range. This layout line can be ref'ed and retained,
but will become invalid if changes are made to the
PangoLayout. No changes should be made to the line.
[transfer none][nullable]
Since: 1.16
pango_layout_get_lines ()
pango_layout_get_lines
GSList *
pango_layout_get_lines (PangoLayout *layout);
Returns the lines of the layout
as a list.
Use the faster pango_layout_get_lines_readonly() if you do not plan
to modify the contents of the lines (glyphs, glyph widths, etc.).
Parameters
layout
a PangoLayout
Returns
a GSList containing
the lines in the layout. This points to internal data of the PangoLayout
and must be used with care. It will become invalid on any change to the layout's
text or properties.
[element-type Pango.LayoutLine][transfer none]
pango_layout_get_lines_readonly ()
pango_layout_get_lines_readonly
GSList *
pango_layout_get_lines_readonly (PangoLayout *layout);
Returns the lines of the layout
as a list.
This is a faster alternative to pango_layout_get_lines(),
but the user is not expected
to modify the contents of the lines (glyphs, glyph widths, etc.).
Parameters
layout
a PangoLayout
Returns
a GSList containing
the lines in the layout. This points to internal data of the PangoLayout and
must be used with care. It will become invalid on any change to the layout's
text or properties. No changes should be made to the lines.
[element-type Pango.LayoutLine][transfer none]
Since: 1.16
pango_layout_get_iter ()
pango_layout_get_iter
PangoLayoutIter *
pango_layout_get_iter (PangoLayout *layout);
Returns an iterator to iterate over the visual extents of the layout.
Parameters
layout
a PangoLayout
Returns
the new PangoLayoutIter that should be freed using
pango_layout_iter_free().
pango_layout_iter_copy ()
pango_layout_iter_copy
PangoLayoutIter *
pango_layout_iter_copy (PangoLayoutIter *iter);
Copies a PangoLayoutIter.
Parameters
iter
a PangoLayoutIter, may be NULL.
[nullable]
Returns
the newly allocated PangoLayoutIter,
which should be freed with pango_layout_iter_free(),
or NULL if iter
was NULL.
[nullable]
Since: 1.20
pango_layout_iter_free ()
pango_layout_iter_free
void
pango_layout_iter_free (PangoLayoutIter *iter);
Frees an iterator that's no longer in use.
Parameters
iter
a PangoLayoutIter, may be NULL.
[nullable]
pango_layout_iter_next_run ()
pango_layout_iter_next_run
gboolean
pango_layout_iter_next_run (PangoLayoutIter *iter);
Moves iter
forward to the next run in visual order. If iter
was
already at the end of the layout, returns FALSE.
Parameters
iter
a PangoLayoutIter
Returns
whether motion was possible.
pango_layout_iter_next_char ()
pango_layout_iter_next_char
gboolean
pango_layout_iter_next_char (PangoLayoutIter *iter);
Moves iter
forward to the next character in visual order. If iter
was already at
the end of the layout, returns FALSE.
Parameters
iter
a PangoLayoutIter
Returns
whether motion was possible.
pango_layout_iter_next_cluster ()
pango_layout_iter_next_cluster
gboolean
pango_layout_iter_next_cluster (PangoLayoutIter *iter);
Moves iter
forward to the next cluster in visual order. If iter
was already at the end of the layout, returns FALSE.
Parameters
iter
a PangoLayoutIter
Returns
whether motion was possible.
pango_layout_iter_next_line ()
pango_layout_iter_next_line
gboolean
pango_layout_iter_next_line (PangoLayoutIter *iter);
Moves iter
forward to the start of the next line. If iter
is
already on the last line, returns FALSE.
Parameters
iter
a PangoLayoutIter
Returns
whether motion was possible.
pango_layout_iter_at_last_line ()
pango_layout_iter_at_last_line
gboolean
pango_layout_iter_at_last_line (PangoLayoutIter *iter);
Determines whether iter
is on the last line of the layout.
Parameters
iter
a PangoLayoutIter
Returns
TRUE if iter
is on the last line.
pango_layout_iter_get_index ()
pango_layout_iter_get_index
int
pango_layout_iter_get_index (PangoLayoutIter *iter);
Gets the current byte index. Note that iterating forward by char
moves in visual order, not logical order, so indexes may not be
sequential. Also, the index may be equal to the length of the text
in the layout, if on the NULL run (see pango_layout_iter_get_run()).
Parameters
iter
a PangoLayoutIter
Returns
current byte index.
pango_layout_iter_get_baseline ()
pango_layout_iter_get_baseline
int
pango_layout_iter_get_baseline (PangoLayoutIter *iter);
Gets the Y position of the current line's baseline, in layout
coordinates (origin at top left of the entire layout).
Parameters
iter
a PangoLayoutIter
Returns
baseline of current line.
pango_layout_iter_get_run ()
pango_layout_iter_get_run
PangoLayoutRun *
pango_layout_iter_get_run (PangoLayoutIter *iter);
Gets the current run. When iterating by run, at the end of each
line, there's a position with a NULL run, so this function can return
NULL. The NULL run at the end of each line ensures that all lines have
at least one run, even lines consisting of only a newline.
Use the faster pango_layout_iter_get_run_readonly() if you do not plan
to modify the contents of the run (glyphs, glyph widths, etc.).
Parameters
iter
a PangoLayoutIter
Returns
the current run.
[transfer none][nullable]
pango_layout_iter_get_run_readonly ()
pango_layout_iter_get_run_readonly
PangoLayoutRun *
pango_layout_iter_get_run_readonly (PangoLayoutIter *iter);
Gets the current run. When iterating by run, at the end of each
line, there's a position with a NULL run, so this function can return
NULL. The NULL run at the end of each line ensures that all lines have
at least one run, even lines consisting of only a newline.
This is a faster alternative to pango_layout_iter_get_run(),
but the user is not expected
to modify the contents of the run (glyphs, glyph widths, etc.).
Parameters
iter
a PangoLayoutIter
Returns
the current run, that
should not be modified.
[transfer none][nullable]
Since: 1.16
pango_layout_iter_get_line ()
pango_layout_iter_get_line
PangoLayoutLine *
pango_layout_iter_get_line (PangoLayoutIter *iter);
Gets the current line.
Use the faster pango_layout_iter_get_line_readonly() if you do not plan
to modify the contents of the line (glyphs, glyph widths, etc.).
Parameters
iter
a PangoLayoutIter
Returns
the current line.
[transfer none]
pango_layout_iter_get_line_readonly ()
pango_layout_iter_get_line_readonly
PangoLayoutLine *
pango_layout_iter_get_line_readonly (PangoLayoutIter *iter);
Gets the current line for read-only access.
This is a faster alternative to pango_layout_iter_get_line(),
but the user is not expected
to modify the contents of the line (glyphs, glyph widths, etc.).
Parameters
iter
a PangoLayoutIter
Returns
the current line, that should not be
modified.
[transfer none]
Since: 1.16
pango_layout_iter_get_layout ()
pango_layout_iter_get_layout
PangoLayout *
pango_layout_iter_get_layout (PangoLayoutIter *iter);
Gets the layout associated with a PangoLayoutIter.
Parameters
iter
a PangoLayoutIter
Returns
the layout associated with iter
.
[transfer none]
Since: 1.20
pango_layout_iter_get_char_extents ()
pango_layout_iter_get_char_extents
void
pango_layout_iter_get_char_extents (PangoLayoutIter *iter,
PangoRectangle *logical_rect);
Gets the extents of the current character, in layout coordinates
(origin is the top left of the entire layout). Only logical extents
can sensibly be obtained for characters; ink extents make sense only
down to the level of clusters.
Parameters
iter
a PangoLayoutIter
logical_rect
rectangle to fill with
logical extents.
[out caller-allocates]
pango_layout_iter_get_cluster_extents ()
pango_layout_iter_get_cluster_extents
void
pango_layout_iter_get_cluster_extents (PangoLayoutIter *iter,
PangoRectangle *ink_rect,
PangoRectangle *logical_rect);
Gets the extents of the current cluster, in layout coordinates
(origin is the top left of the entire layout).
Parameters
iter
a PangoLayoutIter
ink_rect
rectangle to fill with ink extents, or NULL.
[out][allow-none]
logical_rect
rectangle to fill with logical extents, or NULL.
[out][allow-none]
pango_layout_iter_get_run_extents ()
pango_layout_iter_get_run_extents
void
pango_layout_iter_get_run_extents (PangoLayoutIter *iter,
PangoRectangle *ink_rect,
PangoRectangle *logical_rect);
Gets the extents of the current run in layout coordinates
(origin is the top left of the entire layout).
Parameters
iter
a PangoLayoutIter
ink_rect
rectangle to fill with ink extents, or NULL.
[out][allow-none]
logical_rect
rectangle to fill with logical extents, or NULL.
[out][allow-none]
pango_layout_iter_get_line_yrange ()
pango_layout_iter_get_line_yrange
void
pango_layout_iter_get_line_yrange (PangoLayoutIter *iter,
int *y0_,
int *y1_);
Divides the vertical space in the PangoLayout being iterated over
between the lines in the layout, and returns the space belonging to
the current line. A line's range includes the line's logical
extents, plus half of the spacing above and below the line, if
pango_layout_set_spacing() has been called to set layout spacing.
The Y positions are in layout coordinates (origin at top left of the
entire layout).
Note: Since 1.44, Pango uses line heights for placing lines,
and there may be gaps between the ranges returned by this
function.
Parameters
iter
a PangoLayoutIter
y0_
start of line, or NULL.
[out][allow-none]
y1_
end of line, or NULL.
[out][allow-none]
pango_layout_iter_get_line_extents ()
pango_layout_iter_get_line_extents
void
pango_layout_iter_get_line_extents (PangoLayoutIter *iter,
PangoRectangle *ink_rect,
PangoRectangle *logical_rect);
Obtains the extents of the current line. ink_rect
or logical_rect
can be NULL if you aren't interested in them. Extents are in layout
coordinates (origin is the top-left corner of the entire
PangoLayout). Thus the extents returned by this function will be
the same width/height but not at the same x/y as the extents
returned from pango_layout_line_get_extents().
Parameters
iter
a PangoLayoutIter
ink_rect
rectangle to fill with ink extents, or NULL.
[out][allow-none]
logical_rect
rectangle to fill with logical extents, or NULL.
[out][allow-none]
pango_layout_iter_get_layout_extents ()
pango_layout_iter_get_layout_extents
void
pango_layout_iter_get_layout_extents (PangoLayoutIter *iter,
PangoRectangle *ink_rect,
PangoRectangle *logical_rect);
Obtains the extents of the PangoLayout being iterated
over. ink_rect
or logical_rect
can be NULL if you
aren't interested in them.
Parameters
iter
a PangoLayoutIter
ink_rect
rectangle to fill with ink extents,
or NULL.
[out][allow-none]
logical_rect
rectangle to fill with logical
extents, or NULL.
[out][allow-none]
pango_layout_line_ref ()
pango_layout_line_ref
PangoLayoutLine *
pango_layout_line_ref (PangoLayoutLine *line);
Increase the reference count of a PangoLayoutLine by one.
Parameters
line
a PangoLayoutLine, may be NULL.
[nullable]
Returns
the line passed in.
Since: 1.10
pango_layout_line_unref ()
pango_layout_line_unref
void
pango_layout_line_unref (PangoLayoutLine *line);
Decrease the reference count of a PangoLayoutLine by one.
If the result is zero, the line and all associated memory
will be freed.
Parameters
line
a PangoLayoutLine
pango_layout_line_get_extents ()
pango_layout_line_get_extents
void
pango_layout_line_get_extents (PangoLayoutLine *line,
PangoRectangle *ink_rect,
PangoRectangle *logical_rect);
Computes the logical and ink extents of a layout line. See
pango_font_get_glyph_extents() for details about the interpretation
of the rectangles.
Parameters
line
a PangoLayoutLine
ink_rect
rectangle used to store the extents of
the glyph string as drawn, or NULL.
[out][allow-none]
logical_rect
rectangle used to store the logical
extents of the glyph string, or NULL.
[out][allow-none]
pango_layout_line_get_pixel_extents ()
pango_layout_line_get_pixel_extents
void
pango_layout_line_get_pixel_extents (PangoLayoutLine *layout_line,
PangoRectangle *ink_rect,
PangoRectangle *logical_rect);
Computes the logical and ink extents of layout_line
in device units.
This function just calls pango_layout_line_get_extents() followed by
two pango_extents_to_pixels() calls, rounding ink_rect
and logical_rect
such that the rounded rectangles fully contain the unrounded one (that is,
passes them as first argument to pango_extents_to_pixels()).
Parameters
layout_line
a PangoLayoutLine
ink_rect
rectangle used to store the extents of
the glyph string as drawn, or NULL.
[out][allow-none]
logical_rect
rectangle used to store the logical
extents of the glyph string, or NULL.
[out][allow-none]
pango_layout_line_index_to_x ()
pango_layout_line_index_to_x
void
pango_layout_line_index_to_x (PangoLayoutLine *line,
int index_,
gboolean trailing,
int *x_pos);
Converts an index within a line to a X position.
Parameters
line
a PangoLayoutLine
index_
byte offset of a grapheme within the layout
trailing
an integer indicating the edge of the grapheme to retrieve
the position of. If > 0, the trailing edge of the grapheme,
if 0, the leading of the grapheme.
x_pos
location to store the x_offset (in Pango unit).
[out]
pango_layout_line_x_to_index ()
pango_layout_line_x_to_index
gboolean
pango_layout_line_x_to_index (PangoLayoutLine *line,
int x_pos,
int *index_,
int *trailing);
Converts from x offset to the byte index of the corresponding
character within the text of the layout. If x_pos
is outside the line,
index_
and trailing
will point to the very first or very last position
in the line. This determination is based on the resolved direction
of the paragraph; for example, if the resolved direction is
right-to-left, then an X position to the right of the line (after it)
results in 0 being stored in index_
and trailing
. An X position to the
left of the line results in index_
pointing to the (logical) last
grapheme in the line and trailing
being set to the number of characters
in that grapheme. The reverse is true for a left-to-right line.
Parameters
line
a PangoLayoutLine
x_pos
the X offset (in Pango units)
from the left edge of the line.
index_
location to store calculated byte index for
the grapheme in which the user clicked.
[out]
trailing
location to store an integer indicating where
in the grapheme the user clicked. It will either
be zero, or the number of characters in the
grapheme. 0 represents the leading edge of the grapheme.
[out]
Returns
FALSE if x_pos
was outside the line, TRUE if inside
pango_layout_line_get_x_ranges ()
pango_layout_line_get_x_ranges
void
pango_layout_line_get_x_ranges (PangoLayoutLine *line,
int start_index,
int end_index,
int **ranges,
int *n_ranges);
Gets a list of visual ranges corresponding to a given logical range.
This list is not necessarily minimal - there may be consecutive
ranges which are adjacent. The ranges will be sorted from left to
right. The ranges are with respect to the left edge of the entire
layout, not with respect to the line.
Parameters
line
a PangoLayoutLine
start_index
Start byte index of the logical range. If this value
is less than the start index for the line, then
the first range will extend all the way to the leading
edge of the layout. Otherwise it will start at the
leading edge of the first character.
end_index
Ending byte index of the logical range. If this value
is greater than the end index for the line, then
the last range will extend all the way to the trailing
edge of the layout. Otherwise, it will end at the
trailing edge of the last character.
ranges
location to store a pointer to an array of ranges.
The array will be of length 2*n_ranges,
with each range starting at (*ranges)[2*n]
and of width (*ranges)[2*n + 1] - (*ranges)[2*n].
This array must be freed with g_free(). The coordinates are relative
to the layout and are in Pango units.
[out][array length=n_ranges][transfer full]
n_ranges
The number of ranges stored in ranges
.
pango_layout_line_get_height ()
pango_layout_line_get_height
void
pango_layout_line_get_height (PangoLayoutLine *line,
int *height);
Computes the height of the line, ie the distance between
this and the previous lines baseline.
Parameters
line
a PangoLayoutLine
height
return location for the line height.
[out][allow-none]
Since: 1.44
Types and Values
PangoLayout
PangoLayout
typedef struct _PangoLayout PangoLayout;
The PangoLayout structure represents an entire paragraph
of text. It is initialized with a PangoContext, UTF-8 string
and set of attributes for that string. Once that is done, the
set of formatted lines can be extracted from the object,
the layout can be rendered, and conversion between logical
character positions within the layout's text, and the physical
position of the resulting glyphs can be made.
There are also a number of parameters to adjust the formatting
of a PangoLayout, which are illustrated in .
It is possible, as well, to ignore the 2-D setup, and simply
treat the results of a PangoLayout as a list of lines.
The PangoLayout structure is opaque, and has no user-visible
fields.
PangoLayoutIter
PangoLayoutIter
typedef struct _PangoLayoutIter PangoLayoutIter;
A PangoLayoutIter structure can be used to
iterate over the visual extents of a PangoLayout.
The PangoLayoutIter structure is opaque, and
has no user-visible fields.
enum PangoWrapMode
PangoWrapMode
A PangoWrapMode describes how to wrap the lines of a PangoLayout to the desired width.
Members
PANGO_WRAP_WORD
wrap lines at word boundaries.
PANGO_WRAP_CHAR
wrap lines at character boundaries.
PANGO_WRAP_WORD_CHAR
wrap lines at word boundaries, but fall back to character boundaries if there is not
enough space for a full word.
enum PangoEllipsizeMode
PangoEllipsizeMode
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.
Members
PANGO_ELLIPSIZE_NONE
No ellipsization
PANGO_ELLIPSIZE_START
Omit characters at the start of the text
PANGO_ELLIPSIZE_MIDDLE
Omit characters in the middle of the text
PANGO_ELLIPSIZE_END
Omit characters at the end of the text
enum PangoAlignment
PangoAlignment
A PangoAlignment describes how to align the lines of a PangoLayout within the
available space. If the PangoLayout is set to justify
using pango_layout_set_justify(), this only has effect for partial lines.
Members
PANGO_ALIGN_LEFT
Put all available space on the right
PANGO_ALIGN_CENTER
Center the line within the available space
PANGO_ALIGN_RIGHT
Put all available space on the left
struct PangoLayoutLine
PangoLayoutLine
struct PangoLayoutLine {
PangoLayout *layout;
gint start_index; /* start of line as byte index into layout->text */
gint length; /* length of line in bytes */
GSList *runs;
guint is_paragraph_start : 1; /* TRUE if this is the first line of the paragraph */
guint resolved_dir : 3; /* Resolved PangoDirection of line */
};
The PangoLayoutLine structure represents one of the lines resulting
from laying out a paragraph via PangoLayout. PangoLayoutLine
structures are obtained by calling pango_layout_get_line() and
are only valid until the text, attributes, or settings of the
parent PangoLayout are modified.
Routines for rendering PangoLayout objects are provided in
code specific to each rendering system.
Members
PangoLayout *layout;
the layout this line belongs to, might be NULL.
[allow-none]
gint start_index;
start of line as byte index into layout->text
gint length;
length of line in bytes
GSList *runs;
list of runs in the
line, from left to right.
[allow-none][element-type Pango.LayoutRun]
guint is_paragraph_start : 1;
TRUE if this is the first line of the paragraph
guint resolved_dir : 3;
Resolved PangoDirection of line
PangoLayoutRun
PangoLayoutRun
typedef PangoGlyphItem PangoLayoutRun;
The PangoLayoutRun structure represents a single run within
a PangoLayoutLine; it is simply an alternate name for
PangoGlyphItem.
See the PangoGlyphItem docs for details on the fields.
docs/xml/scripts.xml 0000664 0001750 0001750 00000217254 13751777747 014713 0 ustar mclasen mclasen
]>
Scripts and Languages
3
PANGO Library
Scripts and Languages
Identifying writing systems and languages
Functions
PangoScript
pango_script_for_unichar ()
PangoLanguage *
pango_script_get_sample_language ()
PangoScriptIter *
pango_script_iter_new ()
void
pango_script_iter_get_range ()
gboolean
pango_script_iter_next ()
void
pango_script_iter_free ()
PangoLanguage *
pango_language_from_string ()
const char *
pango_language_to_string ()
gboolean
pango_language_matches ()
gboolean
pango_language_includes_script ()
const PangoScript *
pango_language_get_scripts ()
PangoLanguage *
pango_language_get_default ()
PangoLanguage **
pango_language_get_preferred ()
const char *
pango_language_get_sample_string ()
Types and Values
enumPangoScript
PangoScriptIter
PangoLanguage
Object Hierarchy
GBoxed
├── PangoLanguage
╰── PangoScriptIter
GEnum
╰── PangoScript
Description
The functions in this section are used to identify the writing
system, or script of individual characters
and of ranges within a larger text string.
Functions
pango_script_for_unichar ()
pango_script_for_unicharpango_script_for_unichar
PangoScript
pango_script_for_unichar (gunichar ch);
pango_script_for_unichar has been deprecated since version 1.44. and should not be used in newly-written code. Use g_unichar_get_script()
Looks up the script for a particular character (as defined by
Unicode Standard Annex #24). No check is made for ch
being a
valid Unicode character; if you pass in invalid character, the
result is undefined.
Note that while the return type of this function is declared
as PangoScript, as of Pango 1.18, this function simply returns
the return value of g_unichar_get_script(). Callers must be
prepared to handle unknown values.
Parameters
ch
a Unicode character
Returns
the PangoScript for the character.
Since: 1.4
pango_script_get_sample_language ()
pango_script_get_sample_language
PangoLanguage *
pango_script_get_sample_language (PangoScript script);
Given a script, finds a language tag that is reasonably
representative of that script. This will usually be the
most widely spoken or used language written in that script:
for instance, the sample language for PANGO_SCRIPT_CYRILLIC
is ru (Russian), the sample language
for PANGO_SCRIPT_ARABIC is ar.
For some
scripts, no sample language will be returned because there
is no language that is sufficiently representative. The best
example of this is PANGO_SCRIPT_HAN, where various different
variants of written Chinese, Japanese, and Korean all use
significantly different sets of Han characters and forms
of shared characters. No sample language can be provided
for many historical scripts as well.
As of 1.18, this function checks the environment variables
PANGO_LANGUAGE and LANGUAGE (checked in that order) first.
If one of them is set, it is parsed as a list of language tags
separated by colons or other separators. This function
will return the first language in the parsed list that Pango
believes may use script
for writing. This last predicate
is tested using pango_language_includes_script(). This can
be used to control Pango's font selection for non-primary
languages. For example, a PANGO_LANGUAGE enviroment variable
set to "en:fa" makes Pango choose fonts suitable for Persian (fa)
instead of Arabic (ar) when a segment of Arabic text is found
in an otherwise non-Arabic text. The same trick can be used to
choose a default language for PANGO_SCRIPT_HAN when setting
context language is not feasible.
Parameters
script
a PangoScript
Returns
a PangoLanguage that is representative
of the script, or NULL if no such language exists.
[nullable]
Since: 1.4
pango_script_iter_new ()
pango_script_iter_new
PangoScriptIter *
pango_script_iter_new (const char *text,
int length);
Create a new PangoScriptIter, used to break a string of
Unicode text into runs by Unicode script. No copy is made of
text
, so the caller needs to make sure it remains valid until
the iterator is freed with pango_script_iter_free().
Parameters
text
a UTF-8 string
length
length of text
, or -1 if text
is nul-terminated.
Returns
the new script iterator, initialized
to point at the first range in the text, which should be
freed with pango_script_iter_free(). If the string is
empty, it will point at an empty range.
Since: 1.4
pango_script_iter_get_range ()
pango_script_iter_get_range
void
pango_script_iter_get_range (PangoScriptIter *iter,
const char **start,
const char **end,
PangoScript *script);
Gets information about the range to which iter
currently points.
The range is the set of locations p where *start <= p < *end.
(That is, it doesn't include the character stored at *end)
Note that while the type of the script
argument is declared
as PangoScript, as of Pango 1.18, this function simply returns
GUnicodeScript values. Callers must be prepared to handle unknown
values.
Parameters
iter
a PangoScriptIter
start
location to store start position of the range, or NULL.
[out][allow-none]
end
location to store end position of the range, or NULL.
[out][allow-none]
script
location to store script for range, or NULL.
[out][allow-none]
Since: 1.4
pango_script_iter_next ()
pango_script_iter_next
gboolean
pango_script_iter_next (PangoScriptIter *iter);
Advances a PangoScriptIter to the next range. If iter
is already at the end, it is left unchanged and FALSE
is returned.
Parameters
iter
a PangoScriptIter
Returns
TRUE if iter
was successfully advanced.
Since: 1.4
pango_script_iter_free ()
pango_script_iter_free
void
pango_script_iter_free (PangoScriptIter *iter);
Frees a PangoScriptIter created with pango_script_iter_new().
Parameters
iter
a PangoScriptIter
Since: 1.4
pango_language_from_string ()
pango_language_from_string
PangoLanguage *
pango_language_from_string (const char *language);
Take a RFC-3066 format language tag as a string and convert it to a
PangoLanguage pointer that can be efficiently copied (copy the
pointer) and compared with other language tags (compare the
pointer.)
This function first canonicalizes the string by converting it to
lowercase, mapping '_' to '-', and stripping all characters other
than letters and '-'.
Use pango_language_get_default() if you want to get the PangoLanguage for
the current locale of the process.
Parameters
language
a string representing a language tag, or NULL.
[allow-none]
Returns
an opaque pointer to a
PangoLanguage structure, or NULL if language
was
NULL. The returned pointer will be valid forever
after, and should not be freed.
[transfer none][nullable]
pango_language_to_string ()
pango_language_to_string
const char *
pango_language_to_string (PangoLanguage *language);
Gets the RFC-3066 format string representing the given language tag.
Parameters
language
a language tag.
Returns
a string representing the language tag. This is owned by
Pango and should not be freed.
pango_language_matches ()
pango_language_matches
gboolean
pango_language_matches (PangoLanguage *language,
const char *range_list);
Checks if a language tag matches one of the elements in a list of
language ranges. A language tag is considered to match a range
in the list if the range is '*', the range is exactly the tag,
or the range is a prefix of the tag, and the character after it
in the tag is '-'.
Parameters
language
a language tag (see pango_language_from_string()),
NULL is allowed and matches nothing but '*'.
[nullable]
range_list
a list of language ranges, separated by ';', ':',
',', or space characters.
Each element must either be '*', or a RFC 3066 language range
canonicalized as by pango_language_from_string()
Returns
TRUE if a match was found.
pango_language_includes_script ()
pango_language_includes_script
gboolean
pango_language_includes_script (PangoLanguage *language,
PangoScript script);
Determines if script
is one of the scripts used to
write language
. The returned value is conservative;
if nothing is known about the language tag language
,
TRUE will be returned, since, as far as Pango knows,
script
might be used to write language
.
This routine is used in Pango's itemization process when
determining if a supplied language tag is relevant to
a particular section of text. It probably is not useful for
applications in most circumstances.
This function uses pango_language_get_scripts() internally.
Parameters
language
a PangoLanguage, or NULL.
[nullable]
script
a PangoScript
Returns
TRUE if script
is one of the scripts used
to write language
or if nothing is known about language
(including the case that language
is NULL),
FALSE otherwise.
Since: 1.4
pango_language_get_scripts ()
pango_language_get_scripts
const PangoScript *
pango_language_get_scripts (PangoLanguage *language,
int *num_scripts);
Determines the scripts used to to write language
.
If nothing is known about the language tag language
,
or if language
is NULL, then NULL is returned.
The list of scripts returned starts with the script that the
language uses most and continues to the one it uses least.
The value num_script
points at will be set to the number
of scripts in the returned array (or zero if NULL is returned).
Most languages use only one script for writing, but there are
some that use two (Latin and Cyrillic for example), and a few
use three (Japanese for example). Applications should not make
any assumptions on the maximum number of scripts returned
though, except that it is positive if the return value is not
NULL, and it is a small number.
The pango_language_includes_script() function uses this function
internally.
Note: while the return value is declared as PangoScript, the
returned values are from the GUnicodeScript enumeration, which
may have more values. Callers need to handle unknown values.
Parameters
language
a PangoLanguage, or NULL.
[allow-none]
num_scripts
location to return number of scripts,
or NULL.
[out caller-allocates][allow-none]
Returns
An array of
PangoScript values, with the number of entries in the array stored
in num_scripts
, or NULL if Pango does not have any information
about this particular language tag (also the case if language
is
NULL). The returned array is owned by Pango and should not be
modified or freed.
[array length=num_scripts][nullable]
Since: 1.22
pango_language_get_default ()
pango_language_get_default
PangoLanguage *
pango_language_get_default (void);
Returns the PangoLanguage for the current locale of the process.
Note that this can change over the life of an application.
On Unix systems, this is the return value is derived from
setlocale(LC_CTYPE, NULL), and the user can
affect this through the environment variables LC_ALL, LC_CTYPE or
LANG (checked in that order). The locale string typically is in
the form lang_COUNTRY, where lang is an ISO-639 language code, and
COUNTRY is an ISO-3166 country code. For instance, sv_FI for
Swedish as written in Finland or pt_BR for Portuguese as written in
Brazil.
On Windows, the C library does not use any such environment
variables, and setting them won't affect the behavior of functions
like ctime(). The user sets the locale through the Regional Options
in the Control Panel. The C library (in the setlocale() function)
does not use country and language codes, but country and language
names spelled out in English.
However, this function does check the above environment
variables, and does return a Unix-style locale string based on
either said environment variables or the thread's current locale.
Your application should call setlocale(LC_ALL, "");
for the user settings to take effect. Gtk+ does this in its initialization
functions automatically (by calling gtk_set_locale()).
See man setlocale for more details.
Returns
the default language as a
PangoLanguage, must not be freed.
[transfer none]
Since: 1.16
pango_language_get_preferred ()
pango_language_get_preferred
PangoLanguage **
pango_language_get_preferred (void);
Returns the list of languages that the user prefers, as specified
by the PANGO_LANGUAGE or LANGUAGE environment variables, in order
of preference. Note that this list does not necessarily include
the language returned by pango_language_get_default().
When choosing language-specific resources, such as the sample
text returned by pango_language_get_sample_string(), you should
first try the default language, followed by the languages returned
by this function.
Returns
a NULL-terminated array of
PangoLanguage*.
[transfer none][nullable]
Since: 1.48
pango_language_get_sample_string ()
pango_language_get_sample_string
const char *
pango_language_get_sample_string (PangoLanguage *language);
Get a string that is representative of the characters needed to
render a particular language.
The sample text may be a pangram, but is not necessarily. It is chosen to
be demonstrative of normal text in the language, as well as exposing font
feature requirements unique to the language. It is suitable for use
as sample text in a font selection dialog.
If language
is NULL, the default language as found by
pango_language_get_default() is used.
If Pango does not have a sample string for language
, the classic
"The quick brown fox..." is returned. This can be detected by
comparing the returned pointer value to that returned for (non-existent)
language code "xx". That is, compare to:
pango_language_get_sample_string (pango_language_from_string ("xx"))
Parameters
language
a PangoLanguage, or NULL.
[nullable]
Returns
the sample string. This value is owned by Pango
and should not be freed.
Types and Values
enum PangoScript
PangoScript
The PangoScript enumeration identifies different writing
systems. The values correspond to the names as defined in the
Unicode standard. See Unicode Standard Annex
24: Script names.
Note that this enumeration is deprecated and will not be updated
to include values in newer versions of the Unicode standard.
Applications should use the GUnicodeScript enumeration instead,
whose values are interchangeable with PangoScript.
Members
PANGO_SCRIPT_INVALID_CODE
a value never returned from pango_script_for_unichar()
PANGO_SCRIPT_COMMON
a character used by multiple different scripts
PANGO_SCRIPT_INHERITED
a mark glyph that takes its script from the
base glyph to which it is attached
PANGO_SCRIPT_ARABIC
Arabic
PANGO_SCRIPT_ARMENIAN
Armenian
PANGO_SCRIPT_BENGALI
Bengali
PANGO_SCRIPT_BOPOMOFO
Bopomofo
PANGO_SCRIPT_CHEROKEE
Cherokee
PANGO_SCRIPT_COPTIC
Coptic
PANGO_SCRIPT_CYRILLIC
Cyrillic
PANGO_SCRIPT_DESERET
Deseret
PANGO_SCRIPT_DEVANAGARI
Devanagari
PANGO_SCRIPT_ETHIOPIC
Ethiopic
PANGO_SCRIPT_GEORGIAN
Georgian
PANGO_SCRIPT_GOTHIC
Gothic
PANGO_SCRIPT_GREEK
Greek
PANGO_SCRIPT_GUJARATI
Gujarati
PANGO_SCRIPT_GURMUKHI
Gurmukhi
PANGO_SCRIPT_HAN
Han
PANGO_SCRIPT_HANGUL
Hangul
PANGO_SCRIPT_HEBREW
Hebrew
PANGO_SCRIPT_HIRAGANA
Hiragana
PANGO_SCRIPT_KANNADA
Kannada
PANGO_SCRIPT_KATAKANA
Katakana
PANGO_SCRIPT_KHMER
Khmer
PANGO_SCRIPT_LAO
Lao
PANGO_SCRIPT_LATIN
Latin
PANGO_SCRIPT_MALAYALAM
Malayalam
PANGO_SCRIPT_MONGOLIAN
Mongolian
PANGO_SCRIPT_MYANMAR
Myanmar
PANGO_SCRIPT_OGHAM
Ogham
PANGO_SCRIPT_OLD_ITALIC
Old Italic
PANGO_SCRIPT_ORIYA
Oriya
PANGO_SCRIPT_RUNIC
Runic
PANGO_SCRIPT_SINHALA
Sinhala
PANGO_SCRIPT_SYRIAC
Syriac
PANGO_SCRIPT_TAMIL
Tamil
PANGO_SCRIPT_TELUGU
Telugu
PANGO_SCRIPT_THAANA
Thaana
PANGO_SCRIPT_THAI
Thai
PANGO_SCRIPT_TIBETAN
Tibetan
PANGO_SCRIPT_CANADIAN_ABORIGINAL
Canadian Aboriginal
PANGO_SCRIPT_YI
Yi
PANGO_SCRIPT_TAGALOG
Tagalog
PANGO_SCRIPT_HANUNOO
Hanunoo
PANGO_SCRIPT_BUHID
Buhid
PANGO_SCRIPT_TAGBANWA
Tagbanwa
PANGO_SCRIPT_BRAILLE
Braille
PANGO_SCRIPT_CYPRIOT
Cypriot
PANGO_SCRIPT_LIMBU
Limbu
PANGO_SCRIPT_OSMANYA
Osmanya
PANGO_SCRIPT_SHAVIAN
Shavian
PANGO_SCRIPT_LINEAR_B
Linear B
PANGO_SCRIPT_TAI_LE
Tai Le
PANGO_SCRIPT_UGARITIC
Ugaritic
PANGO_SCRIPT_NEW_TAI_LUE
New Tai Lue. Since 1.10
PANGO_SCRIPT_BUGINESE
Buginese. Since 1.10
PANGO_SCRIPT_GLAGOLITIC
Glagolitic. Since 1.10
PANGO_SCRIPT_TIFINAGH
Tifinagh. Since 1.10
PANGO_SCRIPT_SYLOTI_NAGRI
Syloti Nagri. Since 1.10
PANGO_SCRIPT_OLD_PERSIAN
Old Persian. Since 1.10
PANGO_SCRIPT_KHAROSHTHI
Kharoshthi. Since 1.10
PANGO_SCRIPT_UNKNOWN
an unassigned code point. Since 1.14
PANGO_SCRIPT_BALINESE
Balinese. Since 1.14
PANGO_SCRIPT_CUNEIFORM
Cuneiform. Since 1.14
PANGO_SCRIPT_PHOENICIAN
Phoenician. Since 1.14
PANGO_SCRIPT_PHAGS_PA
Phags-pa. Since 1.14
PANGO_SCRIPT_NKO
N'Ko. Since 1.14
PANGO_SCRIPT_KAYAH_LI
Kayah Li. Since 1.20.1
PANGO_SCRIPT_LEPCHA
Lepcha. Since 1.20.1
PANGO_SCRIPT_REJANG
Rejang. Since 1.20.1
PANGO_SCRIPT_SUNDANESE
Sundanese. Since 1.20.1
PANGO_SCRIPT_SAURASHTRA
Saurashtra. Since 1.20.1
PANGO_SCRIPT_CHAM
Cham. Since 1.20.1
PANGO_SCRIPT_OL_CHIKI
Ol Chiki. Since 1.20.1
PANGO_SCRIPT_VAI
Vai. Since 1.20.1
PANGO_SCRIPT_CARIAN
Carian. Since 1.20.1
PANGO_SCRIPT_LYCIAN
Lycian. Since 1.20.1
PANGO_SCRIPT_LYDIAN
Lydian. Since 1.20.1
PANGO_SCRIPT_BATAK
Batak. Since 1.32
PANGO_SCRIPT_BRAHMI
Brahmi. Since 1.32
PANGO_SCRIPT_MANDAIC
Mandaic. Since 1.32
PANGO_SCRIPT_CHAKMA
Chakma. Since: 1.32
PANGO_SCRIPT_MEROITIC_CURSIVE
Meroitic Cursive. Since: 1.32
PANGO_SCRIPT_MEROITIC_HIEROGLYPHS
Meroitic Hieroglyphs. Since: 1.32
PANGO_SCRIPT_MIAO
Miao. Since: 1.32
PANGO_SCRIPT_SHARADA
Sharada. Since: 1.32
PANGO_SCRIPT_SORA_SOMPENG
Sora Sompeng. Since: 1.32
PANGO_SCRIPT_TAKRI
Takri. Since: 1.32
PANGO_SCRIPT_BASSA_VAH
Bassa. Since: 1.40
PANGO_SCRIPT_CAUCASIAN_ALBANIAN
Caucasian Albanian. Since: 1.40
PANGO_SCRIPT_DUPLOYAN
Duployan. Since: 1.40
PANGO_SCRIPT_ELBASAN
Elbasan. Since: 1.40
PANGO_SCRIPT_GRANTHA
Grantha. Since: 1.40
PANGO_SCRIPT_KHOJKI
Kjohki. Since: 1.40
PANGO_SCRIPT_KHUDAWADI
Khudawadi, Sindhi. Since: 1.40
PANGO_SCRIPT_LINEAR_A
Linear A. Since: 1.40
PANGO_SCRIPT_MAHAJANI
Mahajani. Since: 1.40
PANGO_SCRIPT_MANICHAEAN
Manichaean. Since: 1.40
PANGO_SCRIPT_MENDE_KIKAKUI
Mende Kikakui. Since: 1.40
PANGO_SCRIPT_MODI
Modi. Since: 1.40
PANGO_SCRIPT_MRO
Mro. Since: 1.40
PANGO_SCRIPT_NABATAEAN
Nabataean. Since: 1.40
PANGO_SCRIPT_OLD_NORTH_ARABIAN
Old North Arabian. Since: 1.40
PANGO_SCRIPT_OLD_PERMIC
Old Permic. Since: 1.40
PANGO_SCRIPT_PAHAWH_HMONG
Pahawh Hmong. Since: 1.40
PANGO_SCRIPT_PALMYRENE
Palmyrene. Since: 1.40
PANGO_SCRIPT_PAU_CIN_HAU
Pau Cin Hau. Since: 1.40
PANGO_SCRIPT_PSALTER_PAHLAVI
Psalter Pahlavi. Since: 1.40
PANGO_SCRIPT_SIDDHAM
Siddham. Since: 1.40
PANGO_SCRIPT_TIRHUTA
Tirhuta. Since: 1.40
PANGO_SCRIPT_WARANG_CITI
Warang Citi. Since: 1.40
PANGO_SCRIPT_AHOM
Ahom. Since: 1.40
PANGO_SCRIPT_ANATOLIAN_HIEROGLYPHS
Anatolian Hieroglyphs. Since: 1.40
PANGO_SCRIPT_HATRAN
Hatran. Since: 1.40
PANGO_SCRIPT_MULTANI
Multani. Since: 1.40
PANGO_SCRIPT_OLD_HUNGARIAN
Old Hungarian. Since: 1.40
PANGO_SCRIPT_SIGNWRITING
Signwriting. Since: 1.40
PangoScriptIter
PangoScriptIter
typedef struct _PangoScriptIter PangoScriptIter;
A PangoScriptIter is used to iterate through a string
and identify ranges in different scripts.
PangoLanguage
PangoLanguage
typedef struct _PangoLanguage PangoLanguage;
The PangoLanguage structure is used to
represent a language.
PangoLanguage pointers can be efficiently
copied and compared with each other.
docs/xml/engines.xml 0000664 0001750 0001750 00000036473 13751777747 014656 0 ustar mclasen mclasen
]>
Engines
3
PANGO Library
Engines
Language-specific and rendering-system-specific processing
Functions
void
script_engine_list ()
void
script_engine_init ()
void
script_engine_exit ()
PangoEngine *
script_engine_create ()
Types and Values
structPangoEngineInfo
structPangoEngineScriptInfo
structPangoEngine
structPangoEngineClass
Object Hierarchy
GObject
╰── PangoEngine
├── PangoEngineLang
╰── PangoEngineShape
Description
Pango used to have a module architecture in which the language-specific
and render-system-specific components are provided by loadable
modules.
This is no longer the case, and all the APIs related
to modules and engines should not be used anymore.
Functions
script_engine_list ()
script_engine_list
void
script_engine_list (PangoEngineInfo **engines,
int *n_engines);
script_engine_list has been deprecated since version 1.38 and should not be used in newly-written code.
Do not use.
[skip]
Parameters
engines
location to store a pointer to an array of engines.
n_engines
location to store the number of elements in engines
.
script_engine_init ()
script_engine_init
void
script_engine_init (GTypeModule *module);
script_engine_init has been deprecated since version 1.38 and should not be used in newly-written code.
Do not use.
[skip]
Parameters
module
a GTypeModule structure used to associate any
GObject types created in this module with the module.
script_engine_exit ()
script_engine_exit
void
script_engine_exit (void);
script_engine_exit has been deprecated since version 1.38 and should not be used in newly-written code.
Do not use.
[skip]
script_engine_create ()
script_engine_create
PangoEngine *
script_engine_create (const char *id);
script_engine_create has been deprecated since version 1.38 and should not be used in newly-written code.
Do not use.
[skip]
Parameters
id
the ID of an engine as reported by script_engine_list.
Types and Values
struct PangoEngineInfo
PangoEngineInfo
struct PangoEngineInfo {
const gchar *id;
const gchar *engine_type;
const gchar *render_type;
PangoEngineScriptInfo *scripts;
gint n_scripts;
};
PangoEngineInfo has been deprecated since version 1.38 and should not be used in newly-written code.
The PangoEngineInfo structure contains information about a particular
engine. It contains the following fields:
Members
const gchar *id;
a unique string ID for the engine.
const gchar *engine_type;
a string identifying the engine type.
const gchar *render_type;
a string identifying the render type.
PangoEngineScriptInfo *scripts;
array of scripts this engine supports.
gint n_scripts;
number of items in scripts
.
struct PangoEngineScriptInfo
PangoEngineScriptInfo
struct PangoEngineScriptInfo {
PangoScript script;
const gchar *langs;
};
PangoEngineScriptInfo has been deprecated since version 1.38 and should not be used in newly-written code.
The PangoEngineScriptInfo structure contains
information about how the shaper covers a particular script.
Members
PangoScript script;
a PangoScript. The value PANGO_SCRIPT_COMMON has
the special meaning here of "all scripts"
const gchar *langs;
a semicolon separated list of languages that this
engine handles for this script. This may be empty,
in which case the engine is saying that it is a
fallback choice for all languages for this range,
but should not be used if another engine
indicates that it is specific for the language for
a given code point. An entry in this list of "*"
indicates that this engine is specific to all
languages for this range.
struct PangoEngine
PangoEngine
struct PangoEngine;
PangoEngine has been deprecated since version 1.38 and should not be used in newly-written code.
PangoEngine is the base class for all types of language and
script specific engines. It has no functionality by itself.
struct PangoEngineClass
PangoEngineClass
struct PangoEngineClass {
};
PangoEngineClass has been deprecated since version 1.38 and should not be used in newly-written code.
Class structure for PangoEngine
docs/xml/pango-engine-lang.xml 0000664 0001750 0001750 00000023647 13751777747 016513 0 ustar mclasen mclasen
]>
PangoEngineLang
3
PANGO Library
PangoEngineLang
Rendering-system independent script engines
Stability Level
Unstable, unless otherwise indicated
Functions
#definePANGO_ENGINE_LANG_DEFINE_TYPE()
Types and Values
PangoEngineLang
structPangoEngineLangClass
#definePANGO_ENGINE_TYPE_LANG
Object Hierarchy
GObject
╰── PangoEngine
╰── PangoEngineLang
Description
The language engines are rendering-system independent
engines that determine line, word, and character breaks for character strings.
These engines are used in pango_break().
Functions
PANGO_ENGINE_LANG_DEFINE_TYPE()
PANGO_ENGINE_LANG_DEFINE_TYPE
#define PANGO_ENGINE_LANG_DEFINE_TYPE(name, prefix, class_init, instance_init)
PANGO_ENGINE_LANG_DEFINE_TYPE has been deprecated since version 1.38 and should not be used in newly-written code.
Outputs the necessary code for GObject type registration for a
PangoEngineLang class defined in a module. Two static symbols
are defined.
static GType prefix_type;
static void prefix_register_type (GTypeModule module);
The prefix_register_type()
function should be called in your script_engine_init() function for
each type that your module implements, and then your script_engine_create()
function can create instances of the object as follows:
PangoEngine *engine = g_object_new (prefix_type, NULL);
Parameters
name
Name of the the type to register (for example:, ArabicEngineFc
prefix
Prefix for symbols that will be defined (for example:, arabic_engine_fc
class_init
Class initialization function for the new type, or NULL.
[nullable]
instance_init
Instance initialization function for the new type, or NULL.
[nullable]
Types and Values
PangoEngineLang
PangoEngineLang
typedef struct _PangoEngineLang PangoEngineLang;
PangoEngineLang has been deprecated since version 1.38 and should not be used in newly-written code.
The PangoEngineLang class is implemented by engines that
customize the rendering-system independent part of the
Pango pipeline for a particular script or language. For
instance, a custom PangoEngineLang could be provided for
Thai to implement the dictionary-based word boundary
lookups needed for that language.
struct PangoEngineLangClass
PangoEngineLangClass
struct PangoEngineLangClass {
void (*script_break) (PangoEngineLang *engine,
const char *text,
int len,
PangoAnalysis *analysis,
PangoLogAttr *attrs,
int attrs_len);
};
PangoEngineLangClass has been deprecated since version 1.38 and should not be used in newly-written code.
Class structure for PangoEngineLang
Members
script_break ()
Provides a custom implementation of
pango_break(). If NULL, pango_default_break() is used instead. If
not NULL, for Pango versions before 1.16 (module interface version
before 1.6.0), this was called instead of pango_default_break(),
but in newer versions, pango_default_break() is always called and
this is called after that to allow tailoring the breaking results.
[nullable]
PANGO_ENGINE_TYPE_LANG
PANGO_ENGINE_TYPE_LANG
#define PANGO_ENGINE_TYPE_LANG "PangoEngineLang"
PANGO_ENGINE_TYPE_LANG has been deprecated since version 1.38 and should not be used in newly-written code.
A string constant defining the engine type for language engines.
These engines derive from PangoEngineLang.
docs/xml/pango-engine-shape.xml 0000664 0001750 0001750 00000026504 13751777747 016665 0 ustar mclasen mclasen
]>
PangoEngineShape
3
PANGO Library
PangoEngineShape
Rendering-system dependent script engines
Stability Level
Unstable, unless otherwise indicated
Functions
#definePANGO_ENGINE_SHAPE_DEFINE_TYPE()
Types and Values
PangoEngineShape
structPangoEngineShapeClass
#definePANGO_ENGINE_TYPE_SHAPE
Object Hierarchy
GObject
╰── PangoEngine
╰── PangoEngineShape
Description
The shape engines are rendering-system dependent
engines that convert character strings into glyph strings.
These engines are used in pango_shape().
Functions
PANGO_ENGINE_SHAPE_DEFINE_TYPE()
PANGO_ENGINE_SHAPE_DEFINE_TYPE
#define PANGO_ENGINE_SHAPE_DEFINE_TYPE(name, prefix, class_init, instance_init)
PANGO_ENGINE_SHAPE_DEFINE_TYPE has been deprecated since version 1.38 and should not be used in newly-written code.
Outputs the necessary code for GObject type registration for a
PangoEngineShape class defined in a module. Two static symbols
are defined.
static GType prefix_type;
static void prefix_register_type (GTypeModule module);
The prefix_register_type()
function should be called in your script_engine_init() function for
each type that your module implements, and then your script_engine_create()
function can create instances of the object as follows:
PangoEngine *engine = g_object_new (prefix_type, NULL);
Parameters
name
Name of the the type to register (for example:, ArabicEngineFc
prefix
Prefix for symbols that will be defined (for example:, arabic_engine_fc
class_init
Class initialization function for the new type, or NULL.
[nullable]
instance_init
Instance initialization function for the new type, or NULL.
[nullable]
Types and Values
PangoEngineShape
PangoEngineShape
typedef struct _PangoEngineShape PangoEngineShape;
PangoEngineShape has been deprecated since version 1.38 and should not be used in newly-written code.
The PangoEngineShape class is implemented by engines that
customize the rendering-system dependent part of the
Pango pipeline for a particular script or language.
A PangoEngineShape implementation is then specific to both
a particular rendering system or group of rendering systems
and to a particular script. For instance, there is one
PangoEngineShape implementation to handle shaping Arabic
for Fontconfig-based backends.
struct PangoEngineShapeClass
PangoEngineShapeClass
struct PangoEngineShapeClass {
void (*script_shape) (PangoEngineShape *engine,
PangoFont *font,
const char *item_text,
unsigned int item_length,
const PangoAnalysis *analysis,
PangoGlyphString *glyphs,
const char *paragraph_text,
unsigned int paragraph_length);
PangoCoverageLevel (*covers) (PangoEngineShape *engine,
PangoFont *font,
PangoLanguage *language,
gunichar wc);
};
PangoEngineShapeClass has been deprecated since version 1.38 and should not be used in newly-written code.
Class structure for PangoEngineShape
Members
script_shape ()
Given a font, a piece of text, and a PangoAnalysis
structure, converts characters to glyphs and positions the
resulting glyphs. The results are stored in the PangoGlyphString
that is passed in. (The implementation should resize it
appropriately using pango_glyph_string_set_size()). All fields
of the log_clusters
and glyphs
array must be filled in, with
the exception that Pango will automatically generate
glyphs->glyphs[i].attr.is_cluster_start
using the log_clusters
array. Each input character must occur in one
of the output logical clusters;
if no rendering is desired for a character, this may involve
inserting glyphs with the PangoGlyph ID PANGO_GLYPH_EMPTY, which
is guaranteed never to render. If the shaping fails for any reason,
the shaper should return with an empty (zero-size) glyph string.
If the shaper has not set the size on the glyph string yet, simply
returning signals the failure too.
covers ()
Returns the characters that this engine can cover
with a given font for a given language. If not overridden, the default
implementation simply returns the coverage information for the
font itself unmodified.
PANGO_ENGINE_TYPE_SHAPE
PANGO_ENGINE_TYPE_SHAPE
#define PANGO_ENGINE_TYPE_SHAPE "PangoEngineShape"
PANGO_ENGINE_TYPE_SHAPE has been deprecated since version 1.38 and should not be used in newly-written code.
A string constant defining the engine type for shaping engines.
These engines derive from PangoEngineShape.
docs/xml/modules.xml 0000664 0001750 0001750 00000035255 13751777747 014673 0 ustar mclasen mclasen
]>
Modules
3
PANGO Library
Modules
Support for loadable modules
Functions
PangoMap *
pango_find_map ()
PangoEngine *
pango_map_get_engine ()
void
pango_map_get_engines ()
void
pango_module_register ()
Types and Values
structPangoIncludedModule
PangoMap
PangoMapEntry
Description
Functions and macros in this section were used to support
loading dynamic modules that add engines to Pango at run time.
That is no longer the case, and these APIs should not be
used anymore.
Functions
pango_find_map ()
pango_find_map
PangoMap *
pango_find_map (PangoLanguage *language,
guint engine_type_id,
guint render_type_id);
pango_find_map has been deprecated since version 1.38 and should not be used in newly-written code.
Do not use. Does not do anything.
[skip]
Parameters
language
the language tag for which to find the map
engine_type_id
the engine type for the map to find
render_type_id
the render type for the map to find
Returns
NULL.
[transfer none][nullable]
pango_map_get_engine ()
pango_map_get_engine
PangoEngine *
pango_map_get_engine (PangoMap *map,
PangoScript script);
pango_map_get_engine has been deprecated since version 1.38 and should not be used in newly-written code.
Do not use. Does not do anything.
[skip]
Parameters
map
a PangoMap
script
a PangoScript
Returns
NULL.
[transfer none][nullable]
pango_map_get_engines ()
pango_map_get_enginespango_map_get_engines
void
pango_map_get_engines (PangoMap *map,
PangoScript script,
GSList **exact_engines,
GSList **fallback_engines);
pango_map_get_engines has been deprecated since version 1.38 and should not be used in newly-written code.
Do not use. Does not do anything.
[skip]
Parameters
map
a PangoMap
script
a PangoScript
exact_engines
location to store list of engines that exactly
handle this script.
[nullable]
fallback_engines
location to store list of engines that
approximately handle this script.
[nullable]
Since: 1.4
pango_module_register ()
pango_module_register
void
pango_module_register (PangoIncludedModule *module);
pango_module_register has been deprecated since version 1.38 and should not be used in newly-written code.
Do not use. Does not do anything.
[skip]
Parameters
module
a PangoIncludedModule
Types and Values
struct PangoIncludedModule
PangoIncludedModule
struct PangoIncludedModule {
void (*list) (PangoEngineInfo **engines,
int *n_engines);
void (*init) (GTypeModule *module);
void (*exit) (void);
PangoEngine *(*create) (const char *id);
};
PangoIncludedModule has been deprecated since version 1.38 and should not be used in newly-written code.
The PangoIncludedModule structure for a statically linked module
contains the functions that would otherwise be loaded from a dynamically
loaded module.
Members
list ()
a function that lists the engines defined in this module.
init ()
a function to initialize the module.
exit ()
a function to finalize the module.
create ()
a function to create an engine, given the engine name.
PangoMap
PangoMap
typedef struct _PangoMap PangoMap;
PangoMap is deprecated and should not be used in newly-written code.
PangoMapEntry
PangoMapEntry
typedef struct _PangoMapEntry PangoMapEntry;
PangoMapEntry is deprecated and should not be used in newly-written code.
docs/xml/pango-renderer.xml 0000664 0001750 0001750 00000177125 13751777747 016136 0 ustar mclasen mclasen
]>
PangoRenderer
3
PANGO Library
PangoRenderer
Rendering driver base class
Functions
void
pango_renderer_draw_layout ()
void
pango_renderer_draw_layout_line ()
void
pango_renderer_draw_glyphs ()
void
pango_renderer_draw_glyph_item ()
void
pango_renderer_draw_rectangle ()
void
pango_renderer_draw_error_underline ()
void
pango_renderer_draw_trapezoid ()
void
pango_renderer_draw_glyph ()
void
pango_renderer_activate ()
void
pango_renderer_deactivate ()
void
pango_renderer_part_changed ()
void
pango_renderer_set_color ()
PangoColor *
pango_renderer_get_color ()
void
pango_renderer_set_alpha ()
guint16
pango_renderer_get_alpha ()
void
pango_renderer_set_matrix ()
const PangoMatrix *
pango_renderer_get_matrix ()
PangoLayout *
pango_renderer_get_layout ()
PangoLayoutLine *
pango_renderer_get_layout_line ()
Types and Values
structPangoRenderer
enumPangoRenderPart
#definePANGO_TYPE_RENDER_PART
structPangoRendererClass
Object Hierarchy
GEnum
╰── PangoRenderPart
GObject
╰── PangoRenderer
╰── PangoXftRenderer
Description
PangoRenderer is a base class that contains the necessary logic for
rendering a PangoLayout or PangoLayoutLine. By subclassing
PangoRenderer and overriding operations such as draw_glyphs
and
draw_rectangle
, renderers for particular font backends and
destinations can be created.
Functions
pango_renderer_draw_layout ()
pango_renderer_draw_layout
void
pango_renderer_draw_layout (PangoRenderer *renderer,
PangoLayout *layout,
int x,
int y);
Draws layout
with the specified PangoRenderer.
Parameters
renderer
a PangoRenderer
layout
a PangoLayout
x
X position of left edge of baseline, in user space coordinates
in Pango units.
y
Y position of left edge of baseline, in user space coordinates
in Pango units.
Since: 1.8
pango_renderer_draw_layout_line ()
pango_renderer_draw_layout_line
void
pango_renderer_draw_layout_line (PangoRenderer *renderer,
PangoLayoutLine *line,
int x,
int y);
Draws line
with the specified PangoRenderer.
Parameters
renderer
a PangoRenderer
line
a PangoLayoutLine
x
X position of left edge of baseline, in user space coordinates
in Pango units.
y
Y position of left edge of baseline, in user space coordinates
in Pango units.
Since: 1.8
pango_renderer_draw_glyphs ()
pango_renderer_draw_glyphs
void
pango_renderer_draw_glyphs (PangoRenderer *renderer,
PangoFont *font,
PangoGlyphString *glyphs,
int x,
int y);
Draws the glyphs in glyphs
with the specified PangoRenderer.
Parameters
renderer
a PangoRenderer
font
a PangoFont
glyphs
a PangoGlyphString
x
X position of left edge of baseline, in user space coordinates
in Pango units.
y
Y position of left edge of baseline, in user space coordinates
in Pango units.
Since: 1.8
pango_renderer_draw_glyph_item ()
pango_renderer_draw_glyph_item
void
pango_renderer_draw_glyph_item (PangoRenderer *renderer,
const char *text,
PangoGlyphItem *glyph_item,
int x,
int y);
Draws the glyphs in glyph_item
with the specified PangoRenderer,
embedding the text associated with the glyphs in the output if the
output format supports it (PDF for example).
Note that text
is the start of the text for layout, which is then
indexed by glyph_item->item->offset
.
If text
is NULL, this simply calls pango_renderer_draw_glyphs().
The default implementation of this method simply falls back to
pango_renderer_draw_glyphs().
Parameters
renderer
a PangoRenderer
text
the UTF-8 text that glyph_item
refers to, or NULL.
[allow-none]
glyph_item
a PangoGlyphItem
x
X position of left edge of baseline, in user space coordinates
in Pango units.
y
Y position of left edge of baseline, in user space coordinates
in Pango units.
Since: 1.22
pango_renderer_draw_rectangle ()
pango_renderer_draw_rectangle
void
pango_renderer_draw_rectangle (PangoRenderer *renderer,
PangoRenderPart part,
int x,
int y,
int width,
int height);
Draws an axis-aligned rectangle in user space coordinates with the
specified PangoRenderer.
This should be called while renderer
is already active. Use
pango_renderer_activate() to activate a renderer.
Parameters
renderer
a PangoRenderer
part
type of object this rectangle is part of
x
X position at which to draw rectangle, in user space coordinates in Pango units
y
Y position at which to draw rectangle, in user space coordinates in Pango units
width
width of rectangle in Pango units in user space coordinates
height
height of rectangle in Pango units in user space coordinates
Since: 1.8
pango_renderer_draw_error_underline ()
pango_renderer_draw_error_underline
void
pango_renderer_draw_error_underline (PangoRenderer *renderer,
int x,
int y,
int width,
int height);
Draw a squiggly line that approximately covers the given rectangle
in the style of an underline used to indicate a spelling error.
(The width of the underline is rounded to an integer number
of up/down segments and the resulting rectangle is centered
in the original rectangle)
This should be called while renderer
is already active. Use
pango_renderer_activate() to activate a renderer.
Parameters
renderer
a PangoRenderer
x
X coordinate of underline, in Pango units in user coordinate system
y
Y coordinate of underline, in Pango units in user coordinate system
width
width of underline, in Pango units in user coordinate system
height
height of underline, in Pango units in user coordinate system
Since: 1.8
pango_renderer_draw_trapezoid ()
pango_renderer_draw_trapezoid
void
pango_renderer_draw_trapezoid (PangoRenderer *renderer,
PangoRenderPart part,
double y1_,
double x11,
double x21,
double y2,
double x12,
double x22);
Draws a trapezoid with the parallel sides aligned with the X axis
using the given PangoRenderer; coordinates are in device space.
Parameters
renderer
a PangoRenderer
part
type of object this trapezoid is part of
y1_
Y coordinate of top of trapezoid
x11
X coordinate of left end of top of trapezoid
x21
X coordinate of right end of top of trapezoid
y2
Y coordinate of bottom of trapezoid
x12
X coordinate of left end of bottom of trapezoid
x22
X coordinate of right end of bottom of trapezoid
Since: 1.8
pango_renderer_draw_glyph ()
pango_renderer_draw_glyph
void
pango_renderer_draw_glyph (PangoRenderer *renderer,
PangoFont *font,
PangoGlyph glyph,
double x,
double y);
Draws a single glyph with coordinates in device space.
Parameters
renderer
a PangoRenderer
font
a PangoFont
glyph
the glyph index of a single glyph
x
X coordinate of left edge of baseline of glyph
y
Y coordinate of left edge of baseline of glyph
Since: 1.8
pango_renderer_activate ()
pango_renderer_activate
void
pango_renderer_activate (PangoRenderer *renderer);
Does initial setup before rendering operations on renderer
.
pango_renderer_deactivate() should be called when done drawing.
Calls such as pango_renderer_draw_layout() automatically
activate the layout before drawing on it. Calls to
pango_renderer_activate() and pango_renderer_deactivate() can
be nested and the renderer will only be initialized and
deinitialized once.
Parameters
renderer
a PangoRenderer
Since: 1.8
pango_renderer_deactivate ()
pango_renderer_deactivate
void
pango_renderer_deactivate (PangoRenderer *renderer);
Cleans up after rendering operations on renderer
. See
docs for pango_renderer_activate().
Parameters
renderer
a PangoRenderer
Since: 1.8
pango_renderer_part_changed ()
pango_renderer_part_changed
void
pango_renderer_part_changed (PangoRenderer *renderer,
PangoRenderPart part);
Informs Pango that the way that the rendering is done
for part
has changed in a way that would prevent multiple
pieces being joined together into one drawing call. For
instance, if a subclass of PangoRenderer was to add a stipple
option for drawing underlines, it needs to call
pango_renderer_part_changed (render, PANGO_RENDER_PART_UNDERLINE);
When the stipple changes or underlines with different stipples
might be joined together. Pango automatically calls this for
changes to colors. (See pango_renderer_set_color())
Parameters
renderer
a PangoRenderer
part
the part for which rendering has changed.
Since: 1.8
pango_renderer_set_color ()
pango_renderer_set_color
void
pango_renderer_set_color (PangoRenderer *renderer,
PangoRenderPart part,
const PangoColor *color);
Sets the color for part of the rendering.
Also see pango_renderer_set_alpha().
Parameters
renderer
a PangoRenderer
part
the part to change the color of
color
the new color or NULL to unset the current color.
[allow-none]
Since: 1.8
pango_renderer_get_color ()
pango_renderer_get_color
PangoColor *
pango_renderer_get_color (PangoRenderer *renderer,
PangoRenderPart part);
Gets the current rendering color for the specified part.
Parameters
renderer
a PangoRenderer
part
the part to get the color for
Returns
the color for the
specified part, or NULL if it hasn't been set and should be
inherited from the environment.
[transfer none][nullable]
Since: 1.8
pango_renderer_set_alpha ()
pango_renderer_set_alpha
void
pango_renderer_set_alpha (PangoRenderer *renderer,
PangoRenderPart part,
guint16 alpha);
Sets the alpha for part of the rendering.
Note that the alpha may only be used if a color is
specified for part
as well.
Parameters
renderer
a PangoRenderer
part
the part to set the alpha for
alpha
an alpha value between 1 and 65536, or 0 to unset the alpha
Since: 1.38
pango_renderer_get_alpha ()
pango_renderer_get_alpha
guint16
pango_renderer_get_alpha (PangoRenderer *renderer,
PangoRenderPart part);
Gets the current alpha for the specified part.
Parameters
renderer
a PangoRenderer
part
the part to get the alpha for
Returns
the alpha for the specified part,
or 0 if it hasn't been set and should be
inherited from the environment.
Since: 1.38
pango_renderer_set_matrix ()
pango_renderer_set_matrix
void
pango_renderer_set_matrix (PangoRenderer *renderer,
const PangoMatrix *matrix);
Sets the transformation matrix that will be applied when rendering.
Parameters
renderer
a PangoRenderer
matrix
a PangoMatrix, or NULL to unset any existing matrix.
(No matrix set is the same as setting the identity matrix.).
[allow-none]
Since: 1.8
pango_renderer_get_matrix ()
pango_renderer_get_matrix
const PangoMatrix *
pango_renderer_get_matrix (PangoRenderer *renderer);
Gets the transformation matrix that will be applied when
rendering. See pango_renderer_set_matrix().
Parameters
renderer
a PangoRenderer
Returns
the matrix, or NULL if no matrix has
been set (which is the same as the identity matrix). The returned
matrix is owned by Pango and must not be modified or freed.
[nullable]
Since: 1.8
pango_renderer_get_layout ()
pango_renderer_get_layout
PangoLayout *
pango_renderer_get_layout (PangoRenderer *renderer);
Gets the layout currently being rendered using renderer
.
Calling this function only makes sense from inside a subclass's
methods, like in its draw_shape vfunc, for example.
The returned layout should not be modified while still being
rendered.
Parameters
renderer
a PangoRenderer
Returns
the layout, or NULL if
no layout is being rendered using renderer
at this time.
[transfer none][nullable]
Since: 1.20
pango_renderer_get_layout_line ()
pango_renderer_get_layout_line
PangoLayoutLine *
pango_renderer_get_layout_line (PangoRenderer *renderer);
Gets the layout line currently being rendered using renderer
.
Calling this function only makes sense from inside a subclass's
methods, like in its draw_shape vfunc, for example.
The returned layout line should not be modified while still being
rendered.
Parameters
renderer
a PangoRenderer
Returns
the layout line, or NULL
if no layout line is being rendered using renderer
at this time.
[transfer none][nullable]
Since: 1.20
Types and Values
struct PangoRenderer
PangoRenderer
struct PangoRenderer {
PangoMatrix *matrix; /* May be NULL */
};
PangoRenderer is a base class for objects that are used to
render Pango objects such as PangoGlyphString and
PangoLayout.
Members
PangoMatrix *matrix;
the current transformation matrix for
the Renderer; may be NULL, which should be treated the
same as the identity matrix.
[nullable]
Since: 1.8
enum PangoRenderPart
PangoRenderPart
PangoRenderPart defines different items to render for such
purposes as setting colors.
Members
PANGO_RENDER_PART_FOREGROUND
the text itself
PANGO_RENDER_PART_BACKGROUND
the area behind the text
PANGO_RENDER_PART_UNDERLINE
underlines
PANGO_RENDER_PART_STRIKETHROUGH
strikethrough lines
PANGO_RENDER_PART_OVERLINE
overlines
Since: 1.8
PANGO_TYPE_RENDER_PART
PANGO_TYPE_RENDER_PART
#define PANGO_TYPE_RENDER_PART (pango_render_part_get_type ())
struct PangoRendererClass
PangoRendererClass
struct PangoRendererClass {
void (*draw_glyphs) (PangoRenderer *renderer,
PangoFont *font,
PangoGlyphString *glyphs,
int x,
int y);
void (*draw_rectangle) (PangoRenderer *renderer,
PangoRenderPart part,
int x,
int y,
int width,
int height);
void (*draw_error_underline) (PangoRenderer *renderer,
int x,
int y,
int width,
int height);
void (*draw_shape) (PangoRenderer *renderer,
PangoAttrShape *attr,
int x,
int y);
void (*draw_trapezoid) (PangoRenderer *renderer,
PangoRenderPart part,
double y1_,
double x11,
double x21,
double y2,
double x12,
double x22);
void (*draw_glyph) (PangoRenderer *renderer,
PangoFont *font,
PangoGlyph glyph,
double x,
double y);
void (*part_changed) (PangoRenderer *renderer,
PangoRenderPart part);
void (*begin) (PangoRenderer *renderer);
void (*end) (PangoRenderer *renderer);
void (*prepare_run) (PangoRenderer *renderer,
PangoLayoutRun *run);
void (*draw_glyph_item) (PangoRenderer *renderer,
const char *text,
PangoGlyphItem *glyph_item,
int x,
int y);
};
Class structure for PangoRenderer.
The following vfuncs take user space coordinates in Pango units
and have default implementations:
draw_glyphs
draw_rectangle
draw_error_underline
draw_shape
draw_glyph_item
The default draw_shape implementation draws nothing.
The following vfuncs take device space coordinates as doubles
and must be implemented:
draw_trapezoid
draw_glyph
Members
draw_glyphs ()
draws a PangoGlyphString
draw_rectangle ()
draws a rectangle
draw_error_underline ()
draws a squiggly line that approximately
covers the given rectangle in the style of an underline used to
indicate a spelling error.
draw_shape ()
draw content for a glyph shaped with PangoAttrShape.
x
, y
are the coordinates of the left edge of the baseline,
in user coordinates.
draw_trapezoid ()
draws a trapezoidal filled area
draw_glyph ()
draws a single glyph
part_changed ()
do renderer specific processing when rendering
attributes change
begin ()
Do renderer-specific initialization before drawing
end ()
Do renderer-specific cleanup after drawing
prepare_run ()
updates the renderer for a new run
draw_glyph_item ()
draws a PangoGlyphItem
Since: 1.8
docs/xml/win32-fonts.xml 0000664 0001750 0001750 00000143043 13751777747 015307 0 ustar mclasen mclasen
]>
Win32 Fonts and Rendering
3
PANGO Library
Win32 Fonts and Rendering
Font handling and rendering on Windows
Functions
PangoContext *
pango_win32_get_context ()
void
pango_win32_render ()
void
pango_win32_render_transformed ()
void
pango_win32_render_layout_line ()
void
pango_win32_render_layout ()
PangoGlyph
pango_win32_get_unknown_glyph ()
gint
pango_win32_font_get_glyph_index ()
gboolean
pango_win32_font_select_font ()
void
pango_win32_font_done_font ()
double
pango_win32_font_get_metrics_factor ()
gboolean
pango_win32_get_debug_flag ()
HDC
pango_win32_get_dc ()
PangoWin32FontCache *
pango_win32_font_cache_new ()
void
pango_win32_font_cache_free ()
HFONT
pango_win32_font_cache_load ()
HFONT
pango_win32_font_cache_loadw ()
void
pango_win32_font_cache_unload ()
PangoFontMap *
pango_win32_font_map_for_display ()
void
pango_win32_shutdown_display ()
PangoWin32FontCache *
pango_win32_font_map_get_font_cache ()
LOGFONTA *
pango_win32_font_logfont ()
LOGFONTW *
pango_win32_font_logfontw ()
PangoFontDescription *
pango_win32_font_description_from_logfont ()
PangoFontDescription *
pango_win32_font_description_from_logfontw ()
Types and Values
PangoWin32FontCache
Description
The macros and functions in this section are used to access fonts natively on
Win32 systems and to render text in conjunction with Win32 APIs.
Functions
pango_win32_get_context ()
pango_win32_get_context
PangoContext *
pango_win32_get_context (void);
pango_win32_get_context has been deprecated since version 1.22 and should not be used in newly-written code. Use pango_win32_font_map_for_display() followed by
pango_font_map_create_context() instead.
Retrieves a PangoContext appropriate for rendering with Windows fonts.
Returns
the new PangoContext
pango_win32_render ()
pango_win32_render
void
pango_win32_render (HDC hdc,
PangoFont *font,
PangoGlyphString *glyphs,
gint x,
gint y);
Render a PangoGlyphString onto a Windows DC
Parameters
hdc
the device context
font
the font in which to draw the string
glyphs
the glyph string to draw
x
the x position of start of string (in pixels)
y
the y position of baseline (in pixels)
pango_win32_render_transformed ()
pango_win32_render_transformed
void
pango_win32_render_transformed (HDC hdc,
const PangoMatrix *matrix,
PangoFont *font,
PangoGlyphString *glyphs,
int x,
int y);
Renders a PangoGlyphString onto a windows DC, possibly
transforming the layed-out coordinates through a transformation
matrix. Note that the transformation matrix for font
is not
changed, so to produce correct rendering results, the font
must have been loaded using a PangoContext with an identical
transformation matrix to that passed in to this function.
Parameters
hdc
a windows device context
matrix
a PangoMatrix, or NULL to use an identity
transformation.
[nullable]
font
the font in which to draw the string
glyphs
the glyph string to draw
x
the x position of the start of the string (in Pango
units in user space coordinates)
y
the y position of the baseline (in Pango units
in user space coordinates)
pango_win32_render_layout_line ()
pango_win32_render_layout_line
void
pango_win32_render_layout_line (HDC hdc,
PangoLayoutLine *line,
int x,
int y);
Render a PangoLayoutLine onto a device context. For underlining to
work property the text alignment of the DC should have TA_BASELINE
and TA_LEFT.
Parameters
hdc
DC to use for drawing
line
a PangoLayoutLine
x
the x position of start of string (in pixels)
y
the y position of baseline (in pixels)
pango_win32_render_layout ()
pango_win32_render_layout
void
pango_win32_render_layout (HDC hdc,
PangoLayout *layout,
int x,
int y);
Render a PangoLayoutLine onto an X drawable
Parameters
hdc
HDC to use for drawing
layout
a PangoLayout
x
the X position of the left of the layout (in pixels)
y
the Y position of the top of the layout (in pixels)
pango_win32_get_unknown_glyph ()
pango_win32_get_unknown_glyph
PangoGlyph
pango_win32_get_unknown_glyph (PangoFont *font,
gunichar wc);
pango_win32_get_unknown_glyph is deprecated and should not be used in newly-written code.
Returns the index of a glyph suitable for drawing wc
as an
unknown character.
Use PANGO_GET_UNKNOWN_GLYPH() instead.
Parameters
font
a PangoFont
wc
the Unicode character for which a glyph is needed.
Returns
a glyph index into font
pango_win32_font_get_glyph_index ()
pango_win32_font_get_glyph_index
gint
pango_win32_font_get_glyph_index (PangoFont *font,
gunichar wc);
pango_win32_font_get_glyph_index is deprecated and should not be used in newly-written code.
Obtains the index of the glyph for wc
in font
, or 0, if not
covered.
Parameters
font
a PangoFont.
wc
a Unicode character.
Returns
the glyph index for wc
.
pango_win32_font_select_font ()
pango_win32_font_select_font
gboolean
pango_win32_font_select_font (PangoFont *font,
HDC hdc);
pango_win32_font_select_font is deprecated and should not be used in newly-written code.
Selects the font into the specified DC and changes the mapping mode
and world transformation of the DC appropriately for the font.
You may want to surround the use of this function with calls
to SaveDC() and RestoreDC(). Call pango_win32_font_done_font() when
you are done using the DC to release allocated resources.
See pango_win32_font_get_metrics_factor() for information about
converting from the coordinate space used by this function
into Pango units.
Parameters
font
a PangoFont from the Win32 backend
hdc
a windows device context
Returns
TRUE if the operation succeeded.
pango_win32_font_done_font ()
pango_win32_font_done_font
void
pango_win32_font_done_font (PangoFont *font);
pango_win32_font_done_font is deprecated and should not be used in newly-written code.
Releases any resources allocated by pango_win32_font_done_font()
Parameters
font
a PangoFont from the win32 backend
pango_win32_font_get_metrics_factor ()
pango_win32_font_get_metrics_factor
double
pango_win32_font_get_metrics_factor (PangoFont *font);
pango_win32_font_get_metrics_factor is deprecated and should not be used in newly-written code.
Returns the scale factor from logical units in the coordinate
space used by pango_win32_font_select_font() to Pango units
in user space.
Parameters
font
a PangoFont from the win32 backend
Returns
factor to multiply logical units by to get Pango
units.
pango_win32_get_debug_flag ()
pango_win32_get_debug_flagpango_win32_get_debug_flag
gboolean
pango_win32_get_debug_flag (void);
pango_win32_get_debug_flag is deprecated and should not be used in newly-written code.
Returns whether debugging is turned on.
Returns
TRUE if debugging is turned on.
Since: 1.2
pango_win32_get_dc ()
pango_win32_get_dc
HDC
pango_win32_get_dc (void);
pango_win32_get_dc is deprecated and should not be used in newly-written code.
Obtains a handle to the Windows device context that is used by Pango.
Returns
A handle to the Windows device context that is used by Pango.
pango_win32_font_cache_new ()
pango_win32_font_cache_new
PangoWin32FontCache *
pango_win32_font_cache_new (void);
Creates a font cache.
Returns
The new font cache. This must be freed with
pango_win32_font_cache_free().
pango_win32_font_cache_free ()
pango_win32_font_cache_free
void
pango_win32_font_cache_free (PangoWin32FontCache *cache);
Frees a PangoWin32FontCache and all associated memory. All fonts loaded
through this font cache will be freed along with the cache.
Parameters
cache
a PangoWin32FontCache
pango_win32_font_cache_load ()
pango_win32_font_cache_load
HFONT
pango_win32_font_cache_load (PangoWin32FontCache *cache,
const LOGFONTA *logfont);
Creates a HFONT from a LOGFONTA. The
result may be newly loaded, or it may have been previously
stored
Parameters
cache
a PangoWin32FontCache
logfont
a pointer to a LOGFONTA structure describing the font to load.
Returns
The font structure, or NULL if the font
could not be loaded. In order to free this structure, you must call
pango_win32_font_cache_unload().
[nullable]
pango_win32_font_cache_loadw ()
pango_win32_font_cache_loadw
HFONT
pango_win32_font_cache_loadw (PangoWin32FontCache *cache,
const LOGFONTW *logfont);
Creates a HFONT from a LOGFONTW. The
result may be newly loaded, or it may have been previously
stored
Parameters
cache
a PangoWin32FontCache
logfont
a pointer to a LOGFONTW structure describing the font to load.
Returns
The font structure, or NULL if the font
could not be loaded. In order to free this structure, you must call
pango_win32_font_cache_unload().
[nullable]
Since: 1.16
pango_win32_font_cache_unload ()
pango_win32_font_cache_unload
void
pango_win32_font_cache_unload (PangoWin32FontCache *cache,
HFONT hfont);
Frees a font structure previously loaded with pango_win32_font_cache_load().
Parameters
cache
a PangoWin32FontCache
hfont
the HFONT to unload
pango_win32_font_map_for_display ()
pango_win32_font_map_for_display
PangoFontMap *
pango_win32_font_map_for_display (void);
Returns a PangoWin32FontMap. Font maps are cached and should
not be freed. If the font map is no longer needed, it can
be released with pango_win32_shutdown_display().
Returns
a PangoFontMap.
pango_win32_shutdown_display ()
pango_win32_shutdown_display
void
pango_win32_shutdown_display (void);
Free cached resources.
pango_win32_font_map_get_font_cache ()
pango_win32_font_map_get_font_cache
PangoWin32FontCache *
pango_win32_font_map_get_font_cache (PangoFontMap *font_map);
Obtains the font cache associated with the given font map.
Parameters
font_map
a PangoWin32FontMap.
Returns
the PangoWin32FontCache of font_map
.
pango_win32_font_logfont ()
pango_win32_font_logfont
LOGFONTA *
pango_win32_font_logfont (PangoFont *font);
Determine the LOGFONTA struct for the specified font. Note that
Pango internally uses LOGFONTW structs, so if converting the UTF-16
face name in the LOGFONTW struct to system codepage fails, the
returned LOGFONTA will have an emppty face name. To get the
LOGFONTW of a PangoFont, use pango_win32_font_logfontw(). It
is recommended to do that always even if you don't expect
to come across fonts with odd names.
Parameters
font
a PangoFont which must be from the Win32 backend
Returns
A newly allocated LOGFONTA struct. It must be
freed with g_free().
pango_win32_font_logfontw ()
pango_win32_font_logfontw
LOGFONTW *
pango_win32_font_logfontw (PangoFont *font);
Determine the LOGFONTW struct for the specified font.
Parameters
font
a PangoFont which must be from the Win32 backend
Returns
A newly allocated LOGFONTW struct. It must be
freed with g_free().
Since: 1.16
pango_win32_font_description_from_logfont ()
pango_win32_font_description_from_logfont
PangoFontDescription *
pango_win32_font_description_from_logfont
(const LOGFONTA *lfp);
Creates a PangoFontDescription that matches the specified LOGFONTA.
The face name, italicness and weight fields in the LOGFONTA are used
to set up the resulting PangoFontDescription. If the face name in
the LOGFONTA contains non-ASCII characters the font is temporarily
loaded (using CreateFontIndirect()) and an ASCII (usually English)
name for it is looked up from the font name tables in the font
data. If that doesn't work, the face name is converted from the
system codepage to UTF-8 and that is used.
Parameters
lfp
a LOGFONTA
Returns
the newly allocated PangoFontDescription, which
should be freed using pango_font_description_free()
Since: 1.12
pango_win32_font_description_from_logfontw ()
pango_win32_font_description_from_logfontw
PangoFontDescription *
pango_win32_font_description_from_logfontw
(const LOGFONTW *lfp);
Creates a PangoFontDescription that matches the specified LOGFONTW.
The face name, italicness and weight fields in the LOGFONTW are used
to set up the resulting PangoFontDescription. If the face name in
the LOGFONTW contains non-ASCII characters the font is temporarily
loaded (using CreateFontIndirect()) and an ASCII (usually English)
name for it is looked up from the font name tables in the font
data. If that doesn't work, the face name is converted from UTF-16
to UTF-8 and that is used.
Parameters
lfp
a LOGFONTW
Returns
the newly allocated PangoFontDescription, which
should be freed using pango_font_description_free()
Since: 1.16
Types and Values
PangoWin32FontCache
PangoWin32FontCache
typedef struct _PangoWin32FontCache PangoWin32FontCache;
A PangoWin32FontCache caches HFONTs by their LOGFONT descriptions.
docs/xml/freetype-fonts.xml 0000664 0001750 0001750 00000140564 13751777747 016175 0 ustar mclasen mclasen
]>
FreeType Fonts and Rendering
3
PANGO Library
FreeType Fonts and Rendering
Font handling and rendering with FreeType
Functions
PangoFontMap *
pango_ft2_font_map_new ()
void
pango_ft2_font_map_set_resolution ()
PangoContext *
pango_ft2_font_map_create_context ()
void
(*PangoFT2SubstituteFunc) ()
void
pango_ft2_font_map_set_default_substitute ()
void
pango_ft2_font_map_substitute_changed ()
PangoContext *
pango_ft2_get_context ()
void
pango_ft2_render ()
void
pango_ft2_render_transformed ()
void
pango_ft2_render_layout_line ()
void
pango_ft2_render_layout_line_subpixel ()
void
pango_ft2_render_layout ()
void
pango_ft2_render_layout_subpixel ()
PangoGlyph
pango_ft2_get_unknown_glyph ()
int
pango_ft2_font_get_kerning ()
FT_Face
pango_ft2_font_get_face ()
PangoCoverage *
pango_ft2_font_get_coverage ()
PangoFontMap *
pango_ft2_font_map_for_display ()
void
pango_ft2_shutdown_display ()
Types and Values
PangoFT2FontMap
Object Hierarchy
GObject
╰── PangoFontMap
╰── PangoFcFontMap
╰── PangoFT2FontMap
Implemented Interfaces
PangoFT2FontMap implements
GListModel.
Description
The macros and functions in this section are used to access fonts and render
text to bitmaps using the FreeType 2 library.
Functions
pango_ft2_font_map_new ()
pango_ft2_font_map_new
PangoFontMap *
pango_ft2_font_map_new (void);
Create a new PangoFT2FontMap object; a fontmap is used
to cache information about available fonts, and holds
certain global parameters such as the resolution and
the default substitute function (see
pango_ft2_font_map_set_default_substitute()).
Returns
the newly created fontmap object. Unref
with g_object_unref() when you are finished with it.
Since: 1.2
pango_ft2_font_map_set_resolution ()
pango_ft2_font_map_set_resolution
void
pango_ft2_font_map_set_resolution (PangoFT2FontMap *fontmap,
double dpi_x,
double dpi_y);
Sets the horizontal and vertical resolutions for the fontmap.
Parameters
fontmap
a PangoFT2FontMap
dpi_x
dots per inch in the X direction
dpi_y
dots per inch in the Y direction
Since: 1.2
pango_ft2_font_map_create_context ()
pango_ft2_font_map_create_contextpango_ft2_font_map_create_context
PangoContext *
pango_ft2_font_map_create_context (PangoFT2FontMap *fontmap);
pango_ft2_font_map_create_context has been deprecated since version 1.22 and should not be used in newly-written code. Use pango_font_map_create_context() instead.
Create a PangoContext for the given fontmap.
[skip]
Parameters
fontmap
a PangoFT2FontMap
Returns
the newly created context; free with
g_object_unref().
[transfer full]
Since: 1.2
PangoFT2SubstituteFunc ()
PangoFT2SubstituteFunc
void
(*PangoFT2SubstituteFunc) (FcPattern *pattern,
gpointer data);
Function type for doing final config tweaking on prepared FcPatterns.
Parameters
pattern
the FcPattern to tweak.
data
user data.
pango_ft2_font_map_set_default_substitute ()
pango_ft2_font_map_set_default_substitutepango_ft2_font_map_set_default_substitute
void
pango_ft2_font_map_set_default_substitute
(PangoFT2FontMap *fontmap,
PangoFT2SubstituteFunc func,
gpointer data,
GDestroyNotify notify);
pango_ft2_font_map_set_default_substitute has been deprecated since version 1.46 and should not be used in newly-written code. Use pango_fc_font_map_set_default_substitute()
instead.
Sets a function that will be called to do final configuration
substitution on a FcPattern before it is used to load
the font. This function can be used to do things like set
hinting and antialiasing options.
Parameters
fontmap
a PangoFT2FontMap
func
function to call to to do final config tweaking
on FcPattern objects.
data
data to pass to func
notify
function to call when data
is no longer used.
Since: 1.2
pango_ft2_font_map_substitute_changed ()
pango_ft2_font_map_substitute_changedpango_ft2_font_map_substitute_changed
void
pango_ft2_font_map_substitute_changed (PangoFT2FontMap *fontmap);
pango_ft2_font_map_substitute_changed has been deprecated since version 1.46 and should not be used in newly-written code. Use pango_fc_font_map_substitute_changed()
instead.
Call this function any time the results of the
default substitution function set with
pango_ft2_font_map_set_default_substitute() change.
That is, if your substitution function will return different
results for the same input pattern, you must call this function.
Parameters
fontmap
a PangoFT2FontMap
Since: 1.2
pango_ft2_get_context ()
pango_ft2_get_context
PangoContext *
pango_ft2_get_context (double dpi_x,
double dpi_y);
pango_ft2_get_context has been deprecated since version 1.22 and should not be used in newly-written code. Use pango_font_map_create_context() instead.
Retrieves a PangoContext for the default PangoFT2 fontmap
(see pango_ft2_font_map_for_display()) and sets the resolution
for the default fontmap to dpi_x
by dpi_y
.
[skip]
Parameters
dpi_x
the horizontal DPI of the target device
dpi_y
the vertical DPI of the target device
Returns
the new PangoContext.
[transfer full]
pango_ft2_render ()
pango_ft2_render
void
pango_ft2_render (FT_Bitmap *bitmap,
PangoFont *font,
PangoGlyphString *glyphs,
gint x,
gint y);
Renders a PangoGlyphString onto a FreeType2 bitmap.
Parameters
bitmap
the FreeType2 bitmap onto which to draw the string
font
the font in which to draw the string
glyphs
the glyph string to draw
x
the x position of the start of the string (in pixels)
y
the y position of the baseline (in pixels)
pango_ft2_render_transformed ()
pango_ft2_render_transformed
void
pango_ft2_render_transformed (FT_Bitmap *bitmap,
const PangoMatrix *matrix,
PangoFont *font,
PangoGlyphString *glyphs,
int x,
int y);
Renders a PangoGlyphString onto a FreeType2 bitmap, possibly
transforming the layed-out coordinates through a transformation
matrix. Note that the transformation matrix for font
is not
changed, so to produce correct rendering results, the font
must have been loaded using a PangoContext with an identical
transformation matrix to that passed in to this function.
Parameters
bitmap
the FreeType2 bitmap onto which to draw the string
font
the font in which to draw the string
matrix
a PangoMatrix, or NULL to use an identity
transformation.
[nullable]
glyphs
the glyph string to draw
x
the x position of the start of the string (in Pango
units in user space coordinates)
y
the y position of the baseline (in Pango units
in user space coordinates)
Since: 1.6
pango_ft2_render_layout_line ()
pango_ft2_render_layout_line
void
pango_ft2_render_layout_line (FT_Bitmap *bitmap,
PangoLayoutLine *line,
int x,
int y);
Render a PangoLayoutLine onto a FreeType2 bitmap
Parameters
bitmap
a FT_Bitmap to render the line onto
line
a PangoLayoutLine
x
the x position of start of string (in pixels)
y
the y position of baseline (in pixels)
pango_ft2_render_layout_line_subpixel ()
pango_ft2_render_layout_line_subpixel
void
pango_ft2_render_layout_line_subpixel (FT_Bitmap *bitmap,
PangoLayoutLine *line,
int x,
int y);
Render a PangoLayoutLine onto a FreeType2 bitmap, with he
location specified in fixed-point Pango units rather than
pixels. (Using this will avoid extra inaccuracies from
rounding to integer pixels multiple times, even if the
final glyph positions are integers.)
Parameters
bitmap
a FT_Bitmap to render the line onto
line
a PangoLayoutLine
x
the x position of start of string (in Pango units)
y
the y position of baseline (in Pango units)
Since: 1.6
pango_ft2_render_layout ()
pango_ft2_render_layout
void
pango_ft2_render_layout (FT_Bitmap *bitmap,
PangoLayout *layout,
int x,
int y);
Render a PangoLayout onto a FreeType2 bitmap
Parameters
bitmap
a FT_Bitmap to render the layout onto
layout
a PangoLayout
x
the X position of the left of the layout (in pixels)
y
the Y position of the top of the layout (in pixels)
pango_ft2_render_layout_subpixel ()
pango_ft2_render_layout_subpixel
void
pango_ft2_render_layout_subpixel (FT_Bitmap *bitmap,
PangoLayout *layout,
int x,
int y);
Render a PangoLayout onto a FreeType2 bitmap, with he
location specified in fixed-point Pango units rather than
pixels. (Using this will avoid extra inaccuracies from
rounding to integer pixels multiple times, even if the
final glyph positions are integers.)
Parameters
bitmap
a FT_Bitmap to render the layout onto
layout
a PangoLayout
x
the X position of the left of the layout (in Pango units)
y
the Y position of the top of the layout (in Pango units)
Since: 1.6
pango_ft2_get_unknown_glyph ()
pango_ft2_get_unknown_glyph
PangoGlyph
pango_ft2_get_unknown_glyph (PangoFont *font);
pango_ft2_get_unknown_glyph is deprecated and should not be used in newly-written code.
Return the index of a glyph suitable for drawing unknown characters with
font
, or PANGO_GLYPH_EMPTY if no suitable glyph found.
If you want to draw an unknown-box for a character that is not covered
by the font,
use PANGO_GET_UNKNOWN_GLYPH() instead.
Parameters
font
a PangoFont
Returns
a glyph index into font
, or PANGO_GLYPH_EMPTY
pango_ft2_font_get_kerning ()
pango_ft2_font_get_kerning
int
pango_ft2_font_get_kerning (PangoFont *font,
PangoGlyph left,
PangoGlyph right);
pango_ft2_font_get_kerning is deprecated and should not be used in newly-written code.
Retrieves kerning information for a combination of two glyphs.
Use pango_fc_font_kern_glyphs() instead.
Parameters
font
a PangoFont
left
the left PangoGlyph
right
the right PangoGlyph
Returns
The amount of kerning (in Pango units) to apply for
the given combination of glyphs.
pango_ft2_font_get_face ()
pango_ft2_font_get_face
FT_Face
pango_ft2_font_get_face (PangoFont *font);
pango_ft2_font_get_face is deprecated and should not be used in newly-written code.
Returns the native FreeType2 FT_Face structure used for this PangoFont.
This may be useful if you want to use FreeType2 functions directly.
Use pango_fc_font_lock_face() instead; when you are done with a
face from pango_fc_font_lock_face() you must call
pango_fc_font_unlock_face().
[skip]
Parameters
font
a PangoFont
Returns
a pointer to a FT_Face structure, with the
size set correctly, or NULL if font
is NULL.
[nullable]
pango_ft2_font_get_coverage ()
pango_ft2_font_get_coverage
PangoCoverage *
pango_ft2_font_get_coverage (PangoFont *font,
PangoLanguage *language);
pango_ft2_font_get_coverage is deprecated and should not be used in newly-written code.
Gets the PangoCoverage for a PangoFT2Font. Use
pango_font_get_coverage() instead.
Parameters
font
a Pango FT2 font
language
a language tag.
Returns
a PangoCoverage.
[transfer full]
pango_ft2_font_map_for_display ()
pango_ft2_font_map_for_display
PangoFontMap *
pango_ft2_font_map_for_display (void);
pango_ft2_font_map_for_display is deprecated and should not be used in newly-written code.
Returns a PangoFT2FontMap. This font map is cached and should
not be freed. If the font map is no longer needed, it can
be released with pango_ft2_shutdown_display(). Use of the
global PangoFT2 fontmap is deprecated; use pango_ft2_font_map_new()
instead.
[skip]
Returns
a PangoFT2FontMap.
[transfer none]
pango_ft2_shutdown_display ()
pango_ft2_shutdown_display
void
pango_ft2_shutdown_display (void);
pango_ft2_shutdown_display is deprecated and should not be used in newly-written code.
Free the global fontmap. (See pango_ft2_font_map_for_display())
Use of the global PangoFT2 fontmap is deprecated.
Types and Values
PangoFT2FontMap
PangoFT2FontMap
typedef struct _PangoFT2FontMap PangoFT2FontMap;
The PangoFT2FontMap is the PangoFontMap implementation for FreeType fonts.
docs/xml/xft-fonts.xml 0000664 0001750 0001750 00000177656 13751777750 015161 0 ustar mclasen mclasen
]>
Xft Fonts and Rendering
3
PANGO Library
Xft Fonts and Rendering
Font handling and rendering with the Xft backend
Functions
PangoContext *
pango_xft_get_context ()
PangoFontMap *
pango_xft_get_font_map ()
void
pango_xft_set_default_substitute ()
void
(*PangoXftSubstituteFunc) ()
void
pango_xft_substitute_changed ()
void
pango_xft_shutdown_display ()
XftFont *
pango_xft_font_get_font ()
Display *
pango_xft_font_get_display ()
gboolean
pango_xft_font_has_char ()
FT_Face
pango_xft_font_lock_face ()
void
pango_xft_font_unlock_face ()
guint
pango_xft_font_get_glyph ()
PangoGlyph
pango_xft_font_get_unknown_glyph ()
PangoRenderer *
pango_xft_renderer_new ()
void
pango_xft_renderer_set_draw ()
void
pango_xft_renderer_set_default_color ()
void
pango_xft_render ()
void
pango_xft_picture_render ()
void
pango_xft_render_transformed ()
void
pango_xft_render_layout_line ()
void
pango_xft_render_layout ()
Properties
gpointerdisplayWrite / Construct Only
intscreenWrite / Construct Only
Types and Values
PangoXftFont
PangoXftFontMap
structPangoXftRenderer
structPangoXftRendererClass
Object Hierarchy
GObject
├── PangoFont
│ ╰── PangoFcFont
│ ╰── PangoXftFont
├── PangoFontMap
│ ╰── PangoFcFontMap
│ ╰── PangoXftFontMap
╰── PangoRenderer
╰── PangoXftRenderer
Implemented Interfaces
PangoXftFontMap implements
GListModel.
Description
The Xft library is a library for displaying fonts on the X window
system; internally it uses the fontconfig library to locate font
files, and the FreeType library to load and render fonts. The
Xft backend is the recommended Pango font backend for screen
display with X. (The Cairo back end is another possibility.)
Using the Xft backend is generally straightforward;
pango_xft_get_context() creates a context for a specified display
and screen. You can then create a PangoLayout with that context
and render it with pango_xft_render_layout(). At a more advanced
level, the low-level fontconfig options used for rendering fonts
can be affected using pango_xft_set_default_substitute(), and
pango_xft_substitute_changed().
A range of functions for drawing pieces of a layout, such as
individual layout lines and glyphs strings are provided. You can also
directly create a PangoXftRenderer. Finally, in some advanced cases, it
is useful to derive from PangoXftRenderer. Deriving from
PangoXftRenderer is useful for two reasons. One reason is be to
support custom attributes by overriding PangoRendererClass virtual
functions like 'prepare_run' or 'draw_shape'. The reason is to
customize exactly how the final bits are drawn to the destination by
overriding the PangoXftRendererClass virtual functions
'composite_glyphs' and 'composite_trapezoids'.
Functions
pango_xft_get_context ()
pango_xft_get_context
PangoContext *
pango_xft_get_context (Display *display,
int screen);
pango_xft_get_context has been deprecated since version 1.22 and should not be used in newly-written code. Use pango_xft_get_font_map() followed by
pango_font_map_create_context() instead.
Retrieves a PangoContext appropriate for rendering with
Xft fonts on the given screen of the given display.
[skip]
Parameters
display
an X display.
screen
an X screen.
Returns
the new PangoContext.
pango_xft_get_font_map ()
pango_xft_get_font_map
PangoFontMap *
pango_xft_get_font_map (Display *display,
int screen);
Returns the PangoXftFontMap for the given display and screen.
The fontmap is owned by Pango and will be valid until
the display is closed.
Parameters
display
an X display
screen
the screen number of a screen within display
Returns
a PangoFontMap object, owned by Pango.
[transfer none]
Since: 1.2
pango_xft_set_default_substitute ()
pango_xft_set_default_substitutepango_xft_set_default_substitute
void
pango_xft_set_default_substitute (Display *display,
int screen,
PangoXftSubstituteFunc func,
gpointer data,
GDestroyNotify notify);
pango_xft_set_default_substitute has been deprecated since version 1.46 and should not be used in newly-written code. Use pango_fc_font_map_set_default_substitute()
instead.
Sets a function that will be called to do final configuration
substitution on a FcPattern before it is used to load
the font. This function can be used to do things like set
hinting and antialiasing options.
Parameters
display
an X Display
screen
the screen number of a screen within display
func
function to call to to do final config tweaking
on FcPattern objects.
data
data to pass to func
notify
function to call when data
is no longer used.
Since: 1.2
PangoXftSubstituteFunc ()
PangoXftSubstituteFunc
void
(*PangoXftSubstituteFunc) (FcPattern *pattern,
gpointer data);
Function type for doing final config tweaking on prepared FcPatterns.
Parameters
pattern
the FcPattern to tweak.
data
user data.
pango_xft_substitute_changed ()
pango_xft_substitute_changedpango_xft_substitute_changed
void
pango_xft_substitute_changed (Display *display,
int screen);
pango_xft_substitute_changed has been deprecated since version 1.46 and should not be used in newly-written code. Use pango_fc_font_map_substitute_changed()
instead.
Call this function any time the results of the
default substitution function set with
pango_xft_set_default_substitute() change.
That is, if your substitution function will return different
results for the same input pattern, you must call this function.
Parameters
display
an X Display
screen
the screen number of a screen within display
Since: 1.2
pango_xft_shutdown_display ()
pango_xft_shutdown_display
void
pango_xft_shutdown_display (Display *display,
int screen);
Release any resources that have been cached for the
combination of display
and screen
. Note that when the
X display is closed, resources are released automatically,
without needing to call this function.
Parameters
display
an X display
screen
the screen number of a screen within display
Since: 1.2
pango_xft_font_get_font ()
pango_xft_font_get_font
XftFont *
pango_xft_font_get_font (PangoFont *font);
pango_xft_font_get_font is deprecated and should not be used in newly-written code.
Returns the XftFont of a font.
[skip]
Parameters
font
a PangoFont.
[nullable]
Returns
the XftFont associated to font
,
or NULL if font
is NULL.
[nullable]
pango_xft_font_get_display ()
pango_xft_font_get_display
Display *
pango_xft_font_get_display (PangoFont *font);
pango_xft_font_get_display is deprecated and should not be used in newly-written code.
Returns the X display of the XftFont of a font.
[skip]
Parameters
font
a PangoFont.
[type PangoXftFont]
Returns
the X display of the XftFont associated to font
.
[transfer none]
pango_xft_font_has_char ()
pango_xft_font_has_charpango_xft_font_has_char
gboolean
pango_xft_font_has_char (PangoFont *font,
gunichar wc);
pango_xft_font_has_char is deprecated and should not be used in newly-written code.
Determines whether font
has a glyph for the codepoint wc
.
Use pango_fc_font_has_char() instead.
Parameters
font
a PangoFont for the Xft backend.
[type PangoXftFont]
wc
Unicode codepoint to look up
Returns
TRUE if font
has the requested codepoint.
Since: 1.2
pango_xft_font_lock_face ()
pango_xft_font_lock_facepango_xft_font_lock_face
FT_Face
pango_xft_font_lock_face (PangoFont *font);
pango_xft_font_lock_face is deprecated and should not be used in newly-written code.
Gets the FreeType FT_Face associated with a font.
This face will be kept around until you call pango_xft_font_unlock_face().
Use pango_fc_font_lock_face() instead.
[skip]
Parameters
font
a PangoFont.
[type PangoXftFont]
Returns
the FreeType FT_Face associated with font
.
Since: 1.2
pango_xft_font_unlock_face ()
pango_xft_font_unlock_facepango_xft_font_unlock_face
void
pango_xft_font_unlock_face (PangoFont *font);
pango_xft_font_unlock_face is deprecated and should not be used in newly-written code.
Releases a font previously obtained with
pango_xft_font_lock_face().
Use pango_fc_font_unlock_face() instead.
[skip]
Parameters
font
a PangoFont.
[type PangoXftFont]
Since: 1.2
pango_xft_font_get_glyph ()
pango_xft_font_get_glyphpango_xft_font_get_glyph
guint
pango_xft_font_get_glyph (PangoFont *font,
gunichar wc);
pango_xft_font_get_glyph is deprecated and should not be used in newly-written code.
Gets the glyph index for a given Unicode character
for font
. If you only want to determine
whether the font has the glyph, use pango_xft_font_has_char().
Use pango_fc_font_get_glyph() instead.
Parameters
font
a PangoFont for the Xft backend.
[type PangoXftFont]
wc
Unicode codepoint to look up
Returns
the glyph index, or 0, if the Unicode
character does not exist in the font.
Since: 1.2
pango_xft_font_get_unknown_glyph ()
pango_xft_font_get_unknown_glyph
PangoGlyph
pango_xft_font_get_unknown_glyph (PangoFont *font,
gunichar wc);
pango_xft_font_get_unknown_glyph is deprecated and should not be used in newly-written code.
Returns the index of a glyph suitable for drawing wc
as an
unknown character.
Use PANGO_GET_UNKNOWN_GLYPH() instead.
Parameters
font
a PangoFont.
[type PangoXftFont]
wc
the Unicode character for which a glyph is needed.
Returns
a glyph index into font
.
pango_xft_renderer_new ()
pango_xft_renderer_new
PangoRenderer *
pango_xft_renderer_new (Display *display,
int screen);
Create a new PangoXftRenderer to allow rendering Pango objects
with the Xft library. You must call pango_xft_renderer_set_draw() before
using the renderer.
Parameters
display
an X display
screen
the index of the screen for display
to which rendering will be done
Returns
the newly created PangoXftRenderer, which should
be freed with g_object_unref().
Since: 1.8
pango_xft_renderer_set_draw ()
pango_xft_renderer_set_draw
void
pango_xft_renderer_set_draw (PangoXftRenderer *xftrenderer,
XftDraw *draw);
Sets the XftDraw object that the renderer is drawing to.
The renderer must not be currently active.
Parameters
xftrenderer
a PangoXftRenderer
draw
a XftDraw
Since: 1.8
pango_xft_renderer_set_default_color ()
pango_xft_renderer_set_default_color
void
pango_xft_renderer_set_default_color (PangoXftRenderer *xftrenderer,
PangoColor *default_color);
Sets the default foreground color for a XftRenderer.
Parameters
xftrenderer
a XftRenderer
default_color
the default foreground color
Since: 1.8
pango_xft_render ()
pango_xft_render
void
pango_xft_render (XftDraw *draw,
XftColor *color,
PangoFont *font,
PangoGlyphString *glyphs,
gint x,
gint y);
Renders a PangoGlyphString onto an XftDraw object wrapping an X drawable.
Parameters
draw
the XftDraw object.
color
the color in which to draw the string
font
the font in which to draw the string
glyphs
the glyph string to draw
x
the x position of start of string (in pixels)
y
the y position of baseline (in pixels)
pango_xft_picture_render ()
pango_xft_picture_render
void
pango_xft_picture_render (Display *display,
Picture src_picture,
Picture dest_picture,
PangoFont *font,
PangoGlyphString *glyphs,
gint x,
gint y);
Renders a PangoGlyphString onto an Xrender Picture object.
Parameters
display
an X display
src_picture
the source picture to draw the string with
dest_picture
the destination picture to draw the string onto
font
the font in which to draw the string
glyphs
the glyph string to draw
x
the x position of start of string (in pixels)
y
the y position of baseline (in pixels)
pango_xft_render_transformed ()
pango_xft_render_transformed
void
pango_xft_render_transformed (XftDraw *draw,
XftColor *color,
PangoMatrix *matrix,
PangoFont *font,
PangoGlyphString *glyphs,
int x,
int y);
Renders a PangoGlyphString onto a XftDraw, possibly
transforming the layed-out coordinates through a transformation
matrix. Note that the transformation matrix for font
is not
changed, so to produce correct rendering results, the font
must have been loaded using a PangoContext with an identical
transformation matrix to that passed in to this function.
Parameters
draw
an XftDraw
color
the color in which to draw the glyphs
font
the font in which to draw the string
matrix
a PangoMatrix, or NULL to use an identity
transformation.
[nullable]
glyphs
the glyph string to draw
x
the x position of the start of the string (in Pango
units in user space coordinates)
y
the y position of the baseline (in Pango units
in user space coordinates)
Since: 1.8
pango_xft_render_layout_line ()
pango_xft_render_layout_line
void
pango_xft_render_layout_line (XftDraw *draw,
XftColor *color,
PangoLayoutLine *line,
int x,
int y);
Render a PangoLayoutLine onto a XftDraw
Parameters
draw
an XftDraw
color
the foreground color in which to draw the layout line
(may be overridden by color attributes)
line
a PangoLayoutLine
x
the x position of start of string (in Pango units)
y
the y position of baseline (in Pango units)
Since: 1.8
pango_xft_render_layout ()
pango_xft_render_layout
void
pango_xft_render_layout (XftDraw *draw,
XftColor *color,
PangoLayout *layout,
int x,
int y);
Render a PangoLayout onto a XftDraw
Parameters
draw
an XftDraw
color
the foreground color in which to draw the layout
(may be overridden by color attributes)
layout
a PangoLayout
x
the X position of the left of the layout (in Pango units)
y
the Y position of the top of the layout (in Pango units)
Since: 1.8
Types and Values
PangoXftFont
PangoXftFont
typedef struct _PangoXftFont PangoXftFont;
PangoXftFont is an implementation of PangoFcFont using the Xft
library for rendering. It is used in conjunction with PangoXftFontMap.
PangoXftFontMap
PangoXftFontMap
typedef struct _PangoXftFontMap PangoXftFontMap;
PangoXftFontMap is an implementation of PangoFcFontMap suitable for
the Xft library as the renderer. It is used in to create fonts of
type PangoXftFont.
struct PangoXftRenderer
PangoXftRenderer
struct PangoXftRenderer;
PangoXftRenderer is a subclass of PangoRenderer used for rendering
with Pango's Xft backend. It can be used directly, or it can be
further subclassed to modify exactly how drawing of individual
elements occurs.
Since: 1.8
struct PangoXftRendererClass
PangoXftRendererClass
struct PangoXftRendererClass {
void (*composite_trapezoids) (PangoXftRenderer *xftrenderer,
PangoRenderPart part,
XTrapezoid *trapezoids,
int n_trapezoids);
void (*composite_glyphs) (PangoXftRenderer *xftrenderer,
XftFont *xft_font,
XftGlyphSpec *glyphs,
int n_glyphs);
};
The class structure for PangoXftRenderer
Members
composite_trapezoids ()
draw the specified trapezoids using
the current color and other attributes for part
composite_glyphs ()
draw the specified glyphs using
the current foreground color and other foreground
attributes
Since: 1.8
Property Details
The “display†property
PangoXftRenderer:display
“display†gpointer
The display being rendered to.Owner: PangoXftRenderer
Flags: Write / Construct Only
The “screen†property
PangoXftRenderer:screen
“screen†int
The screen being rendered to.Owner: PangoXftRenderer
Flags: Write / Construct Only
Allowed values: >= 0
Default value: 0
docs/xml/pangocairo.xml 0000664 0001750 0001750 00000233435 13751777750 015337 0 ustar mclasen mclasen
]>
Cairo Fonts and Rendering
3
PANGO Library
Cairo Fonts and Rendering
Font handling and rendering with Cairo
Functions
PangoFontMap *
pango_cairo_font_map_get_default ()
void
pango_cairo_font_map_set_default ()
PangoFontMap *
pango_cairo_font_map_new ()
PangoFontMap *
pango_cairo_font_map_new_for_font_type ()
cairo_font_type_t
pango_cairo_font_map_get_font_type ()
void
pango_cairo_font_map_set_resolution ()
double
pango_cairo_font_map_get_resolution ()
PangoContext *
pango_cairo_font_map_create_context ()
cairo_scaled_font_t *
pango_cairo_font_get_scaled_font ()
void
pango_cairo_context_set_resolution ()
double
pango_cairo_context_get_resolution ()
void
pango_cairo_context_set_font_options ()
const cairo_font_options_t *
pango_cairo_context_get_font_options ()
void
(*PangoCairoShapeRendererFunc) ()
void
pango_cairo_context_set_shape_renderer ()
PangoCairoShapeRendererFunc
pango_cairo_context_get_shape_renderer ()
PangoContext *
pango_cairo_create_context ()
void
pango_cairo_update_context ()
PangoLayout *
pango_cairo_create_layout ()
void
pango_cairo_update_layout ()
void
pango_cairo_show_glyph_string ()
void
pango_cairo_show_glyph_item ()
void
pango_cairo_show_layout_line ()
void
pango_cairo_show_layout ()
void
pango_cairo_show_error_underline ()
void
pango_cairo_glyph_string_path ()
void
pango_cairo_layout_line_path ()
void
pango_cairo_layout_path ()
void
pango_cairo_error_underline_path ()
Types and Values
PangoCairoFont
PangoCairoFontMap
Object Hierarchy
GInterface
├── PangoCairoFont
╰── PangoCairoFontMap
Prerequisites
PangoCairoFont requires
PangoFont.
PangoCairoFontMap requires
PangoFontMap.
Description
The Cairo library is a
vector graphics library with a powerful rendering model. It has such
features as anti-aliased primitives, alpha-compositing, and
gradients. Multiple backends for Cairo are available, to allow
rendering to images, to PDF files, and to the screen on X and on other
windowing systems. The functions in this section allow using Pango
to render to Cairo surfaces.
Using Pango with Cairo is straightforward. A PangoContext created
with pango_cairo_font_map_create_context() can be used on any
Cairo context (cairo_t), but needs to be updated to match the
current transformation matrix and target surface of the Cairo context
using pango_cairo_update_context(). The convenience functions
pango_cairo_create_layout() and pango_cairo_update_layout() handle
the common case where the program doesn't need to manipulate the
properties of the PangoContext.
When you get the metrics of a layout or of a piece of a layout using
functions such as pango_layout_get_extents(), the reported metrics
are in user-space coordinates. If a piece of text is 10 units long,
and you call cairo_scale (cr, 2.0), it still is more-or-less 10
units long. However, the results will be affected by hinting
(that is, the process of adjusting the text to look good on the
pixel grid), so you shouldn't assume they are completely independent
of the current transformation matrix. Note that the basic metrics
functions in Pango report results in integer Pango units. To get
to the floating point units used in Cairo divide by PANGO_SCALE.
Using Pango with Cairo
#include
static void
draw_text (cairo_t *cr)
{
#define RADIUS 150
#define N_WORDS 10
#define FONT "Sans Bold 27"
PangoLayout *layout;
PangoFontDescription *desc;
int i;
/* Center coordinates on the middle of the region we are drawing
*/
cairo_translate (cr, RADIUS, RADIUS);
/* Create a PangoLayout, set the font and text */
layout = pango_cairo_create_layout (cr);
pango_layout_set_text (layout, "Text", -1);
desc = pango_font_description_from_string (FONT);
pango_layout_set_font_description (layout, desc);
pango_font_description_free (desc);
/* Draw the layout N_WORDS times in a circle */
for (i = 0; i < N_WORDS; i++)
{
int width, height;
double angle = (360. * i) / N_WORDS;
double red;
cairo_save (cr);
/* Gradient from red at angle == 60 to blue at angle == 240 */
red = (1 + cos ((angle - 60) * G_PI / 180.)) / 2;
cairo_set_source_rgb (cr, red, 0, 1.0 - red);
cairo_rotate (cr, angle * G_PI / 180.);
/* Inform Pango to re-layout the text with the new transformation */
pango_cairo_update_layout (cr, layout);
pango_layout_get_size (layout, &width, &height);
cairo_move_to (cr, - ((double)width / PANGO_SCALE) / 2, - RADIUS);
pango_cairo_show_layout (cr, layout);
cairo_restore (cr);
}
/* free the layout object */
g_object_unref (layout);
}
int main (int argc, char **argv)
{
cairo_t *cr;
char *filename;
cairo_status_t status;
cairo_surface_t *surface;
if (argc != 2)
{
g_printerr ("Usage: cairosimple OUTPUT_FILENAME\n");
return 1;
}
filename = argv[1];
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
2 * RADIUS, 2 * RADIUS);
cr = cairo_create (surface);
cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
cairo_paint (cr);
draw_text (cr);
cairo_destroy (cr);
status = cairo_surface_write_to_png (surface, filename);
cairo_surface_destroy (surface);
if (status != CAIRO_STATUS_SUCCESS)
{
g_printerr ("Could not save png to '%s'\n", filename);
return 1;
}
return 0;
}
]]>
Once you build and run the example code above, you should see the
following result:
Output of rotated-example
Functions
pango_cairo_font_map_get_default ()
pango_cairo_font_map_get_default
PangoFontMap *
pango_cairo_font_map_get_default (void);
Gets a default PangoCairoFontMap to use with Cairo.
Note that the type of the returned object will depend
on the particular font backend Cairo was compiled to use;
You generally should only use the PangoFontMap and
PangoCairoFontMap interfaces on the returned object.
The default Cairo fontmap can be changed by using
pango_cairo_font_map_set_default(). This can be used to
change the Cairo font backend that the default fontmap
uses for example.
Note that since Pango 1.32.6, the default fontmap is per-thread.
Each thread gets its own default fontmap. In this way,
PangoCairo can be used safely from multiple threads.
Returns
the default PangoCairo fontmap
for the current thread. This object is owned by Pango and must not be freed.
[transfer none]
Since: 1.10
pango_cairo_font_map_set_default ()
pango_cairo_font_map_set_default
void
pango_cairo_font_map_set_default (PangoCairoFontMap *fontmap);
Sets a default PangoCairoFontMap to use with Cairo.
This can be used to change the Cairo font backend that the
default fontmap uses for example. The old default font map
is unreffed and the new font map referenced.
Note that since Pango 1.32.6, the default fontmap is per-thread.
This function only changes the default fontmap for
the current thread. Default fontmaps of existing threads
are not changed. Default fontmaps of any new threads will
still be created using pango_cairo_font_map_new().
A value of NULL for fontmap
will cause the current default
font map to be released and a new default font
map to be created on demand, using pango_cairo_font_map_new().
Parameters
fontmap
The new default font map, or NULL.
[nullable]
Since: 1.22
pango_cairo_font_map_new ()
pango_cairo_font_map_new
PangoFontMap *
pango_cairo_font_map_new (void);
Creates a new PangoCairoFontMap object; a fontmap is used
to cache information about available fonts, and holds
certain global parameters such as the resolution.
In most cases, you can use pango_cairo_font_map_get_default()
instead.
Note that the type of the returned object will depend
on the particular font backend Cairo was compiled to use;
You generally should only use the PangoFontMap and
PangoCairoFontMap interfaces on the returned object.
You can override the type of backend returned by using an
environment variable PANGOCAIRO_BACKEND. Supported types,
based on your build, are fc (fontconfig), win32, and coretext.
If requested type is not available, NULL is returned. Ie.
this is only useful for testing, when at least two backends
are compiled in.
Returns
the newly allocated PangoFontMap,
which should be freed with g_object_unref().
[transfer full]
Since: 1.10
pango_cairo_font_map_new_for_font_type ()
pango_cairo_font_map_new_for_font_type
PangoFontMap *
pango_cairo_font_map_new_for_font_type
(cairo_font_type_t fonttype);
Creates a new PangoCairoFontMap object of the type suitable
to be used with cairo font backend of type fonttype
.
In most cases one should simply use pango_cairo_font_map_new()
,
or in fact in most of those cases, just use
pango_cairo_font_map_get_default()
.
Parameters
fonttype
desired cairo_font_type_t
Returns
the newly allocated
PangoFontMap of suitable type which should be freed
with g_object_unref(), or NULL if the requested
cairo font backend is not supported / compiled in.
[transfer full][nullable]
Since: 1.18
pango_cairo_font_map_get_font_type ()
pango_cairo_font_map_get_font_type
cairo_font_type_t
pango_cairo_font_map_get_font_type (PangoCairoFontMap *fontmap);
Gets the type of Cairo font backend that fontmap
uses.
Parameters
fontmap
a PangoCairoFontMap
Returns
the cairo_font_type_t cairo font backend type
Since: 1.18
pango_cairo_font_map_set_resolution ()
pango_cairo_font_map_set_resolution
void
pango_cairo_font_map_set_resolution (PangoCairoFontMap *fontmap,
double dpi);
Sets the resolution for the fontmap. This is a scale factor between
points specified in a PangoFontDescription and Cairo units. The
default value is 96, meaning that a 10 point font will be 13
units high. (10 * 96. / 72. = 13.3).
Parameters
fontmap
a PangoCairoFontMap
dpi
the resolution in "dots per inch". (Physical inches aren't actually
involved; the terminology is conventional.)
Since: 1.10
pango_cairo_font_map_get_resolution ()
pango_cairo_font_map_get_resolution
double
pango_cairo_font_map_get_resolution (PangoCairoFontMap *fontmap);
Gets the resolution for the fontmap. See pango_cairo_font_map_set_resolution()
Parameters
fontmap
a PangoCairoFontMap
Returns
the resolution in "dots per inch"
Since: 1.10
pango_cairo_font_map_create_context ()
pango_cairo_font_map_create_contextpango_cairo_font_map_create_context
PangoContext *
pango_cairo_font_map_create_context (PangoCairoFontMap *fontmap);
pango_cairo_font_map_create_context has been deprecated since version 1.22 and should not be used in newly-written code. Use pango_font_map_create_context() instead.
Create a PangoContext for the given fontmap.
[skip]
Parameters
fontmap
a PangoCairoFontMap
Returns
the newly created context; free with g_object_unref().
Since: 1.10
pango_cairo_font_get_scaled_font ()
pango_cairo_font_get_scaled_font
cairo_scaled_font_t *
pango_cairo_font_get_scaled_font (PangoCairoFont *font);
Gets the cairo_scaled_font_t used by font
.
The scaled font can be referenced and kept using
cairo_scaled_font_reference().
Parameters
font
a PangoFont from a PangoCairoFontMap
Returns
the cairo_scaled_font_t used by font
,
or NULL if font
is NULL.
[transfer none][nullable]
Since: 1.18
pango_cairo_context_set_resolution ()
pango_cairo_context_set_resolution
void
pango_cairo_context_set_resolution (PangoContext *context,
double dpi);
Sets the resolution for the context. This is a scale factor between
points specified in a PangoFontDescription and Cairo units. The
default value is 96, meaning that a 10 point font will be 13
units high. (10 * 96. / 72. = 13.3).
Parameters
context
a PangoContext, from a pangocairo font map
dpi
the resolution in "dots per inch". (Physical inches aren't actually
involved; the terminology is conventional.) A 0 or negative value
means to use the resolution from the font map.
Since: 1.10
pango_cairo_context_get_resolution ()
pango_cairo_context_get_resolution
double
pango_cairo_context_get_resolution (PangoContext *context);
Gets the resolution for the context. See pango_cairo_context_set_resolution()
Parameters
context
a PangoContext, from a pangocairo font map
Returns
the resolution in "dots per inch". A negative value will
be returned if no resolution has previously been set.
Since: 1.10
pango_cairo_context_set_font_options ()
pango_cairo_context_set_font_options
void
pango_cairo_context_set_font_options (PangoContext *context,
const cairo_font_options_t *options);
Sets the font options used when rendering text with this context.
These options override any options that pango_cairo_update_context()
derives from the target surface.
Parameters
context
a PangoContext, from a pangocairo font map
options
a cairo_font_options_t, or NULL to unset
any previously set options. A copy is made.
[nullable]
Since: 1.10
pango_cairo_context_get_font_options ()
pango_cairo_context_get_font_options
const cairo_font_options_t *
pango_cairo_context_get_font_options (PangoContext *context);
Retrieves any font rendering options previously set with
pango_cairo_context_set_font_options(). This function does not report options
that are derived from the target surface by pango_cairo_update_context()
Parameters
context
a PangoContext, from a pangocairo font map
Returns
the font options previously set on the
context, or NULL if no options have been set. This value is
owned by the context and must not be modified or freed.
[nullable]
Since: 1.10
PangoCairoShapeRendererFunc ()
PangoCairoShapeRendererFunc
void
(*PangoCairoShapeRendererFunc) (cairo_t *cr,
PangoAttrShape *attr,
gboolean do_path,
gpointer data);
Function type for rendering attributes of type PANGO_ATTR_SHAPE
with Pango's Cairo renderer.
Parameters
cr
a Cairo context with current point set to where the shape should
be rendered
attr
the PANGO_ATTR_SHAPE to render
do_path
whether only the shape path should be appended to current
path of cr
and no filling/stroking done. This will be set
to TRUE when called from pango_cairo_layout_path() and
pango_cairo_layout_line_path() rendering functions.
data
user data passed to pango_cairo_context_set_shape_renderer().
[closure]
pango_cairo_context_set_shape_renderer ()
pango_cairo_context_set_shape_renderer
void
pango_cairo_context_set_shape_renderer
(PangoContext *context,
PangoCairoShapeRendererFunc func,
gpointer data,
GDestroyNotify dnotify);
Sets callback function for context to use for rendering attributes
of type PANGO_ATTR_SHAPE. See PangoCairoShapeRendererFunc for
details.
Parameters
context
a PangoContext, from a pangocairo font map
func
Callback function for rendering attributes of
type PANGO_ATTR_SHAPE, or NULL to disable shape rendering.
[nullable]
data
User data that will be passed to func
.
dnotify
Callback that will be called when the
context is freed to release data
, or NULL.
Since: 1.18
pango_cairo_context_get_shape_renderer ()
pango_cairo_context_get_shape_renderer
PangoCairoShapeRendererFunc
pango_cairo_context_get_shape_renderer
(PangoContext *context,
gpointer *data);
Sets callback function for context to use for rendering attributes
of type PANGO_ATTR_SHAPE. See PangoCairoShapeRendererFunc for
details.
Retrieves callback function and associated user data for rendering
attributes of type PANGO_ATTR_SHAPE as set by
pango_cairo_context_set_shape_renderer(), if any.
[skip]
Parameters
context
a PangoContext, from a pangocairo font map
data
Pointer to gpointer to return user data
Returns
the shape rendering callback previously
set on the context, or NULL if no shape rendering callback have
been set.
[transfer none][nullable]
Since: 1.18
pango_cairo_create_context ()
pango_cairo_create_context
PangoContext *
pango_cairo_create_context (cairo_t *cr);
Creates a context object set up to match the current transformation
and target surface of the Cairo context. This context can then be
used to create a layout using pango_layout_new().
This function is a convenience function that creates a context using
the default font map, then updates it to cr
. If you just need to
create a layout for use with cr
and do not need to access PangoContext
directly, you can use pango_cairo_create_layout() instead.
Parameters
cr
a Cairo context
Returns
the newly created PangoContext. Free with
g_object_unref().
[transfer full]
Since: 1.22
pango_cairo_update_context ()
pango_cairo_update_context
void
pango_cairo_update_context (cairo_t *cr,
PangoContext *context);
Updates a PangoContext previously created for use with Cairo to
match the current transformation and target surface of a Cairo
context. If any layouts have been created for the context,
it's necessary to call pango_layout_context_changed() on those
layouts.
Parameters
cr
a Cairo context
context
a PangoContext, from a pangocairo font map
Since: 1.10
pango_cairo_create_layout ()
pango_cairo_create_layout
PangoLayout *
pango_cairo_create_layout (cairo_t *cr);
Creates a layout object set up to match the current transformation
and target surface of the Cairo context. This layout can then be
used for text measurement with functions like
pango_layout_get_size() or drawing with functions like
pango_cairo_show_layout(). If you change the transformation
or target surface for cr
, you need to call pango_cairo_update_layout()
This function is the most convenient way to use Cairo with Pango,
however it is slightly inefficient since it creates a separate
PangoContext object for each layout. This might matter in an
application that was laying out large amounts of text.
Parameters
cr
a Cairo context
Returns
the newly created PangoLayout. Free with
g_object_unref().
[transfer full]
Since: 1.10
pango_cairo_update_layout ()
pango_cairo_update_layout
void
pango_cairo_update_layout (cairo_t *cr,
PangoLayout *layout);
Updates the private PangoContext of a PangoLayout created with
pango_cairo_create_layout() to match the current transformation
and target surface of a Cairo context.
Parameters
cr
a Cairo context
layout
a PangoLayout, from pango_cairo_create_layout()
Since: 1.10
pango_cairo_show_glyph_string ()
pango_cairo_show_glyph_string
void
pango_cairo_show_glyph_string (cairo_t *cr,
PangoFont *font,
PangoGlyphString *glyphs);
Draws the glyphs in glyphs
in the specified cairo context.
The origin of the glyphs (the left edge of the baseline) will
be drawn at the current point of the cairo context.
Parameters
cr
a Cairo context
font
a PangoFont from a PangoCairoFontMap
glyphs
a PangoGlyphString
Since: 1.10
pango_cairo_show_glyph_item ()
pango_cairo_show_glyph_item
void
pango_cairo_show_glyph_item (cairo_t *cr,
const char *text,
PangoGlyphItem *glyph_item);
Draws the glyphs in glyph_item
in the specified cairo context,
embedding the text associated with the glyphs in the output if the
output format supports it (PDF for example), otherwise it acts
similar to pango_cairo_show_glyph_string().
The origin of the glyphs (the left edge of the baseline) will
be drawn at the current point of the cairo context.
Note that text
is the start of the text for layout, which is then
indexed by glyph_item->item->offset
.
Parameters
cr
a Cairo context
text
the UTF-8 text that glyph_item
refers to
glyph_item
a PangoGlyphItem
Since: 1.22
pango_cairo_show_layout_line ()
pango_cairo_show_layout_line
void
pango_cairo_show_layout_line (cairo_t *cr,
PangoLayoutLine *line);
Draws a PangoLayoutLine in the specified cairo context.
The origin of the glyphs (the left edge of the line) will
be drawn at the current point of the cairo context.
Parameters
cr
a Cairo context
line
a PangoLayoutLine
Since: 1.10
pango_cairo_show_layout ()
pango_cairo_show_layout
void
pango_cairo_show_layout (cairo_t *cr,
PangoLayout *layout);
Draws a PangoLayout in the specified cairo context.
The top-left corner of the PangoLayout will be drawn
at the current point of the cairo context.
Parameters
cr
a Cairo context
layout
a Pango layout
Since: 1.10
pango_cairo_show_error_underline ()
pango_cairo_show_error_underline
void
pango_cairo_show_error_underline (cairo_t *cr,
double x,
double y,
double width,
double height);
Draw a squiggly line in the specified cairo context that approximately
covers the given rectangle in the style of an underline used to indicate a
spelling error. (The width of the underline is rounded to an integer
number of up/down segments and the resulting rectangle is centered in the
original rectangle)
Parameters
cr
a Cairo context
x
The X coordinate of one corner of the rectangle
y
The Y coordinate of one corner of the rectangle
width
Non-negative width of the rectangle
height
Non-negative height of the rectangle
Since: 1.14
pango_cairo_glyph_string_path ()
pango_cairo_glyph_string_path
void
pango_cairo_glyph_string_path (cairo_t *cr,
PangoFont *font,
PangoGlyphString *glyphs);
Adds the glyphs in glyphs
to the current path in the specified
cairo context. The origin of the glyphs (the left edge of the baseline)
will be at the current point of the cairo context.
Parameters
cr
a Cairo context
font
a PangoFont from a PangoCairoFontMap
glyphs
a PangoGlyphString
Since: 1.10
pango_cairo_layout_line_path ()
pango_cairo_layout_line_path
void
pango_cairo_layout_line_path (cairo_t *cr,
PangoLayoutLine *line);
Adds the text in PangoLayoutLine to the current path in the
specified cairo context. The origin of the glyphs (the left edge
of the line) will be at the current point of the cairo context.
Parameters
cr
a Cairo context
line
a PangoLayoutLine
Since: 1.10
pango_cairo_layout_path ()
pango_cairo_layout_path
void
pango_cairo_layout_path (cairo_t *cr,
PangoLayout *layout);
Adds the text in a PangoLayout to the current path in the
specified cairo context. The top-left corner of the PangoLayout
will be at the current point of the cairo context.
Parameters
cr
a Cairo context
layout
a Pango layout
Since: 1.10
pango_cairo_error_underline_path ()
pango_cairo_error_underline_path
void
pango_cairo_error_underline_path (cairo_t *cr,
double x,
double y,
double width,
double height);
Add a squiggly line to the current path in the specified cairo context that
approximately covers the given rectangle in the style of an underline used
to indicate a spelling error. (The width of the underline is rounded to an
integer number of up/down segments and the resulting rectangle is centered
in the original rectangle)
Parameters
cr
a Cairo context
x
The X coordinate of one corner of the rectangle
y
The Y coordinate of one corner of the rectangle
width
Non-negative width of the rectangle
height
Non-negative height of the rectangle
Since: 1.14
Types and Values
PangoCairoFont
PangoCairoFont
typedef struct _PangoCairoFont PangoCairoFont;
PangoCairoFont is an interface exported by fonts for
use with Cairo. The actual type of the font will depend
on the particular font technology Cairo was compiled to use.
Since: 1.18
PangoCairoFontMap
PangoCairoFontMap
typedef struct _PangoCairoFontMap PangoCairoFontMap;
PangoCairoFontMap is an interface exported by font maps for
use with Cairo. The actual type of the font map will depend
on the particular font technology Cairo was compiled to use.
Since: 1.10
docs/xml/coretext-fonts.xml 0000664 0001750 0001750 00000006124 13751777750 016172 0 ustar mclasen mclasen
]>
CoreText Fonts and Rendering
3
PANGO Library
CoreText Fonts and Rendering
Font handling and rendering on OS X
Functions
CTFontRef
pango_core_text_font_get_ctfont ()
Description
The macros and functions in this section are used to access fonts natively on
OS X using the CoreText text rendering subsystem.
Functions
pango_core_text_font_get_ctfont ()
pango_core_text_font_get_ctfont
CTFontRef
pango_core_text_font_get_ctfont (PangoCoreTextFont *font);
Returns the CTFontRef of a font.
Parameters
font
A PangoCoreTextFont
Returns
the CTFontRef associated to font
.
Since: 1.24
docs/xml/pangofc-fontmap.xml 0000664 0001750 0001750 00000121355 13751777750 016271 0 ustar mclasen mclasen
]>
PangoFcFontMap
3
PANGO Library
PangoFcFontMap
Base fontmap class for Fontconfig-based backends
Functions
PangoContext *
pango_fc_font_map_create_context ()
PangoFcDecoder *
(*PangoFcDecoderFindFunc) ()
void
pango_fc_font_map_add_decoder_find_func ()
PangoFcDecoder *
pango_fc_font_map_find_decoder ()
void
pango_fc_font_map_cache_clear ()
void
pango_fc_font_map_config_changed ()
void
pango_fc_font_map_shutdown ()
void
pango_fc_font_map_set_config ()
FcConfig *
pango_fc_font_map_get_config ()
void
(*PangoFcSubstituteFunc) ()
void
pango_fc_font_map_set_default_substitute ()
void
pango_fc_font_map_substitute_changed ()
PangoFontDescription *
pango_fc_font_description_from_pattern ()
Types and Values
PangoFcFontMap
PangoFcFontMapClass
#definePANGO_FC_FONT_FEATURES
#definePANGO_FC_GRAVITY
#definePANGO_FC_VERSION
#definePANGO_FC_PRGNAME
#definePANGO_FC_FONT_VARIATIONS
Object Hierarchy
GObject
╰── PangoFontMap
╰── PangoFcFontMap
├── PangoFT2FontMap
╰── PangoXftFontMap
Implemented Interfaces
PangoFcFontMap implements
GListModel.
Description
PangoFcFontMap is a base class for font map implementations using the
Fontconfig and FreeType libraries. It is used in the
Xft and
FreeType
backends shipped with Pango, but can also be used when creating
new backends. Any backend deriving from this base class will
take advantage of the wide range of shapers implemented using
FreeType that come with Pango.
Functions
pango_fc_font_map_create_context ()
pango_fc_font_map_create_contextpango_fc_font_map_create_context
PangoContext *
pango_fc_font_map_create_context (PangoFcFontMap *fcfontmap);
pango_fc_font_map_create_context has been deprecated since version 1.22 and should not be used in newly-written code. Use pango_font_map_create_context() instead.
Creates a new context for this fontmap. This function is intended
only for backend implementations deriving from PangoFcFontMap;
it is possible that a backend will store additional information
needed for correct operation on the PangoContext after calling
this function.
Parameters
fcfontmap
a PangoFcFontMap
Returns
a new PangoContext.
[transfer full]
Since: 1.4
PangoFcDecoderFindFunc ()
PangoFcDecoderFindFunc
PangoFcDecoder *
(*PangoFcDecoderFindFunc) (FcPattern *pattern,
gpointer user_data);
Callback function passed to pango_fc_font_map_add_decoder_find_func().
Parameters
pattern
a fully resolved FcPattern specifying the font on the system
user_data
user data passed to pango_fc_font_map_add_decoder_find_func()
Returns
a new reference to a custom decoder for this pattern,
or NULL if the default decoder handling should be used.
pango_fc_font_map_add_decoder_find_func ()
pango_fc_font_map_add_decoder_find_func
void
pango_fc_font_map_add_decoder_find_func
(PangoFcFontMap *fcfontmap,
PangoFcDecoderFindFunc findfunc,
gpointer user_data,
GDestroyNotify dnotify);
This function saves a callback method in the PangoFcFontMap that
will be called whenever new fonts are created. If the
function returns a PangoFcDecoder, that decoder will be used to
determine both coverage via a FcCharSet and a one-to-one mapping of
characters to glyphs. This will allow applications to have
application-specific encodings for various fonts.
Parameters
fcfontmap
The PangoFcFontMap to add this method to.
findfunc
The PangoFcDecoderFindFunc callback function
user_data
User data.
dnotify
A GDestroyNotify callback that will be called when the
fontmap is finalized and the decoder is released.
Since: 1.6
pango_fc_font_map_find_decoder ()
pango_fc_font_map_find_decoder
PangoFcDecoder *
pango_fc_font_map_find_decoder (PangoFcFontMap *fcfontmap,
FcPattern *pattern);
Finds the decoder to use for pattern
. Decoders can be added to
a font map using pango_fc_font_map_add_decoder_find_func().
Parameters
fcfontmap
The PangoFcFontMap to use.
pattern
The FcPattern to find the decoder for.
Returns
a newly created PangoFcDecoder
object or NULL if no decoder is set for pattern
.
[transfer full][nullable]
Since: 1.26
pango_fc_font_map_cache_clear ()
pango_fc_font_map_cache_clear
void
pango_fc_font_map_cache_clear (PangoFcFontMap *fcfontmap);
Clear all cached information and fontsets for this font map;
this should be called whenever there is a change in the
output of the default_substitute() virtual function of the
font map, or if fontconfig has been reinitialized to new
configuration.
Parameters
fcfontmap
a PangoFcFontMap
Since: 1.4
pango_fc_font_map_config_changed ()
pango_fc_font_map_config_changed
void
pango_fc_font_map_config_changed (PangoFcFontMap *fcfontmap);
Informs font map that the fontconfig configuration (ie, FcConfig object)
used by this font map has changed. This currently calls
pango_fc_font_map_cache_clear() which ensures that list of fonts, etc
will be regenerated using the updated configuration.
Parameters
fcfontmap
a PangoFcFontMap
Since: 1.38
pango_fc_font_map_shutdown ()
pango_fc_font_map_shutdown
void
pango_fc_font_map_shutdown (PangoFcFontMap *fcfontmap);
Clears all cached information for the fontmap and marks
all fonts open for the fontmap as dead. (See the shutdown()
virtual function of PangoFcFont.) This function might be used
by a backend when the underlying windowing system for the font
map exits. This function is only intended to be called
only for backend implementations deriving from PangoFcFontMap.
Parameters
fcfontmap
a PangoFcFontMap
Since: 1.4
pango_fc_font_map_set_config ()
pango_fc_font_map_set_config
void
pango_fc_font_map_set_config (PangoFcFontMap *fcfontmap,
FcConfig *fcconfig);
Set the FcConfig for this font map to use. The default value
is NULL, which causes Fontconfig to use its global "current config".
You can create a new FcConfig object and use this API to attach it
to a font map.
This is particularly useful for example, if you want to use application
fonts with Pango. For that, you would create a fresh FcConfig, add your
app fonts to it, and attach it to a new Pango font map.
If fcconfig
is different from the previous config attached to the font map,
pango_fc_font_map_config_changed() is called.
This function acquires a reference to the FcConfig object; the caller
does NOT need to retain a reference.
[skip]
Parameters
fcfontmap
a PangoFcFontMap
fcconfig
a FcConfig, or NULL.
[nullable]
Since: 1.38
pango_fc_font_map_get_config ()
pango_fc_font_map_get_config
FcConfig *
pango_fc_font_map_get_config (PangoFcFontMap *fcfontmap);
Fetches the FcConfig attached to a font map.
See also: pango_fc_font_map_set_config()
[skip]
Parameters
fcfontmap
a PangoFcFontMap
Returns
the FcConfig object attached to fcfontmap
, which
might be NULL.
[nullable]
Since: 1.38
PangoFcSubstituteFunc ()
PangoFcSubstituteFunc
void
(*PangoFcSubstituteFunc) (FcPattern *pattern,
gpointer data);
Function type for doing final config tweaking on prepared FcPatterns.
Parameters
pattern
the FcPattern to tweak.
data
user data.
pango_fc_font_map_set_default_substitute ()
pango_fc_font_map_set_default_substitute
void
pango_fc_font_map_set_default_substitute
(PangoFcFontMap *fontmap,
PangoFcSubstituteFunc func,
gpointer data,
GDestroyNotify notify);
Sets a function that will be called to do final configuration
substitution on a FcPattern before it is used to load
the font. This function can be used to do things like set
hinting and antialiasing options.
Parameters
fontmap
a PangoFcFontMap
func
function to call to to do final config tweaking
on FcPattern objects.
data
data to pass to func
notify
function to call when data
is no longer used.
Since: 1.48
pango_fc_font_map_substitute_changed ()
pango_fc_font_map_substitute_changed
void
pango_fc_font_map_substitute_changed (PangoFcFontMap *fontmap);
Call this function any time the results of the
default substitution function set with
pango_fc_font_map_set_default_substitute() change.
That is, if your substitution function will return different
results for the same input pattern, you must call this function.
Parameters
fontmap
a PangoFcFontMap
Since: 1.48
pango_fc_font_description_from_pattern ()
pango_fc_font_description_from_pattern
PangoFontDescription *
pango_fc_font_description_from_pattern
(FcPattern *pattern,
gboolean include_size);
Creates a PangoFontDescription that matches the specified
Fontconfig pattern as closely as possible. Many possible Fontconfig
pattern values, such as FC_RASTERIZER or FC_DPI, don't make sense in
the context of PangoFontDescription, so will be ignored.
Parameters
pattern
a FcPattern
include_size
if TRUE, the pattern will include the size from
the pattern
; otherwise the resulting pattern will be unsized.
(only FC_SIZE is examined, not FC_PIXEL_SIZE)
Returns
a new PangoFontDescription. Free with
pango_font_description_free().
Since: 1.4
Types and Values
PangoFcFontMap
PangoFcFontMap
typedef struct _PangoFcFontMap PangoFcFontMap;
PangoFcFontMap is a base class for font map implementations
using the Fontconfig and FreeType libraries. To create a new
backend using Fontconfig and FreeType, you derive from this class
and implement a new_font() virtual function that creates an
instance deriving from PangoFcFont.
PangoFcFontMapClass
PangoFcFontMapClass
typedef struct _PangoFcFontMapClass PangoFcFontMapClass;
Class structure for PangoFcFontMap.
Members
PANGO_FC_FONT_FEATURES
PANGO_FC_FONT_FEATURES
#define PANGO_FC_FONT_FEATURES "fontfeatures"
String representing a fontconfig property name that Pango reads from font
patterns to populate list of OpenType features to be enabled for the font
by default.
The property will have a number of string elements, each of which is the
OpenType feature tag of one feature to enable.
This is equivalent to FC_FONT_FEATURES in versions of fontconfig that have that.
Since: 1.34
PANGO_FC_GRAVITY
PANGO_FC_GRAVITY
#define PANGO_FC_GRAVITY "pangogravity"
String representing a fontconfig property name that Pango sets on any
fontconfig pattern it passes to fontconfig if a PangoGravity other
than PANGO_GRAVITY_SOUTH is desired.
The property will have a PangoGravity value as a string, like "east".
This can be used to write fontconfig configuration rules to choose
different fonts for horizontal and vertical writing directions.
Since: 1.20
PANGO_FC_VERSION
PANGO_FC_VERSION
#define PANGO_FC_VERSION "pangoversion"
String representing a fontconfig property name that Pango sets on any
fontconfig pattern it passes to fontconfig.
The property will have an integer value equal to what
pango_version() returns.
This can be used to write fontconfig configuration rules that only affect
certain pango versions (or only pango-using applications, or only
non-pango-using applications).
Since: 1.20
PANGO_FC_PRGNAME
PANGO_FC_PRGNAME
#define PANGO_FC_PRGNAME "prgname"
String representing a fontconfig property name that Pango sets on any
fontconfig pattern it passes to fontconfig.
The property will have a string equal to what
g_get_prgname() returns.
This can be used to write fontconfig configuration rules that only affect
certain applications.
This is equivalent to FC_PRGNAME in versions of fontconfig that have that.
Since: 1.24
PANGO_FC_FONT_VARIATIONS
PANGO_FC_FONT_VARIATIONS
#define PANGO_FC_FONT_VARIATIONS "fontvariations"
String representing a fontconfig property name that Pango reads from font
patterns to populate list of OpenType font variations to be used for a font.
The property will have a string elements, each of which a comma-separated
list of OpenType axis setting of the form AXIS=VALUE.
See Also
PangoFcFont
The base class for fonts; creating a new
Fontconfig-based backend involves deriving from both
PangoFcFontMap and PangoFcFont.
docs/xml/pangofc-font.xml 0000664 0001750 0001750 00000066465 13751777750 015605 0 ustar mclasen mclasen
]>
PangoFcFont
3
PANGO Library
PangoFcFont
Base font class for Fontconfig-based backends
Functions
FT_Face
pango_fc_font_lock_face ()
void
pango_fc_font_unlock_face ()
gboolean
pango_fc_font_has_char ()
guint
pango_fc_font_get_glyph ()
PangoGlyph
pango_fc_font_get_unknown_glyph ()
void
pango_fc_font_kern_glyphs ()
PangoLanguage **
pango_fc_font_get_languages ()
FcPattern *
pango_fc_font_get_pattern ()
Properties
PangoFcFontMap *fontmapRead / Write
gpointerpatternRead / Write / Construct Only
Types and Values
structPangoFcFont
PangoFcFontClass
Object Hierarchy
GObject
╰── PangoFont
╰── PangoFcFont
╰── PangoXftFont
Description
PangoFcFont is a base class for font implementation using the
Fontconfig and FreeType libraries. It is used in the
Xft and
FreeType
backends shipped with Pango, but can also be used when creating
new backends. Any backend deriving from this base class will
take advantage of the wide range of shapers implemented using
FreeType that come with Pango.
Functions
pango_fc_font_lock_face ()
pango_fc_font_lock_facepango_fc_font_lock_face
FT_Face
pango_fc_font_lock_face (PangoFcFont *font);
pango_fc_font_lock_face has been deprecated since version 1.44 and should not be used in newly-written code. Use pango_font_get_hb_font() instead
Gets the FreeType FT_Face associated with a font,
This face will be kept around until you call
pango_fc_font_unlock_face().
[skip]
Parameters
font
a PangoFcFont.
Returns
the FreeType FT_Face associated with font
.
Since: 1.4
pango_fc_font_unlock_face ()
pango_fc_font_unlock_facepango_fc_font_unlock_face
void
pango_fc_font_unlock_face (PangoFcFont *font);
pango_fc_font_unlock_face has been deprecated since version 1.44 and should not be used in newly-written code. Use pango_font_get_hb_font() instead
Releases a font previously obtained with
pango_fc_font_lock_face().
Parameters
font
a PangoFcFont.
Since: 1.4
pango_fc_font_has_char ()
pango_fc_font_has_charpango_fc_font_has_char
gboolean
pango_fc_font_has_char (PangoFcFont *font,
gunichar wc);
pango_fc_font_has_char has been deprecated since version 1.44 and should not be used in newly-written code. Use pango_font_has_char()
Determines whether font
has a glyph for the codepoint wc
.
Parameters
font
a PangoFcFont
wc
Unicode codepoint to look up
Returns
TRUE if font
has the requested codepoint.
Since: 1.4
pango_fc_font_get_glyph ()
pango_fc_font_get_glyph
guint
pango_fc_font_get_glyph (PangoFcFont *font,
gunichar wc);
Gets the glyph index for a given Unicode character
for font
. If you only want to determine
whether the font has the glyph, use pango_fc_font_has_char().
Parameters
font
a PangoFcFont
wc
Unicode character to look up
Returns
the glyph index, or 0, if the Unicode
character doesn't exist in the font.
Since: 1.4
pango_fc_font_get_unknown_glyph ()
pango_fc_font_get_unknown_glyphpango_fc_font_get_unknown_glyph
PangoGlyph
pango_fc_font_get_unknown_glyph (PangoFcFont *font,
gunichar wc);
pango_fc_font_get_unknown_glyph is deprecated and should not be used in newly-written code.
Returns the index of a glyph suitable for drawing wc
as an
unknown character.
Use PANGO_GET_UNKNOWN_GLYPH() instead.
Parameters
font
a PangoFcFont
wc
the Unicode character for which a glyph is needed.
Returns
a glyph index into font
.
Since: 1.4
pango_fc_font_kern_glyphs ()
pango_fc_font_kern_glyphspango_fc_font_kern_glyphs
void
pango_fc_font_kern_glyphs (PangoFcFont *font,
PangoGlyphString *glyphs);
pango_fc_font_kern_glyphs has been deprecated since version 1.32 and should not be used in newly-written code.
This function used to adjust each adjacent pair of glyphs
in glyphs
according to kerning information in font
.
Since 1.44, it does nothing.
Parameters
font
a PangoFcFont
glyphs
a PangoGlyphString
Since: 1.4
pango_fc_font_get_languages ()
pango_fc_font_get_languages
PangoLanguage **
pango_fc_font_get_languages (PangoFcFont *font);
Returns the languages that are supported by font
.
This corresponds to the FC_LANG member of the FcPattern.
The returned array is only valid as long as the font
and its fontmap are valid.
Parameters
font
a PangoFcFont
Returns
a NULL-terminated
array of PangoLanguage*.
[transfer none][nullable]
Since: 1.48
pango_fc_font_get_pattern ()
pango_fc_font_get_pattern
FcPattern *
pango_fc_font_get_pattern (PangoFcFont *font);
Returns the FcPattern that font
is based on.
[skip]
Parameters
font
a PangoFcFont
Returns
the fontconfig pattern for this font
Since: 1.48
Types and Values
struct PangoFcFont
PangoFcFont
struct PangoFcFont;
PangoFcFont is deprecated and should not be used in newly-written code.
PangoFcFont is a base class for font implementations
using the Fontconfig and FreeType libraries and is used in
conjunction with PangoFcFontMap. When deriving from this
class, you need to implement all of its virtual functions
other than shutdown() along with the get_glyph_extents()
virtual function from PangoFont.
PangoFcFontClass
PangoFcFontClass
typedef struct {
FT_Face (*lock_face) (PangoFcFont *font);
void (*unlock_face) (PangoFcFont *font);
gboolean (*has_char) (PangoFcFont *font,
gunichar wc);
guint (*get_glyph) (PangoFcFont *font,
gunichar wc);
PangoGlyph (*get_unknown_glyph) (PangoFcFont *font,
gunichar wc);
void (*shutdown) (PangoFcFont *font);
} PangoFcFontClass;
Class structure for PangoFcFont.
Members
lock_face ()
Returns the FT_Face of the font and increases
the reference count for the face by one.
unlock_face ()
Decreases the reference count for the
FT_Face of the font by one. When the count is zero,
the PangoFcFont subclass is allowed to free the
FT_Face.
has_char ()
Return TRUE if the the font contains a glyph
corresponding to the specified character.
get_glyph ()
Gets the glyph that corresponds to the given
Unicode character.
get_unknown_glyph ()
Gets the glyph that
should be used to display an unknown-glyph indication
for the specified Unicode character. May be NULL.
[nullable]
shutdown ()
Performs any font-specific
shutdown code that needs to be done when
pango_fc_font_map_shutdown is called. May be NULL.
[nullable]
Property Details
The “fontmap†property
PangoFcFont:fontmap
“fontmap†PangoFcFontMap *
The PangoFc font map this font is associated with (Since: 1.26).Owner: PangoFcFont
Flags: Read / Write
The “pattern†property
PangoFcFont:pattern
“pattern†gpointer
The fontconfig pattern for this font.Owner: PangoFcFont
Flags: Read / Write / Construct Only
See Also
PangoFcFontMap The base class for font maps; creating a new
Fontconfig-based backend involves deriving from both
PangoFcFontMap and PangoFcFont.
docs/xml/pangofc-decoder.xml 0000664 0001750 0001750 00000025425 13751777750 016233 0 ustar mclasen mclasen
]>
PangoFcDecoder
3
PANGO Library
PangoFcDecoder
Custom font encoding handling
Functions
FcCharSet *
pango_fc_decoder_get_charset ()
PangoGlyph
pango_fc_decoder_get_glyph ()
Types and Values
structPangoFcDecoder
structPangoFcDecoderClass
Object Hierarchy
GObject
╰── PangoFcDecoder
Description
PangoFcDecoder represents a decoder that an application provides
for handling a font that is encoded in a custom way.
Functions
pango_fc_decoder_get_charset ()
pango_fc_decoder_get_charset
FcCharSet *
pango_fc_decoder_get_charset (PangoFcDecoder *decoder,
PangoFcFont *fcfont);
Generates an FcCharSet of supported characters for the fcfont
given. The returned FcCharSet will be a reference to an
internal value stored by the PangoFcDecoder and must not
be modified or freed.
Parameters
decoder
a PangoFcDecoder
fcfont
the PangoFcFont to query.
Returns
the FcCharset for fcfont
; must not
be modified or freed.
[transfer none]
Since: 1.6
pango_fc_decoder_get_glyph ()
pango_fc_decoder_get_glyph
PangoGlyph
pango_fc_decoder_get_glyph (PangoFcDecoder *decoder,
PangoFcFont *fcfont,
guint32 wc);
Generates a PangoGlyph for the given Unicode point using the
custom decoder. For complex scripts where there can be multiple
glyphs for a single character, the decoder will return whatever
glyph is most convenient for it. (Usually whatever glyph is directly
in the fonts character map table.)
Parameters
decoder
a PangoFcDecoder
fcfont
a PangoFcFont to query.
wc
the Unicode code point to convert to a single PangoGlyph.
Returns
the glyph index, or 0 if the glyph isn't
covered by the font.
Since: 1.6
Types and Values
struct PangoFcDecoder
PangoFcDecoder
struct PangoFcDecoder;
PangoFcDecoder is a virtual base class that implementations will
inherit from. It's the interface that is used to define a custom
encoding for a font. These objects are created in your code from a
function callback that was originally registered with
pango_fc_font_map_add_decoder_find_func(). Pango requires
information about the supported charset for a font as well as the
individual character to glyph conversions. Pango gets that
information via the get_charset and get_glyph callbacks into your
object implementation.
Since: 1.6
struct PangoFcDecoderClass
PangoFcDecoderClass
struct PangoFcDecoderClass {
FcCharSet *(*get_charset) (PangoFcDecoder *decoder,
PangoFcFont *fcfont);
PangoGlyph (*get_glyph) (PangoFcDecoder *decoder,
PangoFcFont *fcfont,
guint32 wc);
};
Class structure for PangoFcDecoder.
Members
get_charset ()
This returns an FcCharset given a PangoFcFont that
includes a list of supported characters in the font. The
FcCharSet that is returned should be an internal reference to your
code. Pango will not free this structure. It is important that
you make this callback fast because this callback is called
separately for each character to determine Unicode coverage.
get_glyph ()
This returns a single PangoGlyph for a given Unicode
code point.
Since: 1.6
docs/xml/opentype.xml 0000664 0001750 0001750 00000366716 13751777750 015071 0 ustar mclasen mclasen
]>
OpenType Font Handling
3
PANGO Library
OpenType Font Handling
Obtaining information from OpenType tables
Stability Level
Unstable, unless otherwise indicated
Functions
#definePANGO_OT_TAG_MAKE()
#definePANGO_OT_TAG_MAKE_FROM_STRING()
PangoOTInfo *
pango_ot_info_get ()
gboolean
pango_ot_info_find_script ()
gboolean
pango_ot_info_find_language ()
gboolean
pango_ot_info_find_feature ()
PangoOTTag *
pango_ot_info_list_scripts ()
PangoOTTag *
pango_ot_info_list_languages ()
PangoOTTag *
pango_ot_info_list_features ()
PangoOTBuffer *
pango_ot_buffer_new ()
void
pango_ot_buffer_destroy ()
void
pango_ot_buffer_clear ()
void
pango_ot_buffer_add_glyph ()
void
pango_ot_buffer_set_rtl ()
void
pango_ot_buffer_set_zero_width_marks ()
void
pango_ot_buffer_get_glyphs ()
void
pango_ot_buffer_output ()
const PangoOTRuleset *
pango_ot_ruleset_get_for_description ()
PangoOTRuleset *
pango_ot_ruleset_new ()
PangoOTRuleset *
pango_ot_ruleset_new_for ()
PangoOTRuleset *
pango_ot_ruleset_new_from_description ()
void
pango_ot_ruleset_add_feature ()
gboolean
pango_ot_ruleset_maybe_add_feature ()
guint
pango_ot_ruleset_maybe_add_features ()
guint
pango_ot_ruleset_get_feature_count ()
void
pango_ot_ruleset_substitute ()
void
pango_ot_ruleset_position ()
PangoOTRulesetDescription *
pango_ot_ruleset_description_copy ()
gboolean
pango_ot_ruleset_description_equal ()
void
pango_ot_ruleset_description_free ()
guint
pango_ot_ruleset_description_hash ()
PangoOTTag
pango_ot_tag_from_language ()
PangoOTTag
pango_ot_tag_from_script ()
PangoLanguage *
pango_ot_tag_to_language ()
PangoScript
pango_ot_tag_to_script ()
Types and Values
typedefPangoOTTag
PangoOTInfo
PangoOTBuffer
structPangoOTGlyph
PangoOTRuleset
structPangoOTRulesetDescription
enumPangoOTTableType
structPangoOTFeatureMap
#definePANGO_OT_ALL_GLYPHS
#definePANGO_OT_NO_FEATURE
#definePANGO_OT_NO_SCRIPT
#definePANGO_OT_DEFAULT_LANGUAGE
#definePANGO_OT_TAG_DEFAULT_LANGUAGE
#definePANGO_OT_TAG_DEFAULT_SCRIPT
Object Hierarchy
GObject
├── PangoOTInfo
╰── PangoOTRuleset
Description
Functions and macros in this section are used to implement
the OpenType Layout features and algorithms.
They have been superseded by the harfbuzz library, and should
not be used anymore.
Functions
PANGO_OT_TAG_MAKE()
PANGO_OT_TAG_MAKE
#define PANGO_OT_TAG_MAKE(c1,c2,c3,c4) ((PangoOTTag) FT_MAKE_TAG (c1, c2, c3, c4))
PANGO_OT_TAG_MAKE is deprecated and should not be used in newly-written code.
Creates a PangoOTTag from four characters. This is similar and
compatible with the FT_MAKE_TAG() macro from FreeType.
Parameters
c1
First character.
c2
Second character.
c3
Third character.
c4
Fourth character.
PANGO_OT_TAG_MAKE_FROM_STRING()
PANGO_OT_TAG_MAKE_FROM_STRING
#define PANGO_OT_TAG_MAKE_FROM_STRING(s)
PANGO_OT_TAG_MAKE_FROM_STRING is deprecated and should not be used in newly-written code.
Creates a PangoOTTag from a string. The string should be at least
four characters long (pad with space characters if needed), and need
not be nul-terminated. This is a convenience wrapper around
PANGO_OT_TAG_MAKE(), but cannot be used in certain situations, for
example, as a switch expression, as it dereferences pointers.
Parameters
s
The string representation of the tag.
pango_ot_info_get ()
pango_ot_info_getpango_ot_info_get
PangoOTInfo *
pango_ot_info_get (FT_Face face);
pango_ot_info_get is deprecated and should not be used in newly-written code.
Returns the PangoOTInfo structure for the given FreeType font face.
Parameters
face
a FT_Face.
Returns
the PangoOTInfo for face
. This object
will have the same lifetime as face
.
[transfer none]
Since: 1.2
pango_ot_info_find_script ()
pango_ot_info_find_script
gboolean
pango_ot_info_find_script (PangoOTInfo *info,
PangoOTTableType table_type,
PangoOTTag script_tag,
guint *script_index);
pango_ot_info_find_script is deprecated and should not be used in newly-written code.
Finds the index of a script. If not found, tries to find the 'DFLT'
and then 'dflt' scripts and return the index of that in script_index
.
If none of those is found either, PANGO_OT_NO_SCRIPT is placed in
script_index
.
All other functions taking an input script_index parameter know
how to handle PANGO_OT_NO_SCRIPT, so one can ignore the return
value of this function completely and proceed, to enjoy the automatic
fallback to the 'DFLT'/'dflt' script.
Parameters
info
a PangoOTInfo.
table_type
the table type to obtain information about.
script_tag
the tag of the script to find.
script_index
location to store the index of the
script, or NULL.
[out][optional]
Returns
TRUE if the script was found.
pango_ot_info_find_language ()
pango_ot_info_find_language
gboolean
pango_ot_info_find_language (PangoOTInfo *info,
PangoOTTableType table_type,
guint script_index,
PangoOTTag language_tag,
guint *language_index,
guint *required_feature_index);
pango_ot_info_find_language is deprecated and should not be used in newly-written code.
Finds the index of a language and its required feature index.
If the language is not found, sets language_index
to
PANGO_OT_DEFAULT_LANGUAGE and the required feature of the default language
system is returned in required_feature_index. For best compatibility with
some fonts, also searches the language system tag 'dflt' before falling
back to the default language system, but that is transparent to the user.
The user can simply ignore the return value of this function to
automatically fall back to the default language system.
Parameters
info
a PangoOTInfo.
table_type
the table type to obtain information about.
script_index
the index of the script whose languages are searched.
language_tag
the tag of the language to find.
language_index
location to store the index of
the language, or NULL.
[out][optional]
required_feature_index
location to store the
required feature index of the language, or NULL.
[out][optional]
Returns
TRUE if the language was found.
pango_ot_info_find_feature ()
pango_ot_info_find_feature
gboolean
pango_ot_info_find_feature (PangoOTInfo *info,
PangoOTTableType table_type,
PangoOTTag feature_tag,
guint script_index,
guint language_index,
guint *feature_index);
pango_ot_info_find_feature is deprecated and should not be used in newly-written code.
Finds the index of a feature. If the feature is not found, sets
feature_index
to PANGO_OT_NO_FEATURE, which is safe to pass to
pango_ot_ruleset_add_feature() and similar functions.
In the future, this may set feature_index
to an special value that if used
in pango_ot_ruleset_add_feature() will ask Pango to synthesize the
requested feature based on Unicode properties and data. However, this
function will still return FALSE in those cases. So, users may want to
ignore the return value of this function in certain cases.
Parameters
info
a PangoOTInfo.
table_type
the table type to obtain information about.
feature_tag
the tag of the feature to find.
script_index
the index of the script.
language_index
the index of the language whose features are searched,
or PANGO_OT_DEFAULT_LANGUAGE to use the default language of the script.
feature_index
location to store the index of
the feature, or NULL.
[out][optional]
Returns
TRUE if the feature was found.
pango_ot_info_list_scripts ()
pango_ot_info_list_scripts
PangoOTTag *
pango_ot_info_list_scripts (PangoOTInfo *info,
PangoOTTableType table_type);
pango_ot_info_list_scripts is deprecated and should not be used in newly-written code.
Obtains the list of available scripts.
Parameters
info
a PangoOTInfo.
table_type
the table type to obtain information about.
Returns
a newly-allocated zero-terminated array containing the tags of the
available scripts. Should be freed using g_free().
pango_ot_info_list_languages ()
pango_ot_info_list_languages
PangoOTTag *
pango_ot_info_list_languages (PangoOTInfo *info,
PangoOTTableType table_type,
guint script_index,
PangoOTTag language_tag);
pango_ot_info_list_languages is deprecated and should not be used in newly-written code.
Obtains the list of available languages for a given script.
Parameters
info
a PangoOTInfo.
table_type
the table type to obtain information about.
script_index
the index of the script to list languages for.
language_tag
unused parameter.
Returns
a newly-allocated zero-terminated array containing the tags of the
available languages. Should be freed using g_free().
pango_ot_info_list_features ()
pango_ot_info_list_features
PangoOTTag *
pango_ot_info_list_features (PangoOTInfo *info,
PangoOTTableType table_type,
PangoOTTag tag,
guint script_index,
guint language_index);
pango_ot_info_list_features is deprecated and should not be used in newly-written code.
Obtains the list of features for the given language of the given script.
Parameters
info
a PangoOTInfo.
table_type
the table type to obtain information about.
tag
unused parameter.
script_index
the index of the script to obtain information about.
language_index
the index of the language to list features for, or
PANGO_OT_DEFAULT_LANGUAGE, to list features for the default
language of the script.
Returns
a newly-allocated zero-terminated array containing the tags of the
available features. Should be freed using g_free().
pango_ot_buffer_new ()
pango_ot_buffer_newpango_ot_buffer_new
PangoOTBuffer *
pango_ot_buffer_new (PangoFcFont *font);
pango_ot_buffer_new is deprecated and should not be used in newly-written code.
Creates a new PangoOTBuffer for the given OpenType font.
Parameters
font
a PangoFcFont
Returns
the newly allocated PangoOTBuffer, which should
be freed with pango_ot_buffer_destroy().
Since: 1.4
pango_ot_buffer_destroy ()
pango_ot_buffer_destroypango_ot_buffer_destroy
void
pango_ot_buffer_destroy (PangoOTBuffer *buffer);
pango_ot_buffer_destroy is deprecated and should not be used in newly-written code.
Destroys a PangoOTBuffer and free all associated memory.
Parameters
buffer
a PangoOTBuffer
Since: 1.4
pango_ot_buffer_clear ()
pango_ot_buffer_clearpango_ot_buffer_clear
void
pango_ot_buffer_clear (PangoOTBuffer *buffer);
pango_ot_buffer_clear is deprecated and should not be used in newly-written code.
Empties a PangoOTBuffer, make it ready to add glyphs to.
Parameters
buffer
a PangoOTBuffer
Since: 1.4
pango_ot_buffer_add_glyph ()
pango_ot_buffer_add_glyphpango_ot_buffer_add_glyph
void
pango_ot_buffer_add_glyph (PangoOTBuffer *buffer,
guint glyph,
guint properties,
guint cluster);
pango_ot_buffer_add_glyph is deprecated and should not be used in newly-written code.
Appends a glyph to a PangoOTBuffer, with properties
identifying which
features should be applied on this glyph. See pango_ot_ruleset_add_feature().
Parameters
buffer
a PangoOTBuffer
glyph
the glyph index to add, like a PangoGlyph
properties
the glyph properties
cluster
the cluster that this glyph belongs to
Since: 1.4
pango_ot_buffer_set_rtl ()
pango_ot_buffer_set_rtlpango_ot_buffer_set_rtl
void
pango_ot_buffer_set_rtl (PangoOTBuffer *buffer,
gboolean rtl);
pango_ot_buffer_set_rtl is deprecated and should not be used in newly-written code.
Sets whether glyphs will be rendered right-to-left. This setting
is needed for proper horizontal positioning of right-to-left scripts.
Parameters
buffer
a PangoOTBuffer
rtl
TRUE for right-to-left text
Since: 1.4
pango_ot_buffer_set_zero_width_marks ()
pango_ot_buffer_set_zero_width_markspango_ot_buffer_set_zero_width_marks
void
pango_ot_buffer_set_zero_width_marks (PangoOTBuffer *buffer,
gboolean zero_width_marks);
pango_ot_buffer_set_zero_width_marks is deprecated and should not be used in newly-written code.
Sets whether characters with a mark class should be forced to zero width.
This setting is needed for proper positioning of Arabic accents,
but will produce incorrect results with standard OpenType Indic
fonts.
Parameters
buffer
a PangoOTBuffer
zero_width_marks
TRUE if characters with a mark class should
be forced to zero width.
Since: 1.6
pango_ot_buffer_get_glyphs ()
pango_ot_buffer_get_glyphspango_ot_buffer_get_glyphs
void
pango_ot_buffer_get_glyphs (const PangoOTBuffer *buffer,
PangoOTGlyph **glyphs,
int *n_glyphs);
pango_ot_buffer_get_glyphs is deprecated and should not be used in newly-written code.
Gets the glyph array contained in a PangoOTBuffer. The glyphs are
owned by the buffer and should not be freed, and are only valid as long
as buffer is not modified.
Parameters
buffer
a PangoOTBuffer
glyphs
location to
store the array of glyphs, or NULL.
[array length=n_glyphs][out][optional]
n_glyphs
location to store the number of
glyphs, or NULL.
[out][optional]
Since: 1.4
pango_ot_buffer_output ()
pango_ot_buffer_outputpango_ot_buffer_output
void
pango_ot_buffer_output (const PangoOTBuffer *buffer,
PangoGlyphString *glyphs);
pango_ot_buffer_output is deprecated and should not be used in newly-written code.
Exports the glyphs in a PangoOTBuffer into a PangoGlyphString. This is
typically used after the OpenType layout processing is over, to convert the
resulting glyphs into a generic Pango glyph string.
Parameters
buffer
a PangoOTBuffer
glyphs
a PangoGlyphString
Since: 1.4
pango_ot_ruleset_get_for_description ()
pango_ot_ruleset_get_for_descriptionpango_ot_ruleset_get_for_description
const PangoOTRuleset *
pango_ot_ruleset_get_for_description (PangoOTInfo *info,
const PangoOTRulesetDescription *desc);
pango_ot_ruleset_get_for_description is deprecated and should not be used in newly-written code.
Returns a ruleset for the given OpenType info and ruleset
description. Rulesets are created on demand using
pango_ot_ruleset_new_from_description().
The returned ruleset should not be modified or destroyed.
The static feature map members of desc
should be alive as
long as info
is.
Parameters
info
a PangoOTInfo.
desc
a PangoOTRulesetDescription.
Returns
the PangoOTRuleset for desc
. This object will have
the same lifetime as info
.
Since: 1.18
pango_ot_ruleset_new ()
pango_ot_ruleset_new
PangoOTRuleset *
pango_ot_ruleset_new (PangoOTInfo *info);
pango_ot_ruleset_new is deprecated and should not be used in newly-written code.
Creates a new PangoOTRuleset for the given OpenType info.
Parameters
info
a PangoOTInfo.
Returns
the newly allocated PangoOTRuleset, which
should be freed with g_object_unref().
pango_ot_ruleset_new_for ()
pango_ot_ruleset_new_forpango_ot_ruleset_new_for
PangoOTRuleset *
pango_ot_ruleset_new_for (PangoOTInfo *info,
PangoScript script,
PangoLanguage *language);
pango_ot_ruleset_new_for is deprecated and should not be used in newly-written code.
Creates a new PangoOTRuleset for the given OpenType info, script, and
language.
This function is part of a convenience scheme that highly simplifies
using a PangoOTRuleset to represent features for a specific pair of script
and language. So one can use this function passing in the script and
language of interest, and later try to add features to the ruleset by just
specifying the feature name or tag, without having to deal with finding
script, language, or feature indices manually.
In excess to what pango_ot_ruleset_new() does, this function will:
Find the PangoOTTag script and language tags associated with
script and language using pango_ot_tag_from_script() and
pango_ot_tag_from_language(),
For each of table types PANGO_OT_TABLE_GSUB and PANGO_OT_TABLE_GPOS,
find the script index of the script tag found and the language
system index of the language tag found in that script system, using
pango_ot_info_find_script() and pango_ot_info_find_language(),
For found language-systems, if they have required feature
index, add that feature to the ruleset using
pango_ot_ruleset_add_feature(),
Remember found script and language indices for both table types,
and use them in future pango_ot_ruleset_maybe_add_feature() and
pango_ot_ruleset_maybe_add_features().
Because of the way return values of pango_ot_info_find_script() and
pango_ot_info_find_language() are ignored, this function automatically
finds and uses the 'DFLT' script and the default language-system.
Parameters
info
a PangoOTInfo.
script
a PangoScript.
language
a PangoLanguage.
Returns
the newly allocated PangoOTRuleset, which
should be freed with g_object_unref().
Since: 1.18
pango_ot_ruleset_new_from_description ()
pango_ot_ruleset_new_from_descriptionpango_ot_ruleset_new_from_description
PangoOTRuleset *
pango_ot_ruleset_new_from_description (PangoOTInfo *info,
const PangoOTRulesetDescription *desc);
pango_ot_ruleset_new_from_description is deprecated and should not be used in newly-written code.
Creates a new PangoOTRuleset for the given OpenType infor and
matching the given ruleset description.
This is a convenience function that calls pango_ot_ruleset_new_for() and
adds the static GSUB/GPOS features to the resulting ruleset, followed by
adding other features to both GSUB and GPOS.
The static feature map members of desc
should be alive as
long as info
is.
Parameters
info
a PangoOTInfo.
desc
a PangoOTRulesetDescription.
Returns
the newly allocated PangoOTRuleset, which
should be freed with g_object_unref().
Since: 1.18
pango_ot_ruleset_add_feature ()
pango_ot_ruleset_add_feature
void
pango_ot_ruleset_add_feature (PangoOTRuleset *ruleset,
PangoOTTableType table_type,
guint feature_index,
gulong property_bit);
pango_ot_ruleset_add_feature is deprecated and should not be used in newly-written code.
Adds a feature to the ruleset.
Parameters
ruleset
a PangoOTRuleset.
table_type
the table type to add a feature to.
feature_index
the index of the feature to add.
property_bit
the property bit to use for this feature. Used to identify
the glyphs that this feature should be applied to, or
PANGO_OT_ALL_GLYPHS if it should be applied to all glyphs.
pango_ot_ruleset_maybe_add_feature ()
pango_ot_ruleset_maybe_add_featurepango_ot_ruleset_maybe_add_feature
gboolean
pango_ot_ruleset_maybe_add_feature (PangoOTRuleset *ruleset,
PangoOTTableType table_type,
PangoOTTag feature_tag,
gulong property_bit);
pango_ot_ruleset_maybe_add_feature is deprecated and should not be used in newly-written code.
This is a convenience function that first tries to find the feature
using pango_ot_info_find_feature() and the ruleset script and language
passed to pango_ot_ruleset_new_for(),
and if the feature is found, adds it to the ruleset.
If ruleset
was not created using pango_ot_ruleset_new_for(), this function
does nothing.
Parameters
ruleset
a PangoOTRuleset.
table_type
the table type to add a feature to.
feature_tag
the tag of the feature to add.
property_bit
the property bit to use for this feature. Used to identify
the glyphs that this feature should be applied to, or
PANGO_OT_ALL_GLYPHS if it should be applied to all glyphs.
Returns
TRUE if the feature was found and added to ruleset,
FALSE otherwise.
Since: 1.18
pango_ot_ruleset_maybe_add_features ()
pango_ot_ruleset_maybe_add_featurespango_ot_ruleset_maybe_add_features
guint
pango_ot_ruleset_maybe_add_features (PangoOTRuleset *ruleset,
PangoOTTableType table_type,
const PangoOTFeatureMap *features,
guint n_features);
pango_ot_ruleset_maybe_add_features is deprecated and should not be used in newly-written code.
This is a convenience function that
for each feature in the feature map array features
converts the feature name to a PangoOTTag feature tag using PANGO_OT_TAG_MAKE()
and calls pango_ot_ruleset_maybe_add_feature() on it.
Parameters
ruleset
a PangoOTRuleset.
table_type
the table type to add features to.
features
array of feature name and property bits to add.
n_features
number of feature records in features
array.
Returns
The number of features in features
that were found
and added to ruleset
.
Since: 1.18
pango_ot_ruleset_get_feature_count ()
pango_ot_ruleset_get_feature_countpango_ot_ruleset_get_feature_count
guint
pango_ot_ruleset_get_feature_count (const PangoOTRuleset *ruleset,
guint *n_gsub_features,
guint *n_gpos_features);
pango_ot_ruleset_get_feature_count is deprecated and should not be used in newly-written code.
Gets the number of GSUB and GPOS features in the ruleset.
Parameters
ruleset
a PangoOTRuleset.
n_gsub_features
location to store number of
GSUB features, or NULL.
[out][optional]
n_gpos_features
location to store number of
GPOS features, or NULL.
[out][optional]
Returns
Total number of features in the ruleset
.
Since: 1.18
pango_ot_ruleset_substitute ()
pango_ot_ruleset_substitutepango_ot_ruleset_substitute
void
pango_ot_ruleset_substitute (const PangoOTRuleset *ruleset,
PangoOTBuffer *buffer);
pango_ot_ruleset_substitute is deprecated and should not be used in newly-written code.
Performs the OpenType GSUB substitution on buffer
using the features
in ruleset
Parameters
ruleset
a PangoOTRuleset.
buffer
a PangoOTBuffer.
Since: 1.4
pango_ot_ruleset_position ()
pango_ot_ruleset_positionpango_ot_ruleset_position
void
pango_ot_ruleset_position (const PangoOTRuleset *ruleset,
PangoOTBuffer *buffer);
pango_ot_ruleset_position is deprecated and should not be used in newly-written code.
Performs the OpenType GPOS positioning on buffer
using the features
in ruleset
Parameters
ruleset
a PangoOTRuleset.
buffer
a PangoOTBuffer.
Since: 1.4
pango_ot_ruleset_description_copy ()
pango_ot_ruleset_description_copypango_ot_ruleset_description_copy
PangoOTRulesetDescription *
pango_ot_ruleset_description_copy (const PangoOTRulesetDescription *desc);
pango_ot_ruleset_description_copy is deprecated and should not be used in newly-written code.
Creates a copy of desc
, which should be freed with
pango_ot_ruleset_description_free(). Primarily used internally
by pango_ot_ruleset_get_for_description() to cache rulesets for
ruleset descriptions.
Parameters
desc
ruleset description to copy
Returns
the newly allocated PangoOTRulesetDescription, which
should be freed with pango_ot_ruleset_description_free().
Since: 1.18
pango_ot_ruleset_description_equal ()
pango_ot_ruleset_description_equalpango_ot_ruleset_description_equal
gboolean
pango_ot_ruleset_description_equal (const PangoOTRulesetDescription *desc1,
const PangoOTRulesetDescription *desc2);
pango_ot_ruleset_description_equal is deprecated and should not be used in newly-written code.
Compares two ruleset descriptions for equality.
Two ruleset descriptions are considered equal if the rulesets
they describe are provably identical. This means that their
script, language, and all feature sets should be equal. For static feature
sets, the array addresses are compared directly, while for other
features, the list of features is compared one by one.
(Two ruleset descriptions may result in identical rulesets
being created, but still compare FALSE.)
Parameters
desc1
a ruleset description
desc2
a ruleset description
Returns
TRUE if two ruleset descriptions are identical,
FALSE otherwise.
Since: 1.18
pango_ot_ruleset_description_free ()
pango_ot_ruleset_description_freepango_ot_ruleset_description_free
void
pango_ot_ruleset_description_free (PangoOTRulesetDescription *desc);
pango_ot_ruleset_description_free is deprecated and should not be used in newly-written code.
Frees a ruleset description allocated by
pango_ot_ruleset_description_copy().
Parameters
desc
an allocated PangoOTRulesetDescription
Since: 1.18
pango_ot_ruleset_description_hash ()
pango_ot_ruleset_description_hashpango_ot_ruleset_description_hash
guint
pango_ot_ruleset_description_hash (const PangoOTRulesetDescription *desc);
pango_ot_ruleset_description_hash is deprecated and should not be used in newly-written code.
Computes a hash of a PangoOTRulesetDescription structure suitable
to be used, for example, as an argument to g_hash_table_new().
Parameters
desc
a ruleset description
Returns
the hash value.
Since: 1.18
pango_ot_tag_from_language ()
pango_ot_tag_from_languagepango_ot_tag_from_language
PangoOTTag
pango_ot_tag_from_language (PangoLanguage *language);
pango_ot_tag_from_language is deprecated and should not be used in newly-written code.
Finds the OpenType language-system tag best describing language
.
Parameters
language
A PangoLanguage, or NULL.
[nullable]
Returns
PangoOTTag best matching language
or
PANGO_OT_TAG_DEFAULT_LANGUAGE if none found or if language
is NULL.
Since: 1.18
pango_ot_tag_from_script ()
pango_ot_tag_from_scriptpango_ot_tag_from_script
PangoOTTag
pango_ot_tag_from_script (PangoScript script);
pango_ot_tag_from_script is deprecated and should not be used in newly-written code.
Finds the OpenType script tag corresponding to script
.
The PANGO_SCRIPT_COMMON, PANGO_SCRIPT_INHERITED, and
PANGO_SCRIPT_UNKNOWN scripts are mapped to the OpenType
'DFLT' script tag that is also defined as
PANGO_OT_TAG_DEFAULT_SCRIPT.
Note that multiple PangoScript values may map to the same
OpenType script tag. In particular, PANGO_SCRIPT_HIRAGANA
and PANGO_SCRIPT_KATAKANA both map to the OT tag 'kana'.
Parameters
script
A PangoScript
Returns
PangoOTTag corresponding to script
or
PANGO_OT_TAG_DEFAULT_SCRIPT if none found.
Since: 1.18
pango_ot_tag_to_language ()
pango_ot_tag_to_languagepango_ot_tag_to_language
PangoLanguage *
pango_ot_tag_to_language (PangoOTTag language_tag);
pango_ot_tag_to_language is deprecated and should not be used in newly-written code.
Finds a PangoLanguage corresponding to language_tag
.
Parameters
language_tag
A PangoOTTag OpenType language-system tag
Returns
PangoLanguage best matching language_tag
or
PangoLanguage corresponding to the string "xx" if none found.
Since: 1.18
pango_ot_tag_to_script ()
pango_ot_tag_to_scriptpango_ot_tag_to_script
PangoScript
pango_ot_tag_to_script (PangoOTTag script_tag);
pango_ot_tag_to_script is deprecated and should not be used in newly-written code.
Finds the PangoScript corresponding to script_tag
.
The 'DFLT' script tag is mapped to PANGO_SCRIPT_COMMON.
Note that an OpenType script tag may correspond to multiple
PangoScript values. In such cases, the PangoScript value
with the smallest value is returned.
In particular, PANGO_SCRIPT_HIRAGANA
and PANGO_SCRIPT_KATAKANA both map to the OT tag 'kana'.
This function will return PANGO_SCRIPT_HIRAGANA for
'kana'.
Parameters
script_tag
A PangoOTTag OpenType script tag
Returns
PangoScript corresponding to script_tag
or
PANGO_SCRIPT_UNKNOWN if none found.
Since: 1.18
Types and Values
PangoOTTag
PangoOTTag
typedef guint32 PangoOTTag;
PangoOTTag is deprecated and should not be used in newly-written code.
The PangoOTTag typedef is used to represent TrueType and OpenType
four letter tags inside Pango. Use PANGO_OT_TAG_MAKE()
or PANGO_OT_TAG_MAKE_FROM_STRING() macros to create PangoOTTags manually.
PangoOTInfo
PangoOTInfo
typedef struct _PangoOTInfo PangoOTInfo;
PangoOTInfo is deprecated and should not be used in newly-written code.
The PangoOTInfo struct contains the various
tables associated with an OpenType font. It contains only private fields and
should only be accessed via the pango_ot_info_* functions
which are documented below. To obtain a PangoOTInfo,
use pango_ot_info_get().
PangoOTBuffer
PangoOTBuffer
typedef struct _PangoOTBuffer PangoOTBuffer;
PangoOTBuffer is deprecated and should not be used in newly-written code.
The PangoOTBuffer structure is used to store strings of glyphs associated
with a PangoFcFont, suitable for OpenType layout processing. It contains
only private fields and should only be accessed via the
pango_ot_buffer_* functions which are documented below.
To obtain a PangoOTBuffer, use pango_ot_buffer_new().
struct PangoOTGlyph
PangoOTGlyph
struct PangoOTGlyph {
guint32 glyph;
guint properties;
guint cluster;
gushort component;
gushort ligID;
guint internal;
};
PangoOTGlyph is deprecated and should not be used in newly-written code.
The PangoOTGlyph structure represents a single glyph together with
information used for OpenType layout processing of the glyph.
It contains the following fields.
Members
guint32 glyph;
the glyph itself.
guint properties;
the properties value, identifying which features should be
applied on this glyph. See pango_ot_ruleset_add_feature().
guint cluster;
the cluster that this glyph belongs to.
gushort component;
a component value, set by the OpenType layout engine.
gushort ligID;
a ligature index value, set by the OpenType layout engine.
guint internal;
for Pango internal use
PangoOTRuleset
PangoOTRuleset
typedef struct _PangoOTRuleset PangoOTRuleset;
PangoOTRuleset is deprecated and should not be used in newly-written code.
The PangoOTRuleset structure holds a
set of features selected from the tables in an OpenType font.
(A feature is an operation such as adjusting glyph positioning
that should be applied to a text feature such as a certain
type of accent.) A PangoOTRuleset
is created with pango_ot_ruleset_new(), features are added
to it with pango_ot_ruleset_add_feature(), then it is
applied to a PangoGlyphString with pango_ot_ruleset_shape().
struct PangoOTRulesetDescription
PangoOTRulesetDescriptionPangoOTRulesetDescription
struct PangoOTRulesetDescription {
PangoScript script;
PangoLanguage *language;
const PangoOTFeatureMap *static_gsub_features;
guint n_static_gsub_features;
const PangoOTFeatureMap *static_gpos_features;
guint n_static_gpos_features;
const PangoOTFeatureMap *other_features;
guint n_other_features;
};
PangoOTRulesetDescription is deprecated and should not be used in newly-written code.
The PangoOTRuleset structure holds all the information needed
to build a complete PangoOTRuleset from an OpenType font.
The main use of this struct is to act as the key for a per-font
hash of rulesets. The user populates a ruleset description and
gets the ruleset using pango_ot_ruleset_get_for_description()
or create a new one using pango_ot_ruleset_new_from_description().
Members
PangoScript script;
a PangoScript.
PangoLanguage *language;
a PangoLanguage.
const PangoOTFeatureMap *static_gsub_features;
static map of GSUB features,
or NULL.
[nullable]
guint n_static_gsub_features;
length of static_gsub_features
, or 0.
const PangoOTFeatureMap *static_gpos_features;
static map of GPOS features,
or NULL.
[nullable]
guint n_static_gpos_features;
length of static_gpos_features
, or 0.
const PangoOTFeatureMap *other_features;
map of extra features to add to both
GSUB and GPOS, or NULL. Unlike the static maps, this pointer
need not live beyond the life of function calls taking this
struct.
[nullable]
guint n_other_features;
length of other_features
, or 0.
Since: 1.18
enum PangoOTTableType
PangoOTTableType
PangoOTTableType is deprecated and should not be used in newly-written code.
The PangoOTTableType enumeration values are used to
identify the various OpenType tables in the
pango_ot_info_* functions.
Members
PANGO_OT_TABLE_GSUB
The GSUB table.
PANGO_OT_TABLE_GPOS
The GPOS table.
struct PangoOTFeatureMap
PangoOTFeatureMapPangoOTFeatureMap
struct PangoOTFeatureMap {
char feature_name[5];
gulong property_bit;
};
PangoOTFeatureMap is deprecated and should not be used in newly-written code.
The PangoOTFeatureMap typedef is used to represent an OpenType
feature with the property bit associated with it. The feature tag is
represented as a char array instead of a PangoOTTag for convenience.
Members
char feature_name[5];
feature tag in represented as four-letter ASCII string.
gulong property_bit;
the property bit to use for this feature. See
pango_ot_ruleset_add_feature() for details.
Since: 1.18
PANGO_OT_ALL_GLYPHS
PANGO_OT_ALL_GLYPHSPANGO_OT_ALL_GLYPHS
#define PANGO_OT_ALL_GLYPHS ((guint) 0xFFFF)
PANGO_OT_ALL_GLYPHS is deprecated and should not be used in newly-written code.
This is used as the property bit in pango_ot_ruleset_add_feature() when a
feature should be applied to all glyphs.
Since: 1.16
PANGO_OT_NO_FEATURE
PANGO_OT_NO_FEATUREPANGO_OT_NO_FEATURE
#define PANGO_OT_NO_FEATURE ((guint) 0xFFFF)
PANGO_OT_NO_FEATURE is deprecated and should not be used in newly-written code.
This is used as a feature index that represent no feature, that is, should be
skipped. It may be returned as feature index by pango_ot_info_find_feature()
if the feature is not found, and pango_ot_ruleset_add_feature() function
automatically skips this value, so no special handling is required by the user.
Since: 1.18
PANGO_OT_NO_SCRIPT
PANGO_OT_NO_SCRIPTPANGO_OT_NO_SCRIPT
#define PANGO_OT_NO_SCRIPT ((guint) 0xFFFF)
PANGO_OT_NO_SCRIPT is deprecated and should not be used in newly-written code.
This is used as a script index that represent no script, that is, when the
requested script was not found, and a default ('DFLT') script was not found
either. It may be returned as script index by pango_ot_info_find_script()
if the script or a default script are not found, all other functions
taking a script index essentially return if the input script index is
this value, so no special handling is required by the user.
Since: 1.18
PANGO_OT_DEFAULT_LANGUAGE
PANGO_OT_DEFAULT_LANGUAGEPANGO_OT_DEFAULT_LANGUAGE
#define PANGO_OT_DEFAULT_LANGUAGE ((guint) 0xFFFF)
PANGO_OT_DEFAULT_LANGUAGE is deprecated and should not be used in newly-written code.
This is used as the language index in pango_ot_info_find_feature() when
the default language system of the script is desired.
It is also returned by pango_ot_info_find_language() if the requested language
is not found, or the requested language tag was PANGO_OT_TAG_DEFAULT_LANGUAGE.
The end result is that one can always call pango_ot_tag_from_language()
followed by pango_ot_info_find_language() and pass the result to
pango_ot_info_find_feature() without having to worry about falling back to
default language system explicitly.
Since: 1.16
PANGO_OT_TAG_DEFAULT_LANGUAGE
PANGO_OT_TAG_DEFAULT_LANGUAGEPANGO_OT_TAG_DEFAULT_LANGUAGE
#define PANGO_OT_TAG_DEFAULT_LANGUAGE PANGO_OT_TAG_MAKE ('d', 'f', 'l', 't')
PANGO_OT_TAG_DEFAULT_LANGUAGE is deprecated and should not be used in newly-written code.
This is a PangoOTTag representing a special language tag 'dflt'. It is
returned as language tag by pango_ot_tag_from_language() if the requested
language is not found. It is safe to pass this value to
pango_ot_info_find_language() as that function falls back to returning default
language-system if the requested language tag is not found.
Since: 1.18
PANGO_OT_TAG_DEFAULT_SCRIPT
PANGO_OT_TAG_DEFAULT_SCRIPTPANGO_OT_TAG_DEFAULT_SCRIPT
#define PANGO_OT_TAG_DEFAULT_SCRIPT PANGO_OT_TAG_MAKE ('D', 'F', 'L', 'T')
PANGO_OT_TAG_DEFAULT_SCRIPT is deprecated and should not be used in newly-written code.
This is a PangoOTTag representing the special script tag 'DFLT'. It is
returned as script tag by pango_ot_tag_from_script() if the requested script
is not found.
Since: 1.18
docs/xml/utils.xml 0000664 0001750 0001750 00000112040 13751777750 014341 0 ustar mclasen mclasen
]>
Miscellaneous Utilities
3
PANGO Library
Miscellaneous Utilities
Various convenience and utility functions
Functions
char **
pango_split_file_list ()
char *
pango_trim_string ()
gint
pango_read_line ()
gboolean
pango_skip_space ()
gboolean
pango_scan_word ()
gboolean
pango_scan_string ()
gboolean
pango_scan_int ()
gboolean
pango_parse_enum ()
gboolean
pango_parse_style ()
gboolean
pango_parse_variant ()
gboolean
pango_parse_weight ()
gboolean
pango_parse_stretch ()
guint8 *
pango_log2vis_get_embedding_levels ()
gboolean
pango_is_zero_width ()
void
pango_quantize_line_geometry ()
Description
The functions and utilities in this section are mostly used from Pango
backends and modules, but may be useful for other purposes too.
Functions
pango_split_file_list ()
pango_split_file_list
char **
pango_split_file_list (const char *str);
pango_split_file_list has been deprecated since version 1.38 and should not be used in newly-written code.
Splits a G_SEARCHPATH_SEPARATOR-separated list of files, stripping
white space and substituting ~/ with $HOME/.
Parameters
str
a G_SEARCHPATH_SEPARATOR separated list of filenames
Returns
a list of
strings to be freed with g_strfreev().
[transfer full][array zero-terminated=1]
pango_trim_string ()
pango_trim_string
char *
pango_trim_string (const char *str);
pango_trim_string has been deprecated since version 1.38 and should not be used in newly-written code.
Trims leading and trailing whitespace from a string.
Parameters
str
a string
Returns
A newly-allocated string that must be freed with g_free()
pango_read_line ()
pango_read_line
gint
pango_read_line (FILE *stream,
GString *str);
pango_read_line has been deprecated since version 1.38 and should not be used in newly-written code.
Reads an entire line from a file into a buffer. Lines may
be delimited with '\n', '\r', '\n\r', or '\r\n'. The delimiter
is not written into the buffer. Text after a '#' character is treated as
a comment and skipped. '\' can be used to escape a # character.
'\' proceeding a line delimiter combines adjacent lines. A '\' proceeding
any other character is ignored and written into the output buffer
unmodified.
Parameters
stream
a stdio stream
str
GString buffer into which to write the result
Returns
0 if the stream was already at an EOF character, otherwise
the number of lines read (this is useful for maintaining
a line number counter which doesn't combine lines with '\')
pango_skip_space ()
pango_skip_space
gboolean
pango_skip_space (const char **pos);
pango_skip_space has been deprecated since version 1.38 and should not be used in newly-written code.
Skips 0 or more characters of white space.
Parameters
pos
in/out string position.
[inout]
Returns
FALSE if skipping the white space leaves
the position at a '\0' character.
pango_scan_word ()
pango_scan_word
gboolean
pango_scan_word (const char **pos,
GString *out);
pango_scan_word has been deprecated since version 1.38 and should not be used in newly-written code.
Scans a word into a GString buffer. A word consists
of [A-Za-z_] followed by zero or more [A-Za-z_0-9]
Leading white space is skipped.
Parameters
pos
in/out string position.
[inout]
out
a GString into which to write the result
Returns
FALSE if a parse error occurred.
pango_scan_string ()
pango_scan_string
gboolean
pango_scan_string (const char **pos,
GString *out);
pango_scan_string has been deprecated since version 1.38 and should not be used in newly-written code.
Scans a string into a GString buffer. The string may either
be a sequence of non-white-space characters, or a quoted
string with '"'. Instead a quoted string, '\"' represents
a literal quote. Leading white space outside of quotes is skipped.
Parameters
pos
in/out string position.
[inout]
out
a GString into which to write the result
Returns
FALSE if a parse error occurred.
pango_scan_int ()
pango_scan_int
gboolean
pango_scan_int (const char **pos,
int *out);
pango_scan_int has been deprecated since version 1.38 and should not be used in newly-written code.
Scans an integer.
Leading white space is skipped.
Parameters
pos
in/out string position.
[inout]
out
an int into which to write the result.
[out]
Returns
FALSE if a parse error occurred.
pango_parse_enum ()
pango_parse_enumpango_parse_enum
gboolean
pango_parse_enum (GType type,
const char *str,
int *value,
gboolean warn,
char **possible_values);
pango_parse_enum has been deprecated since version 1.38 and should not be used in newly-written code.
Parses an enum type and stores the result in value
.
If str
does not match the nick name of any of the possible values for the
enum and is not an integer, FALSE is returned, a warning is issued
if warn
is TRUE, and a
string representing the list of possible values is stored in
possible_values
. The list is slash-separated, eg.
"none/start/middle/end". If failed and possible_values
is not NULL,
returned string should be freed using g_free().
Parameters
type
enum type to parse, eg. PANGO_TYPE_ELLIPSIZE_MODE.
str
string to parse. May be NULL.
[allow-none]
value
integer to store the result in, or NULL.
[out][allow-none]
warn
if TRUE, issue a g_warning() on bad input.
possible_values
place to store list of possible values on failure, or NULL.
[out][allow-none]
Returns
TRUE if str
was successfully parsed.
Since: 1.16
pango_parse_style ()
pango_parse_style
gboolean
pango_parse_style (const char *str,
PangoStyle *style,
gboolean warn);
Parses a font style. The allowed values are "normal",
"italic" and "oblique", case variations being
ignored.
Parameters
str
a string to parse.
style
a PangoStyle to store the result
in.
[out]
warn
if TRUE, issue a g_warning() on bad input.
Returns
TRUE if str
was successfully parsed.
pango_parse_variant ()
pango_parse_variant
gboolean
pango_parse_variant (const char *str,
PangoVariant *variant,
gboolean warn);
Parses a font variant. The allowed values are "normal"
and "smallcaps" or "small_caps", case variations being
ignored.
Parameters
str
a string to parse.
variant
a PangoVariant to store the
result in.
[out]
warn
if TRUE, issue a g_warning() on bad input.
Returns
TRUE if str
was successfully parsed.
pango_parse_weight ()
pango_parse_weight
gboolean
pango_parse_weight (const char *str,
PangoWeight *weight,
gboolean warn);
Parses a font weight. The allowed values are "heavy",
"ultrabold", "bold", "normal", "light", "ultraleight"
and integers. Case variations are ignored.
Parameters
str
a string to parse.
weight
a PangoWeight to store the result
in.
[out]
warn
if TRUE, issue a g_warning() on bad input.
Returns
TRUE if str
was successfully parsed.
pango_parse_stretch ()
pango_parse_stretch
gboolean
pango_parse_stretch (const char *str,
PangoStretch *stretch,
gboolean warn);
Parses a font stretch. The allowed values are
"ultra_condensed", "extra_condensed", "condensed",
"semi_condensed", "normal", "semi_expanded", "expanded",
"extra_expanded" and "ultra_expanded". Case variations are
ignored and the '_' characters may be omitted.
Parameters
str
a string to parse.
stretch
a PangoStretch to store the
result in.
[out]
warn
if TRUE, issue a g_warning() on bad input.
Returns
TRUE if str
was successfully parsed.
pango_log2vis_get_embedding_levels ()
pango_log2vis_get_embedding_levels
guint8 *
pango_log2vis_get_embedding_levels (const gchar *text,
int length,
PangoDirection *pbase_dir);
This will return the bidirectional embedding levels of the input paragraph
as defined by the Unicode Bidirectional Algorithm available at:
http://www.unicode.org/reports/tr9/
If the input base direction is a weak direction, the direction of the
characters in the text will determine the final resolved direction.
Parameters
text
the text to itemize.
length
the number of bytes (not characters) to process, or -1
if text
is nul-terminated and the length should be calculated.
pbase_dir
input base direction, and output resolved direction.
Returns
a newly allocated array of embedding levels, one item per
character (not byte), that should be freed using g_free.
Since: 1.4
pango_is_zero_width ()
pango_is_zero_width
gboolean
pango_is_zero_width (gunichar ch);
Checks ch
to see if it is a character that should not be
normally rendered on the screen. This includes all Unicode characters
with "ZERO WIDTH" in their name, as well as bidi formatting characters, and
a few other ones. This is totally different from g_unichar_iszerowidth()
and is at best misnamed.
Parameters
ch
a Unicode character
Returns
TRUE if ch
is a zero-width character, FALSE otherwise
Since: 1.10
pango_quantize_line_geometry ()
pango_quantize_line_geometry
void
pango_quantize_line_geometry (int *thickness,
int *position);
Quantizes the thickness and position of a line, typically an
underline or strikethrough, to whole device pixels, that is integer
multiples of PANGO_SCALE. The purpose of this function is to avoid
such lines looking blurry.
Care is taken to make sure thickness
is at least one pixel when this
function returns, but returned position
may become zero as a result
of rounding.
Parameters
thickness
pointer to the thickness of a line, in Pango units.
[inout]
position
corresponding position.
[inout]
Since: 1.12
docs/xml/pango-version.xml 0000664 0001750 0001750 00000077075 13751777750 016012 0 ustar mclasen mclasen
]>
Version Checking
3
PANGO Library
Version Checking
Tools for checking Pango version at compile- and run-time.
Functions
#definePANGO_VERSION_ENCODE()
#definePANGO_VERSION_CHECK()
int
pango_version ()
const char *
pango_version_string ()
const char *
pango_version_check ()
Types and Values
#definePANGO_VERSION
#definePANGO_VERSION_MAJOR
#definePANGO_VERSION_MINOR
#definePANGO_VERSION_MICRO
#definePANGO_VERSION_STRING
#definePANGO_VERSION_1_2
#definePANGO_VERSION_1_4
#definePANGO_VERSION_1_6
#definePANGO_VERSION_1_8
#definePANGO_VERSION_1_10
#definePANGO_VERSION_1_12
#definePANGO_VERSION_1_14
#definePANGO_VERSION_1_16
#definePANGO_VERSION_1_18
#definePANGO_VERSION_1_20
#definePANGO_VERSION_1_22
#definePANGO_VERSION_1_24
#definePANGO_VERSION_1_26
#definePANGO_VERSION_1_28
#definePANGO_VERSION_1_30
#definePANGO_VERSION_1_32
#definePANGO_VERSION_1_34
#definePANGO_VERSION_1_36
#definePANGO_VERSION_1_38
#definePANGO_VERSION_1_40
#definePANGO_VERSION_1_42
#definePANGO_VERSION_1_44
#definePANGO_VERSION_MIN_REQUIRED
#definePANGO_VERSION_MAX_ALLOWED
Description
The capital-letter macros defined here can be used to check the version of Pango
at compile-time, and to encode Pango versions into integers.
The functions can be used to check the version of the linked Pango library at run-time.
Functions
PANGO_VERSION_ENCODE()
PANGO_VERSION_ENCODE
#define PANGO_VERSION_ENCODE(major, minor, micro)
This macro encodes the given Pango version into an integer. The numbers
returned by PANGO_VERSION and pango_version() are encoded using this macro.
Two encoded version numbers can be compared as integers.
Parameters
major
the major component of the version number
minor
the minor component of the version number
micro
the micro component of the version number
PANGO_VERSION_CHECK()
PANGO_VERSION_CHECK
#define PANGO_VERSION_CHECK(major,minor,micro)
Checks that the version of Pango available at compile-time is not older than
the provided version number.
Parameters
major
the major component of the version number
minor
the minor component of the version number
micro
the micro component of the version number
pango_version ()
pango_version
int
pango_version (void);
This is similar to the macro PANGO_VERSION except that
it returns the encoded version of Pango available at run-time,
as opposed to the version available at compile-time.
A version number can be encoded into an integer using
PANGO_VERSION_ENCODE().
Returns
The encoded version of Pango library
available at run time.
Since: 1.16
pango_version_string ()
pango_version_string
const char *
pango_version_string (void);
This is similar to the macro PANGO_VERSION_STRING except that
it returns the version of Pango available at run-time, as opposed to
the version available at compile-time.
Returns
A string containing the version of Pango library
available at run time.
The returned string is owned by Pango and should not be modified
or freed.
Since: 1.16
pango_version_check ()
pango_version_check
const char *
pango_version_check (int required_major,
int required_minor,
int required_micro);
Checks that the Pango library in use is compatible with the
given version. Generally you would pass in the constants
PANGO_VERSION_MAJOR, PANGO_VERSION_MINOR, PANGO_VERSION_MICRO
as the three arguments to this function; that produces
a check that the library in use at run-time is compatible with
the version of Pango the application or module was compiled against.
Compatibility is defined by two things: first the version
of the running library is newer than the version
required_major.required_minor
.required_micro
. Second
the running library must be binary compatible with the
version required_major.required_minor
.required_micro
(same major version.)
For compile-time version checking use PANGO_VERSION_CHECK().
Parameters
required_major
the required major version.
required_minor
the required minor version.
required_micro
the required major version.
Returns
NULL if the Pango library is compatible
with the given version, or a string describing the version
mismatch. The returned string is owned by Pango and should not
be modified or freed.
[nullable]
Since: 1.16
Types and Values
PANGO_VERSION
PANGO_VERSION
#define PANGO_VERSION
The version of Pango available at compile-time, encoded using PANGO_VERSION_ENCODE().
PANGO_VERSION_MAJOR
PANGO_VERSION_MAJOR
#define PANGO_VERSION_MAJOR 1
The major component of the version of Pango available at compile-time.
PANGO_VERSION_MINOR
PANGO_VERSION_MINOR
#define PANGO_VERSION_MINOR 48
The minor component of the version of Pango available at compile-time.
PANGO_VERSION_MICRO
PANGO_VERSION_MICRO
#define PANGO_VERSION_MICRO 0
The micro component of the version of Pango available at compile-time.
PANGO_VERSION_STRING
PANGO_VERSION_STRING
#define PANGO_VERSION_STRING "1.48.0"
A string literal containing the version of Pango available at compile-time.
PANGO_VERSION_1_2
PANGO_VERSION_1_2
#define PANGO_VERSION_1_2 (G_ENCODE_VERSION (1, 2))
A macro that evaluates to the 1.2 version of Pango, in a format
that can be used by the C pre-processor.
Since: 1.42
PANGO_VERSION_1_4
PANGO_VERSION_1_4
#define PANGO_VERSION_1_4 (G_ENCODE_VERSION (1, 4))
A macro that evaluates to the 1.4 version of Pango, in a format
that can be used by the C pre-processor.
Since: 1.42
PANGO_VERSION_1_6
PANGO_VERSION_1_6
#define PANGO_VERSION_1_6 (G_ENCODE_VERSION (1, 6))
A macro that evaluates to the 1.6 version of Pango, in a format
that can be used by the C pre-processor.
Since: 1.42
PANGO_VERSION_1_8
PANGO_VERSION_1_8
#define PANGO_VERSION_1_8 (G_ENCODE_VERSION (1, 8))
A macro that evaluates to the 1.8 version of Pango, in a format
that can be used by the C pre-processor.
Since: 1.42
PANGO_VERSION_1_10
PANGO_VERSION_1_10
#define PANGO_VERSION_1_10 (G_ENCODE_VERSION (1, 10))
A macro that evaluates to the 1.10 version of Pango, in a format
that can be used by the C pre-processor.
Since: 1.42
PANGO_VERSION_1_12
PANGO_VERSION_1_12
#define PANGO_VERSION_1_12 (G_ENCODE_VERSION (1, 12))
A macro that evaluates to the 1.12 version of Pango, in a format
that can be used by the C pre-processor.
Since: 1.42
PANGO_VERSION_1_14
PANGO_VERSION_1_14
#define PANGO_VERSION_1_14 (G_ENCODE_VERSION (1, 14))
A macro that evaluates to the 1.14 version of Pango, in a format
that can be used by the C pre-processor.
Since: 1.42
PANGO_VERSION_1_16
PANGO_VERSION_1_16
#define PANGO_VERSION_1_16 (G_ENCODE_VERSION (1, 16))
A macro that evaluates to the 1.16 version of Pango, in a format
that can be used by the C pre-processor.
Since: 1.42
PANGO_VERSION_1_18
PANGO_VERSION_1_18
#define PANGO_VERSION_1_18 (G_ENCODE_VERSION (1, 18))
A macro that evaluates to the 1.18 version of Pango, in a format
that can be used by the C pre-processor.
Since: 1.42
PANGO_VERSION_1_20
PANGO_VERSION_1_20
#define PANGO_VERSION_1_20 (G_ENCODE_VERSION (1, 20))
A macro that evaluates to the 1.20 version of Pango, in a format
that can be used by the C pre-processor.
Since: 1.42
PANGO_VERSION_1_22
PANGO_VERSION_1_22
#define PANGO_VERSION_1_22 (G_ENCODE_VERSION (1, 22))
A macro that evaluates to the 1.22 version of Pango, in a format
that can be used by the C pre-processor.
Since: 1.42
PANGO_VERSION_1_24
PANGO_VERSION_1_24
#define PANGO_VERSION_1_24 (G_ENCODE_VERSION (1, 24))
A macro that evaluates to the 1.24 version of Pango, in a format
that can be used by the C pre-processor.
Since: 1.42
PANGO_VERSION_1_26
PANGO_VERSION_1_26
#define PANGO_VERSION_1_26 (G_ENCODE_VERSION (1, 26))
A macro that evaluates to the 1.26 version of Pango, in a format
that can be used by the C pre-processor.
Since: 1.42
PANGO_VERSION_1_28
PANGO_VERSION_1_28
#define PANGO_VERSION_1_28 (G_ENCODE_VERSION (1, 28))
A macro that evaluates to the 1.28 version of Pango, in a format
that can be used by the C pre-processor.
Since: 1.42
PANGO_VERSION_1_30
PANGO_VERSION_1_30
#define PANGO_VERSION_1_30 (G_ENCODE_VERSION (1, 30))
A macro that evaluates to the 1.30 version of Pango, in a format
that can be used by the C pre-processor.
Since: 1.42
PANGO_VERSION_1_32
PANGO_VERSION_1_32
#define PANGO_VERSION_1_32 (G_ENCODE_VERSION (1, 32))
A macro that evaluates to the 1.32 version of Pango, in a format
that can be used by the C pre-processor.
Since: 1.42
PANGO_VERSION_1_34
PANGO_VERSION_1_34
#define PANGO_VERSION_1_34 (G_ENCODE_VERSION (1, 34))
A macro that evaluates to the 1.34 version of Pango, in a format
that can be used by the C pre-processor.
Since: 1.42
PANGO_VERSION_1_36
PANGO_VERSION_1_36
#define PANGO_VERSION_1_36 (G_ENCODE_VERSION (1, 36))
A macro that evaluates to the 1.36 version of Pango, in a format
that can be used by the C pre-processor.
Since: 1.42
PANGO_VERSION_1_38
PANGO_VERSION_1_38
#define PANGO_VERSION_1_38 (G_ENCODE_VERSION (1, 38))
A macro that evaluates to the 1.38 version of Pango, in a format
that can be used by the C pre-processor.
Since: 1.42
PANGO_VERSION_1_40
PANGO_VERSION_1_40
#define PANGO_VERSION_1_40 (G_ENCODE_VERSION (1, 40))
A macro that evaluates to the 1.40 version of Pango, in a format
that can be used by the C pre-processor.
Since: 1.42
PANGO_VERSION_1_42
PANGO_VERSION_1_42
#define PANGO_VERSION_1_42 (G_ENCODE_VERSION (1, 42))
A macro that evaluates to the 1.42 version of Pango, in a format
that can be used by the C pre-processor.
Since: 1.42
PANGO_VERSION_1_44
PANGO_VERSION_1_44
#define PANGO_VERSION_1_44 (G_ENCODE_VERSION (1, 44))
A macro that evaluates to the 1.44 version of Pango, in a format
that can be used by the C pre-processor.
Since: 1.44
PANGO_VERSION_MIN_REQUIRED
PANGO_VERSION_MIN_REQUIRED
# define PANGO_VERSION_MIN_REQUIRED (PANGO_VERSION_CUR_STABLE)
A macro that should be defined by the user prior to including
the pango.h header.
The definition should be one of the predefined Pango version
macros: PANGO_VERSION_1_2, PANGO_VERSION_1_4,...
This macro defines the earliest version of Pango that the package is
required to be able to compile against.
If the compiler is configured to warn about the use of deprecated
functions, then using functions that were deprecated in version
PANGO_VERSION_MIN_REQUIRED or earlier will cause warnings (but
using functions deprecated in later releases will not).
Since: 1.42
PANGO_VERSION_MAX_ALLOWED
PANGO_VERSION_MAX_ALLOWED
# define PANGO_VERSION_MAX_ALLOWED (PANGO_VERSION_CUR_STABLE)
A macro that should be defined by the user prior to including
the glib.h header.
The definition should be one of the predefined Pango version
macros: PANGO_VERSION_1_2, PANGO_VERSION_1_4,...
This macro defines the latest version of the Pango API that the
package is allowed to make use of.
If the compiler is configured to warn about the use of deprecated
functions, then using functions added after version
PANGO_VERSION_MAX_ALLOWED will cause warnings.
Unless you are using PANGO_CHECK_VERSION() or the like to compile
different code depending on the Pango version, then this should be
set to the same value as PANGO_VERSION_MIN_REQUIRED.
Since: 1.42
docs/xml/vertical.xml 0000664 0001750 0001750 00000064477 13751777750 015036 0 ustar mclasen mclasen
]>
Vertical Text
3
PANGO Library
Vertical Text
Laying text out in vertical directions
Functions
#definePANGO_GRAVITY_IS_IMPROPER()
#definePANGO_GRAVITY_IS_VERTICAL()
PangoGravity
pango_gravity_get_for_matrix ()
PangoGravity
pango_gravity_get_for_script ()
PangoGravity
pango_gravity_get_for_script_and_width ()
double
pango_gravity_to_rotation ()
Types and Values
enumPangoGravity
enumPangoGravityHint
Object Hierarchy
GEnum
├── PangoGravity
╰── PangoGravityHint
Description
Since 1.16, Pango is able to correctly lay vertical text out. In fact, it can
set layouts of mixed vertical and non-vertical text. This section describes
the types used for setting vertical text parameters.
The way this is implemented is through the concept of
gravity. Gravity of normal Latin text is south. A
gravity value of east means that glyphs will be rotated ninety degrees
counterclockwise. So, to render vertical text one needs to set the gravity
and rotate the layout using the matrix machinery already in place. This has
the huge advantage that most algorithms working on a PangoLayout do not need
any change as the assumption that lines run in the X direction and stack in
the Y direction holds even for vertical text layouts.
Applications should only need to set base gravity on PangoContext in use, and
let Pango decide the gravity assigned to each run of text. This automatically
handles text with mixed scripts. A very common use is to set the context base
gravity to auto using pango_context_set_base_gravity()
and rotate the layout normally. Pango will make sure that
Asian languages take the right form, while other scripts are rotated normally.
The correct way to set gravity on a layout is to set it on the context
associated with it using pango_context_set_base_gravity(). The context
of a layout can be accessed using pango_layout_get_context(). The currently
set base gravity of the context can be accessed using
pango_context_get_base_gravity() and the resolved
gravity of it using pango_context_get_gravity(). The resolved gravity is
the same as the base gravity for the most part, except that if the base
gravity is set to PANGO_GRAVITY_AUTO, the resolved gravity will depend
on the current matrix set on context, and is derived using
pango_gravity_get_for_matrix().
The next thing an application may want to set on the context is the
gravity hint. A PangoGravityHint instructs how
different scripts should react to the set base gravity.
Font descriptions have a gravity property too, that can be set using
pango_font_description_set_gravity() and accessed using
pango_font_description_get_gravity(). However, those are rarely useful
from application code and are mainly used by PangoLayout internally.
Last but not least, one can create PangoAttributes for gravity
and gravity hint using pango_attr_gravity_new() and
pango_attr_gravity_hint_new().
Functions
PANGO_GRAVITY_IS_IMPROPER()
PANGO_GRAVITY_IS_IMPROPER
#define PANGO_GRAVITY_IS_IMPROPER(gravity)
Whether a PangoGravity represents a gravity that results in reversal of text direction.
Parameters
gravity
the PangoGravity to check
Returns
TRUE if gravity
is PANGO_GRAVITY_WEST or PANGO_GRAVITY_NORTH,
FALSE otherwise.
Since: 1.32
PANGO_GRAVITY_IS_VERTICAL()
PANGO_GRAVITY_IS_VERTICAL
#define PANGO_GRAVITY_IS_VERTICAL(gravity)
Whether a PangoGravity represents vertical writing directions.
Parameters
gravity
the PangoGravity to check
Returns
TRUE if gravity
is PANGO_GRAVITY_EAST or PANGO_GRAVITY_WEST,
FALSE otherwise.
Since: 1.16
pango_gravity_get_for_matrix ()
pango_gravity_get_for_matrix
PangoGravity
pango_gravity_get_for_matrix (const PangoMatrix *matrix);
Finds the gravity that best matches the rotation component
in a PangoMatrix.
Parameters
matrix
a PangoMatrix.
[nullable]
Returns
the gravity of matrix
, which will never be
PANGO_GRAVITY_AUTO, or PANGO_GRAVITY_SOUTH if matrix
is NULL
Since: 1.16
pango_gravity_get_for_script ()
pango_gravity_get_for_script
PangoGravity
pango_gravity_get_for_script (PangoScript script,
PangoGravity base_gravity,
PangoGravityHint hint);
Based on the script, base gravity, and hint, returns actual gravity
to use in laying out a single PangoItem.
If base_gravity
is PANGO_GRAVITY_AUTO, it is first replaced with the
preferred gravity of script
. To get the preferred gravity of a script,
pass PANGO_GRAVITY_AUTO and PANGO_GRAVITY_HINT_STRONG in.
Parameters
script
PangoScript to query
base_gravity
base gravity of the paragraph
hint
orientation hint
Returns
resolved gravity suitable to use for a run of text
with script
.
Since: 1.16
pango_gravity_get_for_script_and_width ()
pango_gravity_get_for_script_and_width
PangoGravity
pango_gravity_get_for_script_and_width
(PangoScript script,
gboolean wide,
PangoGravity base_gravity,
PangoGravityHint hint);
Based on the script, East Asian width, base gravity, and hint,
returns actual gravity to use in laying out a single character
or PangoItem.
This function is similar to pango_gravity_get_for_script() except
that this function makes a distinction between narrow/half-width and
wide/full-width characters also. Wide/full-width characters always
stand upright, that is, they always take the base gravity,
whereas narrow/full-width characters are always rotated in vertical
context.
If base_gravity
is PANGO_GRAVITY_AUTO, it is first replaced with the
preferred gravity of script
.
Parameters
script
PangoScript to query
wide
TRUE for wide characters as returned by g_unichar_iswide()
base_gravity
base gravity of the paragraph
hint
orientation hint
Returns
resolved gravity suitable to use for a run of text
with script
and wide
.
Since: 1.26
pango_gravity_to_rotation ()
pango_gravity_to_rotation
double
pango_gravity_to_rotation (PangoGravity gravity);
Converts a PangoGravity value to its natural rotation in radians.
gravity
should not be PANGO_GRAVITY_AUTO.
Note that pango_matrix_rotate() takes angle in degrees, not radians.
So, to call pango_matrix_rotate() with the output of this function
you should multiply it by (180. / G_PI).
Parameters
gravity
gravity to query
Returns
the rotation value corresponding to gravity
.
Since: 1.16
Types and Values
enum PangoGravity
PangoGravity
The PangoGravity type represents the orientation of glyphs in a segment
of text. This is useful when rendering vertical text layouts. In
those situations, the layout is rotated using a non-identity PangoMatrix,
and then glyph orientation is controlled using PangoGravity.
Not every value in this enumeration makes sense for every usage of
PangoGravity; for example, PANGO_GRAVITY_AUTO only can be passed to
pango_context_set_base_gravity() and can only be returned by
pango_context_get_base_gravity().
See also: PangoGravityHint
Members
PANGO_GRAVITY_SOUTH
Glyphs stand upright (default)
PANGO_GRAVITY_EAST
Glyphs are rotated 90 degrees clockwise
PANGO_GRAVITY_NORTH
Glyphs are upside-down
PANGO_GRAVITY_WEST
Glyphs are rotated 90 degrees counter-clockwise
PANGO_GRAVITY_AUTO
Gravity is resolved from the context matrix
Since: 1.16
enum PangoGravityHint
PangoGravityHint
The PangoGravityHint defines how horizontal scripts should behave in a
vertical context. That is, English excerpt in a vertical paragraph for
example.
See PangoGravity.
Members
PANGO_GRAVITY_HINT_NATURAL
scripts will take their natural gravity based
on the base gravity and the script. This is the default.
PANGO_GRAVITY_HINT_STRONG
always use the base gravity set, regardless of
the script.
PANGO_GRAVITY_HINT_LINE
for scripts not in their natural direction (eg.
Latin in East gravity), choose per-script gravity such that every script
respects the line progression. This means, Latin and Arabic will take
opposite gravities and both flow top-to-bottom for example.
Since: 1.16
See Also
pango_context_get_base_gravity(),
pango_context_set_base_gravity(),
pango_context_get_gravity(),
pango_context_get_gravity_hint(),
pango_context_set_gravity_hint(),
pango_font_description_set_gravity(),
pango_font_description_get_gravity(),
pango_attr_gravity_new(),
pango_attr_gravity_hint_new()
docs/xml/bidi.xml 0000664 0001750 0001750 00000055405 13751777750 014123 0 ustar mclasen mclasen
]>
Bidirectional Text
3
PANGO Library
Bidirectional Text
Types and functions for bidirectional text
Functions
PangoDirection
pango_unichar_direction ()
PangoDirection
pango_find_base_dir ()
gboolean
pango_get_mirror_char ()
PangoBidiType
pango_bidi_type_for_unichar ()
Types and Values
enumPangoDirection
enumPangoBidiType
Object Hierarchy
GEnum
├── PangoBidiType
╰── PangoDirection
Description
Pango supports bidirectional text (like Arabic and Hebrew) automatically.
Some applications however, need some help to correctly handle bidirectional text.
The PangoDirection type can be used with pango_context_set_base_dir() to
instruct Pango about direction of text, though in most cases Pango detects
that correctly and automatically. The rest of the facilities in this section
are used internally by Pango already, and are provided to help applications
that need more direct control over bidirectional setting of text.
Functions
pango_unichar_direction ()
pango_unichar_direction
PangoDirection
pango_unichar_direction (gunichar ch);
pango_unichar_direction is deprecated and should not be used in newly-written code.
Determines the inherent direction of a character; either
PANGO_DIRECTION_LTR, PANGO_DIRECTION_RTL, or
PANGO_DIRECTION_NEUTRAL.
This function is useful to categorize characters into left-to-right
letters, right-to-left letters, and everything else. If full
Unicode bidirectional type of a character is needed,
pango_bidi_type_for_unichar() can be used instead.
Parameters
ch
a Unicode character
Returns
the direction of the character.
pango_find_base_dir ()
pango_find_base_dirpango_find_base_dir
PangoDirection
pango_find_base_dir (const gchar *text,
gint length);
pango_find_base_dir is deprecated and should not be used in newly-written code.
Searches a string the first character that has a strong
direction, according to the Unicode bidirectional algorithm.
Parameters
text
the text to process. Must be valid UTF-8
length
length of text
in bytes (may be -1 if text
is nul-terminated)
Returns
The direction corresponding to the first strong character.
If no such character is found, then PANGO_DIRECTION_NEUTRAL is returned.
Since: 1.4
pango_get_mirror_char ()
pango_get_mirror_char
gboolean
pango_get_mirror_char (gunichar ch,
gunichar *mirrored_ch);
pango_get_mirror_char is deprecated and should not be used in newly-written code.
If ch
has the Unicode mirrored property and there is another Unicode
character that typically has a glyph that is the mirror image of ch
's
glyph, puts that character in the address pointed to by mirrored_ch
.
Use g_unichar_get_mirror_char() instead; the docs for that function
provide full details.
Parameters
ch
a Unicode character
mirrored_ch
location to store the mirrored character
Returns
TRUE if ch
has a mirrored character and mirrored_ch
is
filled in, FALSE otherwise
pango_bidi_type_for_unichar ()
pango_bidi_type_for_unicharpango_bidi_type_for_unichar
PangoBidiType
pango_bidi_type_for_unichar (gunichar ch);
pango_bidi_type_for_unichar is deprecated and should not be used in newly-written code.
Determines the normative bidirectional character type of a
character, as specified in the Unicode Character Database.
A simplified version of this function is available as
pango_unichar_direction().
Parameters
ch
a Unicode character
Returns
the bidirectional character type, as used in the
Unicode bidirectional algorithm.
Since: 1.22
Types and Values
enum PangoDirection
PangoDirection
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; on the other hand
PANGO_DIRECTION_NEUTRAL doesn't make sense to pass
to pango_itemize_with_base_dir().
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 PangoGravity for how
vertical text is handled in Pango.
If you are interested in text direction, you should
really use fribidi directly. PangoDirection is only
retained because it is used in some public apis.
Members
PANGO_DIRECTION_LTR
A strong left-to-right direction
PANGO_DIRECTION_RTL
A strong right-to-left direction
PANGO_DIRECTION_TTB_LTR
Deprecated value; treated the
same as PANGO_DIRECTION_RTL.
PANGO_DIRECTION_TTB_RTL
Deprecated value; treated the
same as PANGO_DIRECTION_LTR
PANGO_DIRECTION_WEAK_LTR
A weak left-to-right direction
PANGO_DIRECTION_WEAK_RTL
A weak right-to-left direction
PANGO_DIRECTION_NEUTRAL
No direction specified
enum PangoBidiType
PangoBidiTypePangoBidiType
PangoBidiType has been deprecated since version 1.44 and should not be used in newly-written code. Use fribidi for this information
The PangoBidiType type represents the bidirectional character
type of a Unicode character as specified by the
Unicode bidirectional algorithm.
Members
PANGO_BIDI_TYPE_L
Left-to-Right
PANGO_BIDI_TYPE_LRE
Left-to-Right Embedding
PANGO_BIDI_TYPE_LRO
Left-to-Right Override
PANGO_BIDI_TYPE_R
Right-to-Left
PANGO_BIDI_TYPE_AL
Right-to-Left Arabic
PANGO_BIDI_TYPE_RLE
Right-to-Left Embedding
PANGO_BIDI_TYPE_RLO
Right-to-Left Override
PANGO_BIDI_TYPE_PDF
Pop Directional Format
PANGO_BIDI_TYPE_EN
European Number
PANGO_BIDI_TYPE_ES
European Number Separator
PANGO_BIDI_TYPE_ET
European Number Terminator
PANGO_BIDI_TYPE_AN
Arabic Number
PANGO_BIDI_TYPE_CS
Common Number Separator
PANGO_BIDI_TYPE_NSM
Nonspacing Mark
PANGO_BIDI_TYPE_BN
Boundary Neutral
PANGO_BIDI_TYPE_B
Paragraph Separator
PANGO_BIDI_TYPE_S
Segment Separator
PANGO_BIDI_TYPE_WS
Whitespace
PANGO_BIDI_TYPE_ON
Other Neutrals
Since: 1.22
See Also
pango_context_get_base_dir(),
pango_context_set_base_dir(),
pango_itemize_with_base_dir()
docs/xml/pango-doc.top 0000664 0001750 0001750 00000000000 13751777750 015042 0 ustar mclasen mclasen docs/xml/pango-doc.bottom 0000664 0001750 0001750 00000002317 13751777750 015561 0 ustar mclasen mclasen
docs/xml/tree_index.sgml 0000664 0001750 0001750 00000016305 13751777750 015500 0 ustar mclasen mclasen
]>
GObject
├── PangoFont
│ ╰── PangoFcFont
│ ╰── PangoXftFont
├── PangoFontMap
│ ╰── PangoFcFontMap
│ ├── PangoFT2FontMap
│ ╰── PangoXftFontMap
├── PangoRenderer
│ ╰── PangoXftRenderer
├── PangoContext
├── PangoCoverage
├── PangoEngine
│ ├── PangoEngineLang
│ ╰── PangoEngineShape
├── PangoFcDecoder
├── PangoFontFace
├── PangoFontFamily
├── PangoFontset
├── PangoLayout
├── PangoOTInfo
╰── PangoOTRuleset
GInterface
├── PangoCairoFont
╰── PangoCairoFontMap
GEnum
├── PangoAlignment
├── PangoAttrType
├── PangoBidiType
├── PangoCoverageLevel
├── PangoDirection
├── PangoEllipsizeMode
├── PangoGravity
├── PangoGravityHint
├── PangoRenderPart
├── PangoScript
├── PangoStretch
├── PangoStyle
├── PangoTabAlign
├── PangoUnderline
├── PangoVariant
├── PangoWeight
╰── PangoWrapMode
GBoxed
├── PangoAttrIterator
├── PangoAttrList
├── PangoAttribute
├── PangoColor
├── PangoFontDescription
├── PangoFontMetrics
├── PangoGlyphItem
├── PangoGlyphItemIter
├── PangoGlyphString
├── PangoItem
├── PangoLanguage
├── PangoLayoutIter
├── PangoLayoutLine
├── PangoMatrix
├── PangoScriptIter
╰── PangoTabArray
GFlags
├── PangoFontMask
├── PangoShapeFlags
╰── PangoShowFlags
docs/xml/object_index.sgml 0000664 0001750 0001750 00000011570 13751777750 016006 0 ustar mclasen mclasen
]>
GBoxed
GEnum
GFlags
GInterface
GObject
PangoAlignment
PangoAttrIterator
PangoAttrList
PangoAttrType
PangoAttribute
PangoBidiType
PangoCairoFont
PangoCairoFontMap
PangoColor
PangoContext
PangoCoverage
PangoCoverageLevel
PangoDirection
PangoEllipsizeMode
PangoEngine
PangoEngineLang
PangoEngineShape
PangoFT2FontMap
PangoFcDecoder
PangoFcFont
PangoFcFontMap
PangoFont
PangoFontDescription
PangoFontFace
PangoFontFamily
PangoFontMap
PangoFontMask
PangoFontMetrics
PangoFontset
PangoGlyphItem
PangoGlyphItemIter
PangoGlyphString
PangoGravity
PangoGravityHint
PangoItem
PangoLanguage
PangoLayout
PangoLayoutIter
PangoLayoutLine
PangoMatrix
PangoOTInfo
PangoOTRuleset
PangoRenderPart
PangoRenderer
PangoScript
PangoScriptIter
PangoShapeFlags
PangoShowFlags
PangoStretch
PangoStyle
PangoTabAlign
PangoTabArray
PangoUnderline
PangoVariant
PangoWeight
PangoWrapMode
PangoXftFont
PangoXftFontMap
PangoXftRenderer
docs/xml/api-index-full.xml 0000664 0001750 0001750 00000513677 13751777750 016044 0 ustar mclasen mclasen
]>
A
PangoAlignment, enum in Layout Objects
PangoAnalysis, struct in Text Processing
PANGO_ANALYSIS_FLAG_CENTERED_BASELINE, macro in Text Processing
PANGO_ANALYSIS_FLAG_IS_ELLIPSIS, macro in Text Processing
PANGO_ANALYSIS_FLAG_NEED_HYPHEN, macro in Text Processing
PANGO_ASCENT, macro in Glyph Storage
PangoAttrClass, struct in Text Attributes
PangoAttrColor, struct in Text Attributes
PangoAttrDataCopyFunc, user_function in Text Attributes
PangoAttrFilterFunc, user_function in Text Attributes
PangoAttrFloat, struct in Text Attributes
PangoAttrFontDesc, struct in Text Attributes
PangoAttrFontFeatures, struct in Text Attributes
PangoAttribute, struct in Text Attributes
pango_attribute_copy, function in Text Attributes
pango_attribute_destroy, function in Text Attributes
pango_attribute_equal, function in Text Attributes
pango_attribute_init, function in Text Attributes
PangoAttrInt, struct in Text Attributes
PangoAttrIterator, struct in Text Attributes
PangoAttrLanguage, struct in Text Attributes
PangoAttrList, struct in Text Attributes
PangoAttrShape, struct in Text Attributes
PangoAttrSize, struct in Text Attributes
PangoAttrString, struct in Text Attributes
PangoAttrType, enum in Text Attributes
pango_attr_allow_breaks_new, function in Text Attributes
pango_attr_background_alpha_new, function in Text Attributes
pango_attr_background_new, function in Text Attributes
pango_attr_fallback_new, function in Text Attributes
pango_attr_family_new, function in Text Attributes
pango_attr_font_desc_new, function in Text Attributes
pango_attr_font_features_new, function in Text Attributes
pango_attr_foreground_alpha_new, function in Text Attributes
pango_attr_foreground_new, function in Text Attributes
pango_attr_gravity_hint_new, function in Text Attributes
pango_attr_gravity_new, function in Text Attributes
PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING, macro in Text Attributes
PANGO_ATTR_INDEX_TO_TEXT_END, macro in Text Attributes
pango_attr_insert_hyphens_new, function in Text Attributes
pango_attr_iterator_copy, function in Text Attributes
pango_attr_iterator_destroy, function in Text Attributes
pango_attr_iterator_get, function in Text Attributes
pango_attr_iterator_get_attrs, function in Text Attributes
pango_attr_iterator_get_font, function in Text Attributes
pango_attr_iterator_next, function in Text Attributes
pango_attr_iterator_range, function in Text Attributes
pango_attr_language_new, function in Text Attributes
pango_attr_letter_spacing_new, function in Text Attributes
pango_attr_list_change, function in Text Attributes
pango_attr_list_copy, function in Text Attributes
pango_attr_list_equal, function in Text Attributes
pango_attr_list_filter, function in Text Attributes
pango_attr_list_get_attributes, function in Text Attributes
pango_attr_list_get_iterator, function in Text Attributes
pango_attr_list_insert, function in Text Attributes
pango_attr_list_insert_before, function in Text Attributes
pango_attr_list_new, function in Text Attributes
pango_attr_list_ref, function in Text Attributes
pango_attr_list_splice, function in Text Attributes
pango_attr_list_unref, function in Text Attributes
pango_attr_list_update, function in Text Attributes
pango_attr_overline_color_new, function in Text Attributes
pango_attr_overline_new, function in Text Attributes
pango_attr_rise_new, function in Text Attributes
pango_attr_scale_new, function in Text Attributes
pango_attr_shape_new, function in Text Attributes
pango_attr_shape_new_with_data, function in Text Attributes
pango_attr_show_new, function in Text Attributes
pango_attr_size_new, function in Text Attributes
pango_attr_size_new_absolute, function in Text Attributes
pango_attr_stretch_new, function in Text Attributes
pango_attr_strikethrough_color_new, function in Text Attributes
pango_attr_strikethrough_new, function in Text Attributes
pango_attr_style_new, function in Text Attributes
pango_attr_type_get_name, function in Text Attributes
pango_attr_type_register, function in Text Attributes
pango_attr_underline_color_new, function in Text Attributes
pango_attr_underline_new, function in Text Attributes
pango_attr_variant_new, function in Text Attributes
pango_attr_weight_new, function in Text Attributes
B
PangoBidiType, enum in Bidirectional Text
pango_bidi_type_for_unichar, function in Bidirectional Text
pango_break, function in Text Processing
C
PangoCairoFont, struct in Cairo Rendering
PangoCairoFontMap, struct in Cairo Rendering
PangoCairoShapeRendererFunc, user_function in Cairo Rendering
pango_cairo_context_get_font_options, function in Cairo Rendering
pango_cairo_context_get_resolution, function in Cairo Rendering
pango_cairo_context_get_shape_renderer, function in Cairo Rendering
pango_cairo_context_set_font_options, function in Cairo Rendering
pango_cairo_context_set_resolution, function in Cairo Rendering
pango_cairo_context_set_shape_renderer, function in Cairo Rendering
pango_cairo_create_context, function in Cairo Rendering
pango_cairo_create_layout, function in Cairo Rendering
pango_cairo_error_underline_path, function in Cairo Rendering
pango_cairo_font_get_scaled_font, function in Cairo Rendering
pango_cairo_font_map_create_context, function in Cairo Rendering
pango_cairo_font_map_get_default, function in Cairo Rendering
pango_cairo_font_map_get_font_type, function in Cairo Rendering
pango_cairo_font_map_get_resolution, function in Cairo Rendering
pango_cairo_font_map_new, function in Cairo Rendering
pango_cairo_font_map_new_for_font_type, function in Cairo Rendering
pango_cairo_font_map_set_default, function in Cairo Rendering
pango_cairo_font_map_set_resolution, function in Cairo Rendering
pango_cairo_glyph_string_path, function in Cairo Rendering
pango_cairo_layout_line_path, function in Cairo Rendering
pango_cairo_layout_path, function in Cairo Rendering
pango_cairo_show_error_underline, function in Cairo Rendering
pango_cairo_show_glyph_item, function in Cairo Rendering
pango_cairo_show_glyph_string, function in Cairo Rendering
pango_cairo_show_layout, function in Cairo Rendering
pango_cairo_show_layout_line, function in Cairo Rendering
pango_cairo_update_context, function in Cairo Rendering
pango_cairo_update_layout, function in Cairo Rendering
PangoColor, struct in Text Attributes
pango_color_copy, function in Text Attributes
pango_color_free, function in Text Attributes
pango_color_parse, function in Text Attributes
pango_color_parse_with_alpha, function in Text Attributes
pango_color_to_string, function in Text Attributes
PangoContext, struct in Contexts
pango_context_changed, function in Contexts
pango_context_get_base_dir, function in Contexts
pango_context_get_base_gravity, function in Contexts
pango_context_get_font_description, function in Contexts
pango_context_get_font_map, function in Contexts
pango_context_get_gravity, function in Contexts
pango_context_get_gravity_hint, function in Contexts
pango_context_get_language, function in Contexts
pango_context_get_matrix, function in Contexts
pango_context_get_metrics, function in Contexts
pango_context_get_round_glyph_positions, function in Contexts
pango_context_get_serial, function in Contexts
pango_context_list_families, function in Contexts
pango_context_load_font, function in Contexts
pango_context_load_fontset, function in Contexts
pango_context_new, function in Contexts
pango_context_set_base_dir, function in Contexts
pango_context_set_base_gravity, function in Contexts
pango_context_set_font_description, function in Contexts
pango_context_set_font_map, function in Contexts
pango_context_set_gravity_hint, function in Contexts
pango_context_set_language, function in Contexts
pango_context_set_matrix, function in Contexts
pango_context_set_round_glyph_positions, function in Contexts
pango_core_text_font_get_ctfont, function in CoreText Fonts
PangoCoverage, struct in Coverage Maps
PangoCoverageLevel, enum in Coverage Maps
pango_coverage_copy, function in Coverage Maps
pango_coverage_from_bytes, function in Coverage Maps
pango_coverage_get, function in Coverage Maps
pango_coverage_max, function in Coverage Maps
pango_coverage_new, function in Coverage Maps
pango_coverage_ref, function in Coverage Maps
pango_coverage_set, function in Coverage Maps
pango_coverage_to_bytes, function in Coverage Maps
pango_coverage_unref, function in Coverage Maps
D
pango_default_break, function in Text Processing
PANGO_DESCENT, macro in Glyph Storage
PangoDirection, enum in Bidirectional Text
E
PangoEllipsizeMode, enum in Layout Objects
PangoEngine, struct in Engines
PangoEngineClass, struct in Engines
PangoEngineInfo, struct in Engines
PangoEngineLang, struct in PangoEngineLang
PangoEngineLangClass, struct in PangoEngineLang
PangoEngineScriptInfo, struct in Engines
PangoEngineShape, struct in PangoEngineShape
PangoEngineShapeClass, struct in PangoEngineShape
PANGO_ENGINE_LANG_DEFINE_TYPE, macro in PangoEngineLang
PANGO_ENGINE_SHAPE_DEFINE_TYPE, macro in PangoEngineShape
PANGO_ENGINE_TYPE_LANG, macro in PangoEngineLang
PANGO_ENGINE_TYPE_SHAPE, macro in PangoEngineShape
pango_extents_to_pixels, function in Glyph Storage
F
PangoFcDecoder, struct in PangoFcDecoder
PangoFcDecoderClass, struct in PangoFcDecoder
PangoFcDecoderFindFunc, user_function in PangoFcFontMap
PangoFcFont, struct in PangoFcFont
PangoFcFont:fontmap, object property in PangoFcFont
PangoFcFont:pattern, object property in PangoFcFont
PangoFcFontClass, struct in PangoFcFont
PangoFcFontMap, struct in PangoFcFontMap
PangoFcFontMapClass, struct in PangoFcFontMap
PangoFcSubstituteFunc, user_function in PangoFcFontMap
pango_fc_decoder_get_charset, function in PangoFcDecoder
pango_fc_decoder_get_glyph, function in PangoFcDecoder
pango_fc_font_description_from_pattern, function in PangoFcFontMap
PANGO_FC_FONT_FEATURES, macro in PangoFcFontMap
pango_fc_font_get_glyph, function in PangoFcFont
pango_fc_font_get_languages, function in PangoFcFont
pango_fc_font_get_pattern, function in PangoFcFont
pango_fc_font_get_unknown_glyph, function in PangoFcFont
pango_fc_font_has_char, function in PangoFcFont
pango_fc_font_kern_glyphs, function in PangoFcFont
pango_fc_font_lock_face, function in PangoFcFont
pango_fc_font_map_add_decoder_find_func, function in PangoFcFontMap
pango_fc_font_map_cache_clear, function in PangoFcFontMap
pango_fc_font_map_config_changed, function in PangoFcFontMap
pango_fc_font_map_create_context, function in PangoFcFontMap
pango_fc_font_map_find_decoder, function in PangoFcFontMap
pango_fc_font_map_get_config, function in PangoFcFontMap
pango_fc_font_map_set_config, function in PangoFcFontMap
pango_fc_font_map_set_default_substitute, function in PangoFcFontMap
pango_fc_font_map_shutdown, function in PangoFcFontMap
pango_fc_font_map_substitute_changed, function in PangoFcFontMap
pango_fc_font_unlock_face, function in PangoFcFont
PANGO_FC_FONT_VARIATIONS, macro in PangoFcFontMap
PANGO_FC_GRAVITY, macro in PangoFcFontMap
PANGO_FC_PRGNAME, macro in PangoFcFontMap
PANGO_FC_VERSION, macro in PangoFcFontMap
pango_find_base_dir, function in Bidirectional Text
pango_find_map, function in Modules
pango_find_paragraph_boundary, function in Text Processing
PangoFont, struct in Fonts
PangoFontDescription, struct in Fonts
PangoFontFace, struct in Fonts
PangoFontFamily, struct in Fonts
PangoFontMap, struct in Fonts
PangoFontMapClass, struct in Fonts
PangoFontMask, enum in Fonts
PangoFontMetrics, struct in Fonts
PangoFontset, struct in Fonts
PangoFontsetClass, struct in Fonts
PangoFontsetForeachFunc, user_function in Fonts
pango_fontset_foreach, function in Fonts
pango_fontset_get_font, function in Fonts
pango_fontset_get_metrics, function in Fonts
pango_font_describe, function in Fonts
pango_font_describe_with_absolute_size, function in Fonts
pango_font_descriptions_free, function in Fonts
pango_font_description_better_match, function in Fonts
pango_font_description_copy, function in Fonts
pango_font_description_copy_static, function in Fonts
pango_font_description_equal, function in Fonts
pango_font_description_free, function in Fonts
pango_font_description_from_string, function in Fonts
pango_font_description_get_family, function in Fonts
pango_font_description_get_gravity, function in Fonts
pango_font_description_get_set_fields, function in Fonts
pango_font_description_get_size, function in Fonts
pango_font_description_get_size_is_absolute, function in Fonts
pango_font_description_get_stretch, function in Fonts
pango_font_description_get_style, function in Fonts
pango_font_description_get_variant, function in Fonts
pango_font_description_get_variations, function in Fonts
pango_font_description_get_weight, function in Fonts
pango_font_description_hash, function in Fonts
pango_font_description_merge, function in Fonts
pango_font_description_merge_static, function in Fonts
pango_font_description_new, function in Fonts
pango_font_description_set_absolute_size, function in Fonts
pango_font_description_set_family, function in Fonts
pango_font_description_set_family_static, function in Fonts
pango_font_description_set_gravity, function in Fonts
pango_font_description_set_size, function in Fonts
pango_font_description_set_stretch, function in Fonts
pango_font_description_set_style, function in Fonts
pango_font_description_set_variant, function in Fonts
pango_font_description_set_variations, function in Fonts
pango_font_description_set_variations_static, function in Fonts
pango_font_description_set_weight, function in Fonts
pango_font_description_to_filename, function in Fonts
pango_font_description_to_string, function in Fonts
pango_font_description_unset_fields, function in Fonts
pango_font_face_describe, function in Fonts
pango_font_face_get_face_name, function in Fonts
pango_font_face_get_family, function in Fonts
pango_font_face_is_synthesized, function in Fonts
pango_font_face_list_sizes, function in Fonts
pango_font_family_get_face, function in Fonts
pango_font_family_get_name, function in Fonts
pango_font_family_is_monospace, function in Fonts
pango_font_family_is_variable, function in Fonts
pango_font_family_list_faces, function in Fonts
pango_font_find_shaper, function in Fonts
pango_font_get_coverage, function in Fonts
pango_font_get_face, function in Fonts
pango_font_get_features, function in Fonts
pango_font_get_font_map, function in Fonts
pango_font_get_glyph_extents, function in Fonts
pango_font_get_hb_font, function in Fonts
pango_font_get_metrics, function in Fonts
pango_font_has_char, function in Fonts
pango_font_map_changed, function in Fonts
pango_font_map_create_context, function in Fonts
pango_font_map_get_family, function in Fonts
pango_font_map_get_serial, function in Fonts
pango_font_map_list_families, function in Fonts
pango_font_map_load_font, function in Fonts
pango_font_map_load_fontset, function in Fonts
pango_font_metrics_get_approximate_char_width, function in Fonts
pango_font_metrics_get_approximate_digit_width, function in Fonts
pango_font_metrics_get_ascent, function in Fonts
pango_font_metrics_get_descent, function in Fonts
pango_font_metrics_get_height, function in Fonts
pango_font_metrics_get_strikethrough_position, function in Fonts
pango_font_metrics_get_strikethrough_thickness, function in Fonts
pango_font_metrics_get_underline_position, function in Fonts
pango_font_metrics_get_underline_thickness, function in Fonts
pango_font_metrics_ref, function in Fonts
pango_font_metrics_unref, function in Fonts
PangoFT2FontMap, struct in FreeType Fonts and Rendering
PangoFT2SubstituteFunc, user_function in FreeType Fonts and Rendering
pango_ft2_font_get_coverage, function in FreeType Fonts and Rendering
pango_ft2_font_get_face, function in FreeType Fonts and Rendering
pango_ft2_font_get_kerning, function in FreeType Fonts and Rendering
pango_ft2_font_map_create_context, function in FreeType Fonts and Rendering
pango_ft2_font_map_for_display, function in FreeType Fonts and Rendering
pango_ft2_font_map_new, function in FreeType Fonts and Rendering
pango_ft2_font_map_set_default_substitute, function in FreeType Fonts and Rendering
pango_ft2_font_map_set_resolution, function in FreeType Fonts and Rendering
pango_ft2_font_map_substitute_changed, function in FreeType Fonts and Rendering
pango_ft2_get_context, function in FreeType Fonts and Rendering
pango_ft2_get_unknown_glyph, function in FreeType Fonts and Rendering
pango_ft2_render, function in FreeType Fonts and Rendering
pango_ft2_render_layout, function in FreeType Fonts and Rendering
pango_ft2_render_layout_line, function in FreeType Fonts and Rendering
pango_ft2_render_layout_line_subpixel, function in FreeType Fonts and Rendering
pango_ft2_render_layout_subpixel, function in FreeType Fonts and Rendering
pango_ft2_render_transformed, function in FreeType Fonts and Rendering
pango_ft2_shutdown_display, function in FreeType Fonts and Rendering
G
pango_get_log_attrs, function in Text Processing
pango_get_mirror_char, function in Bidirectional Text
PANGO_GET_UNKNOWN_GLYPH, macro in Glyph Storage
PangoGlyph, typedef in Glyph Storage
PangoGlyphGeometry, struct in Glyph Storage
PangoGlyphInfo, struct in Glyph Storage
PangoGlyphItem, struct in Glyph Storage
PangoGlyphItemIter, struct in Glyph Storage
PangoGlyphString, struct in Glyph Storage
PangoGlyphUnit, typedef in Glyph Storage
PangoGlyphVisAttr, struct in Glyph Storage
PANGO_GLYPH_EMPTY, macro in Glyph Storage
PANGO_GLYPH_INVALID_INPUT, macro in Glyph Storage
pango_glyph_item_apply_attrs, function in Glyph Storage
pango_glyph_item_copy, function in Glyph Storage
pango_glyph_item_free, function in Glyph Storage
pango_glyph_item_get_logical_widths, function in Glyph Storage
pango_glyph_item_iter_copy, function in Glyph Storage
pango_glyph_item_iter_free, function in Glyph Storage
pango_glyph_item_iter_init_end, function in Glyph Storage
pango_glyph_item_iter_init_start, function in Glyph Storage
pango_glyph_item_iter_next_cluster, function in Glyph Storage
pango_glyph_item_iter_prev_cluster, function in Glyph Storage
pango_glyph_item_letter_space, function in Glyph Storage
pango_glyph_item_split, function in Glyph Storage
pango_glyph_string_copy, function in Glyph Storage
pango_glyph_string_extents, function in Glyph Storage
pango_glyph_string_extents_range, function in Glyph Storage
pango_glyph_string_free, function in Glyph Storage
pango_glyph_string_get_logical_widths, function in Glyph Storage
pango_glyph_string_get_width, function in Glyph Storage
pango_glyph_string_index_to_x, function in Glyph Storage
pango_glyph_string_new, function in Glyph Storage
pango_glyph_string_set_size, function in Glyph Storage
pango_glyph_string_x_to_index, function in Glyph Storage
PANGO_GLYPH_UNKNOWN_FLAG, macro in Glyph Storage
PangoGravity, enum in Vertical Text
PangoGravityHint, enum in Vertical Text
pango_gravity_get_for_matrix, function in Vertical Text
pango_gravity_get_for_script, function in Vertical Text
pango_gravity_get_for_script_and_width, function in Vertical Text
PANGO_GRAVITY_IS_IMPROPER, macro in Vertical Text
PANGO_GRAVITY_IS_VERTICAL, macro in Vertical Text
pango_gravity_to_rotation, function in Vertical Text
I
PangoIncludedModule, struct in Modules
pango_is_zero_width, function in Miscellaneous Utilities
PangoItem, struct in Text Processing
pango_itemize, function in Text Processing
pango_itemize_with_base_dir, function in Text Processing
pango_item_apply_attrs, function in Text Processing
pango_item_copy, function in Text Processing
pango_item_free, function in Text Processing
pango_item_new, function in Text Processing
pango_item_split, function in Text Processing
L
PangoLanguage, struct in Scripts and Languages
pango_language_from_string, function in Scripts and Languages
pango_language_get_default, function in Scripts and Languages
pango_language_get_preferred, function in Scripts and Languages
pango_language_get_sample_string, function in Scripts and Languages
pango_language_get_scripts, function in Scripts and Languages
pango_language_includes_script, function in Scripts and Languages
pango_language_matches, function in Scripts and Languages
pango_language_to_string, function in Scripts and Languages
PangoLayout, struct in Layout Objects
PangoLayoutIter, struct in Layout Objects
PangoLayoutLine, struct in Layout Objects
PangoLayoutRun, typedef in Layout Objects
pango_layout_context_changed, function in Layout Objects
pango_layout_copy, function in Layout Objects
pango_layout_get_alignment, function in Layout Objects
pango_layout_get_attributes, function in Layout Objects
pango_layout_get_auto_dir, function in Layout Objects
pango_layout_get_baseline, function in Layout Objects
pango_layout_get_character_count, function in Layout Objects
pango_layout_get_context, function in Layout Objects
pango_layout_get_cursor_pos, function in Layout Objects
pango_layout_get_direction, function in Layout Objects
pango_layout_get_ellipsize, function in Layout Objects
pango_layout_get_extents, function in Layout Objects
pango_layout_get_font_description, function in Layout Objects
pango_layout_get_height, function in Layout Objects
pango_layout_get_indent, function in Layout Objects
pango_layout_get_iter, function in Layout Objects
pango_layout_get_justify, function in Layout Objects
pango_layout_get_line, function in Layout Objects
pango_layout_get_lines, function in Layout Objects
pango_layout_get_lines_readonly, function in Layout Objects
pango_layout_get_line_count, function in Layout Objects
pango_layout_get_line_readonly, function in Layout Objects
pango_layout_get_line_spacing, function in Layout Objects
pango_layout_get_log_attrs, function in Layout Objects
pango_layout_get_log_attrs_readonly, function in Layout Objects
pango_layout_get_pixel_extents, function in Layout Objects
pango_layout_get_pixel_size, function in Layout Objects
pango_layout_get_serial, function in Layout Objects
pango_layout_get_single_paragraph_mode, function in Layout Objects
pango_layout_get_size, function in Layout Objects
pango_layout_get_spacing, function in Layout Objects
pango_layout_get_tabs, function in Layout Objects
pango_layout_get_text, function in Layout Objects
pango_layout_get_unknown_glyphs_count, function in Layout Objects
pango_layout_get_width, function in Layout Objects
pango_layout_get_wrap, function in Layout Objects
pango_layout_index_to_line_x, function in Layout Objects
pango_layout_index_to_pos, function in Layout Objects
pango_layout_is_ellipsized, function in Layout Objects
pango_layout_is_wrapped, function in Layout Objects
pango_layout_iter_at_last_line, function in Layout Objects
pango_layout_iter_copy, function in Layout Objects
pango_layout_iter_free, function in Layout Objects
pango_layout_iter_get_baseline, function in Layout Objects
pango_layout_iter_get_char_extents, function in Layout Objects
pango_layout_iter_get_cluster_extents, function in Layout Objects
pango_layout_iter_get_index, function in Layout Objects
pango_layout_iter_get_layout, function in Layout Objects
pango_layout_iter_get_layout_extents, function in Layout Objects
pango_layout_iter_get_line, function in Layout Objects
pango_layout_iter_get_line_extents, function in Layout Objects
pango_layout_iter_get_line_readonly, function in Layout Objects
pango_layout_iter_get_line_yrange, function in Layout Objects
pango_layout_iter_get_run, function in Layout Objects
pango_layout_iter_get_run_extents, function in Layout Objects
pango_layout_iter_get_run_readonly, function in Layout Objects
pango_layout_iter_next_char, function in Layout Objects
pango_layout_iter_next_cluster, function in Layout Objects
pango_layout_iter_next_line, function in Layout Objects
pango_layout_iter_next_run, function in Layout Objects
pango_layout_line_get_extents, function in Layout Objects
pango_layout_line_get_height, function in Layout Objects
pango_layout_line_get_pixel_extents, function in Layout Objects
pango_layout_line_get_x_ranges, function in Layout Objects
pango_layout_line_index_to_x, function in Layout Objects
pango_layout_line_ref, function in Layout Objects
pango_layout_line_unref, function in Layout Objects
pango_layout_line_x_to_index, function in Layout Objects
pango_layout_move_cursor_visually, function in Layout Objects
pango_layout_new, function in Layout Objects
pango_layout_set_alignment, function in Layout Objects
pango_layout_set_attributes, function in Layout Objects
pango_layout_set_auto_dir, function in Layout Objects
pango_layout_set_ellipsize, function in Layout Objects
pango_layout_set_font_description, function in Layout Objects
pango_layout_set_height, function in Layout Objects
pango_layout_set_indent, function in Layout Objects
pango_layout_set_justify, function in Layout Objects
pango_layout_set_line_spacing, function in Layout Objects
pango_layout_set_markup, function in Layout Objects
pango_layout_set_markup_with_accel, function in Layout Objects
pango_layout_set_single_paragraph_mode, function in Layout Objects
pango_layout_set_spacing, function in Layout Objects
pango_layout_set_tabs, function in Layout Objects
pango_layout_set_text, function in Layout Objects
pango_layout_set_width, function in Layout Objects
pango_layout_set_wrap, function in Layout Objects
pango_layout_xy_to_index, function in Layout Objects
PANGO_LBEARING, macro in Glyph Storage
pango_log2vis_get_embedding_levels, function in Miscellaneous Utilities
PangoLogAttr, struct in Text Processing
M
PangoMap, struct in Modules
PangoMapEntry, struct in Modules
pango_map_get_engine, function in Modules
pango_map_get_engines, function in Modules
pango_markup_parser_finish, function in Markup
pango_markup_parser_new, function in Markup
PangoMatrix, struct in Glyph Storage
pango_matrix_concat, function in Glyph Storage
pango_matrix_copy, function in Glyph Storage
pango_matrix_free, function in Glyph Storage
pango_matrix_get_font_scale_factor, function in Glyph Storage
pango_matrix_get_font_scale_factors, function in Glyph Storage
PANGO_MATRIX_INIT, macro in Glyph Storage
pango_matrix_rotate, function in Glyph Storage
pango_matrix_scale, function in Glyph Storage
pango_matrix_transform_distance, function in Glyph Storage
pango_matrix_transform_pixel_rectangle, function in Glyph Storage
pango_matrix_transform_point, function in Glyph Storage
pango_matrix_transform_rectangle, function in Glyph Storage
pango_matrix_translate, function in Glyph Storage
pango_module_register, function in Modules
O
PangoOTBuffer, struct in OpenType Font Handling
PangoOTFeatureMap, struct in OpenType Font Handling
PangoOTGlyph, struct in OpenType Font Handling
PangoOTInfo, struct in OpenType Font Handling
PangoOTRuleset, struct in OpenType Font Handling
PangoOTRulesetDescription, struct in OpenType Font Handling
PangoOTTableType, enum in OpenType Font Handling
PangoOTTag, typedef in OpenType Font Handling
PANGO_OT_ALL_GLYPHS, macro in OpenType Font Handling
pango_ot_buffer_add_glyph, function in OpenType Font Handling
pango_ot_buffer_clear, function in OpenType Font Handling
pango_ot_buffer_destroy, function in OpenType Font Handling
pango_ot_buffer_get_glyphs, function in OpenType Font Handling
pango_ot_buffer_new, function in OpenType Font Handling
pango_ot_buffer_output, function in OpenType Font Handling
pango_ot_buffer_set_rtl, function in OpenType Font Handling
pango_ot_buffer_set_zero_width_marks, function in OpenType Font Handling
PANGO_OT_DEFAULT_LANGUAGE, macro in OpenType Font Handling
pango_ot_info_find_feature, function in OpenType Font Handling
pango_ot_info_find_language, function in OpenType Font Handling
pango_ot_info_find_script, function in OpenType Font Handling
pango_ot_info_get, function in OpenType Font Handling
pango_ot_info_list_features, function in OpenType Font Handling
pango_ot_info_list_languages, function in OpenType Font Handling
pango_ot_info_list_scripts, function in OpenType Font Handling
PANGO_OT_NO_FEATURE, macro in OpenType Font Handling
PANGO_OT_NO_SCRIPT, macro in OpenType Font Handling
pango_ot_ruleset_add_feature, function in OpenType Font Handling
pango_ot_ruleset_description_copy, function in OpenType Font Handling
pango_ot_ruleset_description_equal, function in OpenType Font Handling
pango_ot_ruleset_description_free, function in OpenType Font Handling
pango_ot_ruleset_description_hash, function in OpenType Font Handling
pango_ot_ruleset_get_feature_count, function in OpenType Font Handling
pango_ot_ruleset_get_for_description, function in OpenType Font Handling
pango_ot_ruleset_maybe_add_feature, function in OpenType Font Handling
pango_ot_ruleset_maybe_add_features, function in OpenType Font Handling
pango_ot_ruleset_new, function in OpenType Font Handling
pango_ot_ruleset_new_for, function in OpenType Font Handling
pango_ot_ruleset_new_from_description, function in OpenType Font Handling
pango_ot_ruleset_position, function in OpenType Font Handling
pango_ot_ruleset_substitute, function in OpenType Font Handling
PANGO_OT_TAG_DEFAULT_LANGUAGE, macro in OpenType Font Handling
PANGO_OT_TAG_DEFAULT_SCRIPT, macro in OpenType Font Handling
pango_ot_tag_from_language, function in OpenType Font Handling
pango_ot_tag_from_script, function in OpenType Font Handling
PANGO_OT_TAG_MAKE, macro in OpenType Font Handling
PANGO_OT_TAG_MAKE_FROM_STRING, macro in OpenType Font Handling
pango_ot_tag_to_language, function in OpenType Font Handling
pango_ot_tag_to_script, function in OpenType Font Handling
PangoOverline, enum in Text Attributes
P
pango_parse_enum, function in Miscellaneous Utilities
pango_parse_markup, function in Markup
pango_parse_stretch, function in Miscellaneous Utilities
pango_parse_style, function in Miscellaneous Utilities
pango_parse_variant, function in Miscellaneous Utilities
pango_parse_weight, function in Miscellaneous Utilities
PANGO_PIXELS, macro in Glyph Storage
PANGO_PIXELS_CEIL, macro in Glyph Storage
PANGO_PIXELS_FLOOR, macro in Glyph Storage
Q
pango_quantize_line_geometry, function in Miscellaneous Utilities
R
PANGO_RBEARING, macro in Glyph Storage
pango_read_line, function in Miscellaneous Utilities
PangoRectangle, struct in Glyph Storage
PangoRenderer, struct in PangoRenderer
PangoRendererClass, struct in PangoRenderer
pango_renderer_activate, function in PangoRenderer
pango_renderer_deactivate, function in PangoRenderer
pango_renderer_draw_error_underline, function in PangoRenderer
pango_renderer_draw_glyph, function in PangoRenderer
pango_renderer_draw_glyphs, function in PangoRenderer
pango_renderer_draw_glyph_item, function in PangoRenderer
pango_renderer_draw_layout, function in PangoRenderer
pango_renderer_draw_layout_line, function in PangoRenderer
pango_renderer_draw_rectangle, function in PangoRenderer
pango_renderer_draw_trapezoid, function in PangoRenderer
pango_renderer_get_alpha, function in PangoRenderer
pango_renderer_get_color, function in PangoRenderer
pango_renderer_get_layout, function in PangoRenderer
pango_renderer_get_layout_line, function in PangoRenderer
pango_renderer_get_matrix, function in PangoRenderer
pango_renderer_part_changed, function in PangoRenderer
pango_renderer_set_alpha, function in PangoRenderer
pango_renderer_set_color, function in PangoRenderer
pango_renderer_set_matrix, function in PangoRenderer
PangoRenderPart, enum in PangoRenderer
pango_reorder_items, function in Text Processing
S
PANGO_SCALE, macro in Glyph Storage
PANGO_SCALE_LARGE, macro in Text Attributes
PANGO_SCALE_MEDIUM, macro in Text Attributes
PANGO_SCALE_SMALL, macro in Text Attributes
PANGO_SCALE_XX_LARGE, macro in Text Attributes
PANGO_SCALE_XX_SMALL, macro in Text Attributes
PANGO_SCALE_X_LARGE, macro in Text Attributes
PANGO_SCALE_X_SMALL, macro in Text Attributes
pango_scan_int, function in Miscellaneous Utilities
pango_scan_string, function in Miscellaneous Utilities
pango_scan_word, function in Miscellaneous Utilities
PangoScript, enum in Scripts and Languages
PangoScriptIter, struct in Scripts and Languages
script_engine_create, function in Engines
script_engine_exit, function in Engines
script_engine_init, function in Engines
script_engine_list, function in Engines
pango_script_for_unichar, function in Scripts and Languages
pango_script_get_sample_language, function in Scripts and Languages
pango_script_iter_free, function in Scripts and Languages
pango_script_iter_get_range, function in Scripts and Languages
pango_script_iter_new, function in Scripts and Languages
pango_script_iter_next, function in Scripts and Languages
pango_shape, function in Text Processing
PangoShapeFlags, enum in Text Processing
pango_shape_full, function in Text Processing
pango_shape_with_flags, function in Text Processing
PangoShowFlags, enum in Text Attributes
pango_skip_space, function in Miscellaneous Utilities
pango_split_file_list, function in Miscellaneous Utilities
PangoStretch, enum in Fonts
PangoStyle, enum in Fonts
T
PangoTabAlign, enum in Tab Stops
PangoTabArray, struct in Tab Stops
pango_tab_array_copy, function in Tab Stops
pango_tab_array_free, function in Tab Stops
pango_tab_array_get_positions_in_pixels, function in Tab Stops
pango_tab_array_get_size, function in Tab Stops
pango_tab_array_get_tab, function in Tab Stops
pango_tab_array_get_tabs, function in Tab Stops
pango_tab_array_new, function in Tab Stops
pango_tab_array_new_with_positions, function in Tab Stops
pango_tab_array_resize, function in Tab Stops
pango_tab_array_set_tab, function in Tab Stops
pango_tailor_break, function in Text Processing
pango_trim_string, function in Miscellaneous Utilities
PANGO_TYPE_COVERAGE_LEVEL, macro in Coverage Maps
PANGO_TYPE_GLYPH_STRING, macro in Glyph Storage
PANGO_TYPE_RENDER_PART, macro in PangoRenderer
U
PangoUnderline, enum in Text Attributes
pango_unichar_direction, function in Bidirectional Text
pango_units_from_double, function in Glyph Storage
PANGO_UNITS_ROUND, macro in Glyph Storage
pango_units_to_double, function in Glyph Storage
V
PangoVariant, enum in Fonts
PANGO_VERSION, macro in Version Checking
pango_version, function in Version Checking
PANGO_VERSION_1_10, macro in Version Checking
PANGO_VERSION_1_12, macro in Version Checking
PANGO_VERSION_1_14, macro in Version Checking
PANGO_VERSION_1_16, macro in Version Checking
PANGO_VERSION_1_18, macro in Version Checking
PANGO_VERSION_1_2, macro in Version Checking
PANGO_VERSION_1_20, macro in Version Checking
PANGO_VERSION_1_22, macro in Version Checking
PANGO_VERSION_1_24, macro in Version Checking
PANGO_VERSION_1_26, macro in Version Checking
PANGO_VERSION_1_28, macro in Version Checking
PANGO_VERSION_1_30, macro in Version Checking
PANGO_VERSION_1_32, macro in Version Checking
PANGO_VERSION_1_34, macro in Version Checking
PANGO_VERSION_1_36, macro in Version Checking
PANGO_VERSION_1_38, macro in Version Checking
PANGO_VERSION_1_4, macro in Version Checking
PANGO_VERSION_1_40, macro in Version Checking
PANGO_VERSION_1_42, macro in Version Checking
PANGO_VERSION_1_44, macro in Version Checking
PANGO_VERSION_1_6, macro in Version Checking
PANGO_VERSION_1_8, macro in Version Checking
PANGO_VERSION_CHECK, macro in Version Checking
pango_version_check, function in Version Checking
PANGO_VERSION_ENCODE, macro in Version Checking
PANGO_VERSION_MAJOR, macro in Version Checking
PANGO_VERSION_MAX_ALLOWED, macro in Version Checking
PANGO_VERSION_MICRO, macro in Version Checking
PANGO_VERSION_MINOR, macro in Version Checking
PANGO_VERSION_MIN_REQUIRED, macro in Version Checking
PANGO_VERSION_STRING, macro in Version Checking
pango_version_string, function in Version Checking
W
PangoWeight, enum in Fonts
PangoWin32FontCache, struct in Win32 Fonts and Rendering
pango_win32_font_cache_free, function in Win32 Fonts and Rendering
pango_win32_font_cache_load, function in Win32 Fonts and Rendering
pango_win32_font_cache_loadw, function in Win32 Fonts and Rendering
pango_win32_font_cache_new, function in Win32 Fonts and Rendering
pango_win32_font_cache_unload, function in Win32 Fonts and Rendering
pango_win32_font_description_from_logfont, function in Win32 Fonts and Rendering
pango_win32_font_description_from_logfontw, function in Win32 Fonts and Rendering
pango_win32_font_done_font, function in Win32 Fonts and Rendering
pango_win32_font_get_glyph_index, function in Win32 Fonts and Rendering
pango_win32_font_get_metrics_factor, function in Win32 Fonts and Rendering
pango_win32_font_logfont, function in Win32 Fonts and Rendering
pango_win32_font_logfontw, function in Win32 Fonts and Rendering
pango_win32_font_map_for_display, function in Win32 Fonts and Rendering
pango_win32_font_map_get_font_cache, function in Win32 Fonts and Rendering
pango_win32_font_select_font, function in Win32 Fonts and Rendering
pango_win32_get_context, function in Win32 Fonts and Rendering
pango_win32_get_dc, function in Win32 Fonts and Rendering
pango_win32_get_debug_flag, function in Win32 Fonts and Rendering
pango_win32_get_unknown_glyph, function in Win32 Fonts and Rendering
pango_win32_render, function in Win32 Fonts and Rendering
pango_win32_render_layout, function in Win32 Fonts and Rendering
pango_win32_render_layout_line, function in Win32 Fonts and Rendering
pango_win32_render_transformed, function in Win32 Fonts and Rendering
pango_win32_shutdown_display, function in Win32 Fonts and Rendering
PangoWrapMode, enum in Layout Objects
X
PangoXftFont, struct in Xft Fonts and Rendering
PangoXftFontMap, struct in Xft Fonts and Rendering
PangoXftRenderer, struct in Xft Fonts and Rendering
PangoXftRenderer:display, object property in Xft Fonts and Rendering
PangoXftRenderer:screen, object property in Xft Fonts and Rendering
PangoXftRendererClass, struct in Xft Fonts and Rendering
PangoXftSubstituteFunc, user_function in Xft Fonts and Rendering
pango_xft_font_get_display, function in Xft Fonts and Rendering
pango_xft_font_get_font, function in Xft Fonts and Rendering
pango_xft_font_get_glyph, function in Xft Fonts and Rendering
pango_xft_font_get_unknown_glyph, function in Xft Fonts and Rendering
pango_xft_font_has_char, function in Xft Fonts and Rendering
pango_xft_font_lock_face, function in Xft Fonts and Rendering
pango_xft_font_unlock_face, function in Xft Fonts and Rendering
pango_xft_get_context, function in Xft Fonts and Rendering
pango_xft_get_font_map, function in Xft Fonts and Rendering
pango_xft_picture_render, function in Xft Fonts and Rendering
pango_xft_render, function in Xft Fonts and Rendering
pango_xft_renderer_new, function in Xft Fonts and Rendering
pango_xft_renderer_set_default_color, function in Xft Fonts and Rendering
pango_xft_renderer_set_draw, function in Xft Fonts and Rendering
pango_xft_render_layout, function in Xft Fonts and Rendering
pango_xft_render_layout_line, function in Xft Fonts and Rendering
pango_xft_render_transformed, function in Xft Fonts and Rendering
pango_xft_set_default_substitute, function in Xft Fonts and Rendering
pango_xft_shutdown_display, function in Xft Fonts and Rendering
pango_xft_substitute_changed, function in Xft Fonts and Rendering
docs/xml/api-index-deprecated.xml 0000664 0001750 0001750 00000075724 13751777750 017176 0 ustar mclasen mclasen
]>
B
PangoBidiType, enum in Bidirectional Text
pango_bidi_type_for_unichar, function in Bidirectional Text
pango_break, function in Text Processing
C
pango_cairo_font_map_create_context, function in Cairo Rendering
pango_coverage_from_bytes, function in Coverage Maps
pango_coverage_max, function in Coverage Maps
pango_coverage_to_bytes, function in Coverage Maps
E
PangoEngine, struct in Engines
PangoEngineClass, struct in Engines
PangoEngineInfo, struct in Engines
PangoEngineLang, struct in PangoEngineLang
PangoEngineLangClass, struct in PangoEngineLang
PangoEngineScriptInfo, struct in Engines
PangoEngineShape, struct in PangoEngineShape
PangoEngineShapeClass, struct in PangoEngineShape
PANGO_ENGINE_LANG_DEFINE_TYPE, macro in PangoEngineLang
PANGO_ENGINE_SHAPE_DEFINE_TYPE, macro in PangoEngineShape
PANGO_ENGINE_TYPE_LANG, macro in PangoEngineLang
PANGO_ENGINE_TYPE_SHAPE, macro in PangoEngineShape
F
PangoFcFont, struct in PangoFcFont
pango_fc_font_get_unknown_glyph, function in PangoFcFont
pango_fc_font_has_char, function in PangoFcFont
pango_fc_font_kern_glyphs, function in PangoFcFont
pango_fc_font_lock_face, function in PangoFcFont
pango_fc_font_map_create_context, function in PangoFcFontMap
pango_fc_font_unlock_face, function in PangoFcFont
pango_find_base_dir, function in Bidirectional Text
pango_find_map, function in Modules
PangoFont, struct in Fonts
PangoFontFace, struct in Fonts
PangoFontFamily, struct in Fonts
pango_font_find_shaper, function in Fonts
pango_ft2_font_get_coverage, function in FreeType Fonts and Rendering
pango_ft2_font_get_face, function in FreeType Fonts and Rendering
pango_ft2_font_get_kerning, function in FreeType Fonts and Rendering
pango_ft2_font_map_create_context, function in FreeType Fonts and Rendering
pango_ft2_font_map_for_display, function in FreeType Fonts and Rendering
pango_ft2_font_map_set_default_substitute, function in FreeType Fonts and Rendering
pango_ft2_font_map_substitute_changed, function in FreeType Fonts and Rendering
pango_ft2_get_context, function in FreeType Fonts and Rendering
pango_ft2_get_unknown_glyph, function in FreeType Fonts and Rendering
pango_ft2_shutdown_display, function in FreeType Fonts and Rendering
G
pango_get_mirror_char, function in Bidirectional Text
I
PangoIncludedModule, struct in Modules
M
PangoMap, struct in Modules
PangoMapEntry, struct in Modules
pango_map_get_engine, function in Modules
pango_map_get_engines, function in Modules
pango_module_register, function in Modules
O
PangoOTBuffer, struct in OpenType Font Handling
PangoOTFeatureMap, struct in OpenType Font Handling
PangoOTGlyph, struct in OpenType Font Handling
PangoOTInfo, struct in OpenType Font Handling
PangoOTRuleset, struct in OpenType Font Handling
PangoOTRulesetDescription, struct in OpenType Font Handling
PangoOTTableType, enum in OpenType Font Handling
PangoOTTag, typedef in OpenType Font Handling
PANGO_OT_ALL_GLYPHS, macro in OpenType Font Handling
pango_ot_buffer_add_glyph, function in OpenType Font Handling
pango_ot_buffer_clear, function in OpenType Font Handling
pango_ot_buffer_destroy, function in OpenType Font Handling
pango_ot_buffer_get_glyphs, function in OpenType Font Handling
pango_ot_buffer_new, function in OpenType Font Handling
pango_ot_buffer_output, function in OpenType Font Handling
pango_ot_buffer_set_rtl, function in OpenType Font Handling
pango_ot_buffer_set_zero_width_marks, function in OpenType Font Handling
PANGO_OT_DEFAULT_LANGUAGE, macro in OpenType Font Handling
pango_ot_info_find_feature, function in OpenType Font Handling
pango_ot_info_find_language, function in OpenType Font Handling
pango_ot_info_find_script, function in OpenType Font Handling
pango_ot_info_get, function in OpenType Font Handling
pango_ot_info_list_features, function in OpenType Font Handling
pango_ot_info_list_languages, function in OpenType Font Handling
pango_ot_info_list_scripts, function in OpenType Font Handling
PANGO_OT_NO_FEATURE, macro in OpenType Font Handling
PANGO_OT_NO_SCRIPT, macro in OpenType Font Handling
pango_ot_ruleset_add_feature, function in OpenType Font Handling
pango_ot_ruleset_description_copy, function in OpenType Font Handling
pango_ot_ruleset_description_equal, function in OpenType Font Handling
pango_ot_ruleset_description_free, function in OpenType Font Handling
pango_ot_ruleset_description_hash, function in OpenType Font Handling
pango_ot_ruleset_get_feature_count, function in OpenType Font Handling
pango_ot_ruleset_get_for_description, function in OpenType Font Handling
pango_ot_ruleset_maybe_add_feature, function in OpenType Font Handling
pango_ot_ruleset_maybe_add_features, function in OpenType Font Handling
pango_ot_ruleset_new, function in OpenType Font Handling
pango_ot_ruleset_new_for, function in OpenType Font Handling
pango_ot_ruleset_new_from_description, function in OpenType Font Handling
pango_ot_ruleset_position, function in OpenType Font Handling
pango_ot_ruleset_substitute, function in OpenType Font Handling
PANGO_OT_TAG_DEFAULT_LANGUAGE, macro in OpenType Font Handling
PANGO_OT_TAG_DEFAULT_SCRIPT, macro in OpenType Font Handling
pango_ot_tag_from_language, function in OpenType Font Handling
pango_ot_tag_from_script, function in OpenType Font Handling
PANGO_OT_TAG_MAKE, macro in OpenType Font Handling
PANGO_OT_TAG_MAKE_FROM_STRING, macro in OpenType Font Handling
pango_ot_tag_to_language, function in OpenType Font Handling
pango_ot_tag_to_script, function in OpenType Font Handling
P
pango_parse_enum, function in Miscellaneous Utilities
R
pango_read_line, function in Miscellaneous Utilities
S
pango_scan_int, function in Miscellaneous Utilities
pango_scan_string, function in Miscellaneous Utilities
pango_scan_word, function in Miscellaneous Utilities
script_engine_create, function in Engines
script_engine_exit, function in Engines
script_engine_init, function in Engines
script_engine_list, function in Engines
pango_script_for_unichar, function in Scripts and Languages
pango_skip_space, function in Miscellaneous Utilities
pango_split_file_list, function in Miscellaneous Utilities
T
pango_trim_string, function in Miscellaneous Utilities
U
pango_unichar_direction, function in Bidirectional Text
W
pango_win32_font_done_font, function in Win32 Fonts and Rendering
pango_win32_font_get_glyph_index, function in Win32 Fonts and Rendering
pango_win32_font_get_metrics_factor, function in Win32 Fonts and Rendering
pango_win32_font_select_font, function in Win32 Fonts and Rendering
pango_win32_get_context, function in Win32 Fonts and Rendering
pango_win32_get_dc, function in Win32 Fonts and Rendering
pango_win32_get_debug_flag, function in Win32 Fonts and Rendering
pango_win32_get_unknown_glyph, function in Win32 Fonts and Rendering
X
pango_xft_font_get_display, function in Xft Fonts and Rendering
pango_xft_font_get_font, function in Xft Fonts and Rendering
pango_xft_font_get_glyph, function in Xft Fonts and Rendering
pango_xft_font_get_unknown_glyph, function in Xft Fonts and Rendering
pango_xft_font_has_char, function in Xft Fonts and Rendering
pango_xft_font_lock_face, function in Xft Fonts and Rendering
pango_xft_font_unlock_face, function in Xft Fonts and Rendering
pango_xft_get_context, function in Xft Fonts and Rendering
pango_xft_set_default_substitute, function in Xft Fonts and Rendering
pango_xft_substitute_changed, function in Xft Fonts and Rendering
docs/xml/api-index-1.10.xml 0000664 0001750 0001750 00000013711 13751777750 015441 0 ustar mclasen mclasen
]>
A
pango_attr_list_ref, function in Text Attributes
C
PangoCairoFontMap, struct in Cairo Rendering
pango_cairo_context_get_font_options, function in Cairo Rendering
pango_cairo_context_get_resolution, function in Cairo Rendering
pango_cairo_context_set_font_options, function in Cairo Rendering
pango_cairo_context_set_resolution, function in Cairo Rendering
pango_cairo_create_layout, function in Cairo Rendering
pango_cairo_font_map_create_context, function in Cairo Rendering
pango_cairo_font_map_get_default, function in Cairo Rendering
pango_cairo_font_map_get_resolution, function in Cairo Rendering
pango_cairo_font_map_new, function in Cairo Rendering
pango_cairo_font_map_set_resolution, function in Cairo Rendering
pango_cairo_glyph_string_path, function in Cairo Rendering
pango_cairo_layout_line_path, function in Cairo Rendering
pango_cairo_layout_path, function in Cairo Rendering
pango_cairo_show_glyph_string, function in Cairo Rendering
pango_cairo_show_layout, function in Cairo Rendering
pango_cairo_show_layout_line, function in Cairo Rendering
pango_cairo_update_context, function in Cairo Rendering
pango_cairo_update_layout, function in Cairo Rendering
F
pango_font_get_font_map, function in Fonts
I
pango_is_zero_width, function in Miscellaneous Utilities
L
pango_layout_line_ref, function in Layout Objects
docs/xml/api-index-1.12.xml 0000664 0001750 0001750 00000002352 13751777750 015442 0 ustar mclasen mclasen
]>
M
pango_matrix_get_font_scale_factor, function in Glyph Storage
Q
pango_quantize_line_geometry, function in Miscellaneous Utilities
W
pango_win32_font_description_from_logfont, function in Win32 Fonts and Rendering
docs/xml/api-index-1.14.xml 0000664 0001750 0001750 00000003566 13751777750 015454 0 ustar mclasen mclasen
]>
C
pango_cairo_error_underline_path, function in Cairo Rendering
pango_cairo_show_error_underline, function in Cairo Rendering
F
pango_font_describe_with_absolute_size, function in Fonts
G
pango_glyph_string_get_width, function in Glyph Storage
P
PANGO_PIXELS_CEIL, macro in Glyph Storage
PANGO_PIXELS_FLOOR, macro in Glyph Storage
docs/xml/api-index-1.16.xml 0000664 0001750 0001750 00000024515 13751777750 015453 0 ustar mclasen mclasen
]>
A
PANGO_ANALYSIS_FLAG_CENTERED_BASELINE, macro in Text Processing
pango_attr_gravity_hint_new, function in Text Attributes
pango_attr_gravity_new, function in Text Attributes
C
pango_color_to_string, function in Text Attributes
pango_context_get_base_gravity, function in Contexts
pango_context_get_gravity, function in Contexts
pango_context_get_gravity_hint, function in Contexts
pango_context_set_base_gravity, function in Contexts
pango_context_set_gravity_hint, function in Contexts
E
pango_extents_to_pixels, function in Glyph Storage
F
pango_font_description_get_gravity, function in Fonts
pango_font_description_set_gravity, function in Fonts
G
PangoGravity, enum in Vertical Text
PangoGravityHint, enum in Vertical Text
pango_gravity_get_for_matrix, function in Vertical Text
pango_gravity_get_for_script, function in Vertical Text
PANGO_GRAVITY_IS_VERTICAL, macro in Vertical Text
pango_gravity_to_rotation, function in Vertical Text
L
pango_language_get_default, function in Scripts and Languages
pango_layout_get_lines_readonly, function in Layout Objects
pango_layout_get_line_readonly, function in Layout Objects
pango_layout_get_unknown_glyphs_count, function in Layout Objects
pango_layout_is_ellipsized, function in Layout Objects
pango_layout_is_wrapped, function in Layout Objects
pango_layout_iter_get_line_readonly, function in Layout Objects
pango_layout_iter_get_run_readonly, function in Layout Objects
M
pango_matrix_transform_distance, function in Glyph Storage
pango_matrix_transform_pixel_rectangle, function in Glyph Storage
pango_matrix_transform_point, function in Glyph Storage
pango_matrix_transform_rectangle, function in Glyph Storage
O
PANGO_OT_ALL_GLYPHS, macro in OpenType Font Handling
PANGO_OT_DEFAULT_LANGUAGE, macro in OpenType Font Handling
P
pango_parse_enum, function in Miscellaneous Utilities
U
pango_units_from_double, function in Glyph Storage
pango_units_to_double, function in Glyph Storage
V
pango_version, function in Version Checking
pango_version_check, function in Version Checking
pango_version_string, function in Version Checking
W
pango_win32_font_cache_loadw, function in Win32 Fonts and Rendering
pango_win32_font_description_from_logfontw, function in Win32 Fonts and Rendering
pango_win32_font_logfontw, function in Win32 Fonts and Rendering
docs/xml/api-index-1.18.xml 0000664 0001750 0001750 00000016735 13751777750 015462 0 ustar mclasen mclasen
]>
C
PangoCairoFont, struct in Cairo Rendering
pango_cairo_context_get_shape_renderer, function in Cairo Rendering
pango_cairo_context_set_shape_renderer, function in Cairo Rendering
pango_cairo_font_get_scaled_font, function in Cairo Rendering
pango_cairo_font_map_get_font_type, function in Cairo Rendering
pango_cairo_font_map_new_for_font_type, function in Cairo Rendering
F
pango_font_face_is_synthesized, function in Fonts
O
PangoOTFeatureMap, struct in OpenType Font Handling
PangoOTRulesetDescription, struct in OpenType Font Handling
PANGO_OT_NO_FEATURE, macro in OpenType Font Handling
PANGO_OT_NO_SCRIPT, macro in OpenType Font Handling
pango_ot_ruleset_description_copy, function in OpenType Font Handling
pango_ot_ruleset_description_equal, function in OpenType Font Handling
pango_ot_ruleset_description_free, function in OpenType Font Handling
pango_ot_ruleset_description_hash, function in OpenType Font Handling
pango_ot_ruleset_get_feature_count, function in OpenType Font Handling
pango_ot_ruleset_get_for_description, function in OpenType Font Handling
pango_ot_ruleset_maybe_add_feature, function in OpenType Font Handling
pango_ot_ruleset_maybe_add_features, function in OpenType Font Handling
pango_ot_ruleset_new_for, function in OpenType Font Handling
pango_ot_ruleset_new_from_description, function in OpenType Font Handling
PANGO_OT_TAG_DEFAULT_LANGUAGE, macro in OpenType Font Handling
PANGO_OT_TAG_DEFAULT_SCRIPT, macro in OpenType Font Handling
pango_ot_tag_from_language, function in OpenType Font Handling
pango_ot_tag_from_script, function in OpenType Font Handling
pango_ot_tag_to_language, function in OpenType Font Handling
pango_ot_tag_to_script, function in OpenType Font Handling
U
PANGO_UNITS_ROUND, macro in Glyph Storage
docs/xml/api-index-1.2.xml 0000664 0001750 0001750 00000012436 13751777750 015365 0 ustar mclasen mclasen
]>
A
pango_attr_iterator_get_attrs, function in Text Attributes
pango_attr_list_filter, function in Text Attributes
F
pango_ft2_font_map_create_context, function in FreeType Fonts and Rendering
pango_ft2_font_map_new, function in FreeType Fonts and Rendering
pango_ft2_font_map_set_default_substitute, function in FreeType Fonts and Rendering
pango_ft2_font_map_set_resolution, function in FreeType Fonts and Rendering
pango_ft2_font_map_substitute_changed, function in FreeType Fonts and Rendering
G
pango_glyph_item_apply_attrs, function in Glyph Storage
pango_glyph_item_split, function in Glyph Storage
O
pango_ot_info_get, function in OpenType Font Handling
W
pango_win32_get_debug_flag, function in Win32 Fonts and Rendering
X
pango_xft_font_get_glyph, function in Xft Fonts and Rendering
pango_xft_font_has_char, function in Xft Fonts and Rendering
pango_xft_font_lock_face, function in Xft Fonts and Rendering
pango_xft_font_unlock_face, function in Xft Fonts and Rendering
pango_xft_get_font_map, function in Xft Fonts and Rendering
pango_xft_set_default_substitute, function in Xft Fonts and Rendering
pango_xft_shutdown_display, function in Xft Fonts and Rendering
pango_xft_substitute_changed, function in Xft Fonts and Rendering
docs/xml/api-index-1.20.xml 0000664 0001750 0001750 00000005647 13751777750 015453 0 ustar mclasen mclasen
]>
A
pango_attribute_init, function in Text Attributes
F
PANGO_FC_GRAVITY, macro in PangoFcFontMap
PANGO_FC_VERSION, macro in PangoFcFontMap
G
PANGO_GLYPH_INVALID_INPUT, macro in Glyph Storage
pango_glyph_item_copy, function in Glyph Storage
L
pango_layout_get_height, function in Layout Objects
pango_layout_iter_copy, function in Layout Objects
pango_layout_iter_get_layout, function in Layout Objects
pango_layout_set_height, function in Layout Objects
R
pango_renderer_get_layout, function in PangoRenderer
pango_renderer_get_layout_line, function in PangoRenderer
docs/xml/api-index-1.22.xml 0000664 0001750 0001750 00000011050 13751777750 015436 0 ustar mclasen mclasen
]>
A
pango_attr_type_get_name, function in Text Attributes
B
PangoBidiType, enum in Bidirectional Text
pango_bidi_type_for_unichar, function in Bidirectional Text
C
pango_cairo_create_context, function in Cairo Rendering
pango_cairo_font_map_set_default, function in Cairo Rendering
pango_cairo_show_glyph_item, function in Cairo Rendering
F
pango_font_map_create_context, function in Fonts
G
PangoGlyphItemIter, struct in Glyph Storage
pango_glyph_item_iter_copy, function in Glyph Storage
pango_glyph_item_iter_free, function in Glyph Storage
pango_glyph_item_iter_init_end, function in Glyph Storage
pango_glyph_item_iter_init_start, function in Glyph Storage
pango_glyph_item_iter_next_cluster, function in Glyph Storage
pango_glyph_item_iter_prev_cluster, function in Glyph Storage
L
pango_language_get_scripts, function in Scripts and Languages
pango_layout_get_baseline, function in Layout Objects
R
pango_renderer_draw_glyph_item, function in PangoRenderer
docs/xml/api-index-1.24.xml 0000664 0001750 0001750 00000002614 13751777750 015446 0 ustar mclasen mclasen
]>
A
PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING, macro in Text Attributes
PANGO_ATTR_INDEX_TO_TEXT_END, macro in Text Attributes
C
pango_core_text_font_get_ctfont, function in CoreText Fonts
F
PANGO_FC_PRGNAME, macro in PangoFcFontMap
docs/xml/api-index-1.26.xml 0000664 0001750 0001750 00000002223 13751777750 015444 0 ustar mclasen mclasen
]>
F
pango_fc_font_map_find_decoder, function in PangoFcFontMap
G
pango_glyph_item_get_logical_widths, function in Glyph Storage
pango_gravity_get_for_script_and_width, function in Vertical Text
docs/xml/api-index-1.30.xml 0000664 0001750 0001750 00000001555 13751777750 015446 0 ustar mclasen mclasen
]>
L
pango_layout_get_character_count, function in Layout Objects
pango_layout_get_log_attrs_readonly, function in Layout Objects
docs/xml/api-index-1.31.0.xml 0000664 0001750 0001750 00000001431 13751777750 015576 0 ustar mclasen mclasen
]>
M
pango_markup_parser_finish, function in Markup
pango_markup_parser_new, function in Markup
docs/xml/api-index-1.32.xml 0000664 0001750 0001750 00000001515 13751777750 015444 0 ustar mclasen mclasen
]>
G
PANGO_GRAVITY_IS_IMPROPER, macro in Vertical Text
S
pango_shape_full, function in Text Processing
docs/xml/api-index-1.32.4.xml 0000664 0001750 0001750 00000002433 13751777750 015606 0 ustar mclasen mclasen
]>
C
pango_context_changed, function in Contexts
pango_context_get_serial, function in Contexts
F
pango_font_map_get_serial, function in Fonts
L
pango_layout_get_serial, function in Layout Objects
docs/xml/api-index-1.34.xml 0000664 0001750 0001750 00000001427 13751777750 015450 0 ustar mclasen mclasen
]>
F
PANGO_FC_FONT_FEATURES, macro in PangoFcFontMap
pango_font_map_changed, function in Fonts
docs/xml/api-index-1.36.7.xml 0000664 0001750 0001750 00000001157 13751777750 015617 0 ustar mclasen mclasen
]>
A
PANGO_ANALYSIS_FLAG_IS_ELLIPSIS, macro in Text Processing
docs/xml/api-index-1.38.xml 0000664 0001750 0001750 00000005461 13751777750 015456 0 ustar mclasen mclasen
]>
A
PangoAttrFontFeatures, struct in Text Attributes
pango_attr_background_alpha_new, function in Text Attributes
pango_attr_font_features_new, function in Text Attributes
pango_attr_foreground_alpha_new, function in Text Attributes
F
pango_fc_font_map_config_changed, function in PangoFcFontMap
pango_fc_font_map_get_config, function in PangoFcFontMap
pango_fc_font_map_set_config, function in PangoFcFontMap
M
pango_matrix_get_font_scale_factors, function in Glyph Storage
R
pango_renderer_get_alpha, function in PangoRenderer
pango_renderer_set_alpha, function in PangoRenderer
docs/xml/api-index-1.4.xml 0000664 0001750 0001750 00000022136 13751777750 015365 0 ustar mclasen mclasen
]>
A
pango_attr_fallback_new, function in Text Attributes
F
pango_fc_font_description_from_pattern, function in PangoFcFontMap
pango_fc_font_get_glyph, function in PangoFcFont
pango_fc_font_get_unknown_glyph, function in PangoFcFont
pango_fc_font_has_char, function in PangoFcFont
pango_fc_font_kern_glyphs, function in PangoFcFont
pango_fc_font_lock_face, function in PangoFcFont
pango_fc_font_map_cache_clear, function in PangoFcFontMap
pango_fc_font_map_create_context, function in PangoFcFontMap
pango_fc_font_map_shutdown, function in PangoFcFontMap
pango_fc_font_unlock_face, function in PangoFcFont
pango_find_base_dir, function in Bidirectional Text
PangoFontsetForeachFunc, user_function in Fonts
pango_fontset_foreach, function in Fonts
pango_font_face_list_sizes, function in Fonts
pango_font_family_is_monospace, function in Fonts
I
pango_itemize_with_base_dir, function in Text Processing
L
pango_language_includes_script, function in Scripts and Languages
pango_layout_get_auto_dir, function in Layout Objects
pango_layout_set_auto_dir, function in Layout Objects
pango_log2vis_get_embedding_levels, function in Miscellaneous Utilities
M
pango_map_get_engines, function in Modules
O
pango_ot_buffer_add_glyph, function in OpenType Font Handling
pango_ot_buffer_clear, function in OpenType Font Handling
pango_ot_buffer_destroy, function in OpenType Font Handling
pango_ot_buffer_get_glyphs, function in OpenType Font Handling
pango_ot_buffer_new, function in OpenType Font Handling
pango_ot_buffer_output, function in OpenType Font Handling
pango_ot_buffer_set_rtl, function in OpenType Font Handling
pango_ot_ruleset_position, function in OpenType Font Handling
pango_ot_ruleset_substitute, function in OpenType Font Handling
S
pango_script_for_unichar, function in Scripts and Languages
pango_script_get_sample_language, function in Scripts and Languages
pango_script_iter_free, function in Scripts and Languages
pango_script_iter_get_range, function in Scripts and Languages
pango_script_iter_new, function in Scripts and Languages
pango_script_iter_next, function in Scripts and Languages
docs/xml/api-index-1.42.xml 0000664 0001750 0001750 00000014247 13751777750 015453 0 ustar mclasen mclasen
]>
F
pango_font_description_get_variations, function in Fonts
pango_font_description_set_variations, function in Fonts
pango_font_description_set_variations_static, function in Fonts
V
PANGO_VERSION_1_10, macro in Version Checking
PANGO_VERSION_1_12, macro in Version Checking
PANGO_VERSION_1_14, macro in Version Checking
PANGO_VERSION_1_16, macro in Version Checking
PANGO_VERSION_1_18, macro in Version Checking
PANGO_VERSION_1_2, macro in Version Checking
PANGO_VERSION_1_20, macro in Version Checking
PANGO_VERSION_1_22, macro in Version Checking
PANGO_VERSION_1_24, macro in Version Checking
PANGO_VERSION_1_26, macro in Version Checking
PANGO_VERSION_1_28, macro in Version Checking
PANGO_VERSION_1_30, macro in Version Checking
PANGO_VERSION_1_32, macro in Version Checking
PANGO_VERSION_1_34, macro in Version Checking
PANGO_VERSION_1_36, macro in Version Checking
PANGO_VERSION_1_38, macro in Version Checking
PANGO_VERSION_1_4, macro in Version Checking
PANGO_VERSION_1_40, macro in Version Checking
PANGO_VERSION_1_42, macro in Version Checking
PANGO_VERSION_1_6, macro in Version Checking
PANGO_VERSION_1_8, macro in Version Checking
PANGO_VERSION_MAX_ALLOWED, macro in Version Checking
PANGO_VERSION_MIN_REQUIRED, macro in Version Checking
docs/xml/api-index-1.44.xml 0000664 0001750 0001750 00000012225 13751777750 015447 0 ustar mclasen mclasen
]>
A
PANGO_ANALYSIS_FLAG_NEED_HYPHEN, macro in Text Processing
pango_attr_allow_breaks_new, function in Text Attributes
pango_attr_insert_hyphens_new, function in Text Attributes
pango_attr_list_get_attributes, function in Text Attributes
pango_attr_list_update, function in Text Attributes
pango_attr_show_new, function in Text Attributes
C
pango_context_get_round_glyph_positions, function in Contexts
pango_context_set_round_glyph_positions, function in Contexts
F
pango_font_family_is_variable, function in Fonts
pango_font_get_features, function in Fonts
pango_font_get_hb_font, function in Fonts
pango_font_has_char, function in Fonts
pango_font_metrics_get_height, function in Fonts
I
pango_item_apply_attrs, function in Text Processing
L
pango_layout_get_line_spacing, function in Layout Objects
pango_layout_line_get_height, function in Layout Objects
pango_layout_set_line_spacing, function in Layout Objects
S
pango_shape_with_flags, function in Text Processing
T
pango_tailor_break, function in Text Processing
V
PANGO_VERSION_1_44, macro in Version Checking
docs/xml/api-index-1.6.xml 0000664 0001750 0001750 00000016437 13751777750 015376 0 ustar mclasen mclasen
]>
A
pango_attr_letter_spacing_new, function in Text Attributes
C
pango_context_get_font_map, function in Contexts
pango_context_get_matrix, function in Contexts
pango_context_set_matrix, function in Contexts
F
PangoFcDecoder, struct in PangoFcDecoder
PangoFcDecoderClass, struct in PangoFcDecoder
pango_fc_decoder_get_charset, function in PangoFcDecoder
pango_fc_decoder_get_glyph, function in PangoFcDecoder
pango_fc_font_map_add_decoder_find_func, function in PangoFcFontMap
pango_font_metrics_get_strikethrough_position, function in Fonts
pango_font_metrics_get_strikethrough_thickness, function in Fonts
pango_font_metrics_get_underline_position, function in Fonts
pango_font_metrics_get_underline_thickness, function in Fonts
pango_ft2_render_layout_line_subpixel, function in FreeType Fonts and Rendering
pango_ft2_render_layout_subpixel, function in FreeType Fonts and Rendering
pango_ft2_render_transformed, function in FreeType Fonts and Rendering
G
pango_glyph_item_free, function in Glyph Storage
pango_glyph_item_letter_space, function in Glyph Storage
L
pango_layout_get_ellipsize, function in Layout Objects
pango_layout_set_ellipsize, function in Layout Objects
M
PangoMatrix, struct in Glyph Storage
pango_matrix_concat, function in Glyph Storage
pango_matrix_copy, function in Glyph Storage
pango_matrix_free, function in Glyph Storage
PANGO_MATRIX_INIT, macro in Glyph Storage
pango_matrix_rotate, function in Glyph Storage
pango_matrix_scale, function in Glyph Storage
pango_matrix_translate, function in Glyph Storage
O
pango_ot_buffer_set_zero_width_marks, function in OpenType Font Handling
docs/xml/api-index-1.8.xml 0000664 0001750 0001750 00000017662 13751777750 015401 0 ustar mclasen mclasen
]>
A
pango_attr_shape_new_with_data, function in Text Attributes
pango_attr_size_new_absolute, function in Text Attributes
pango_attr_strikethrough_color_new, function in Text Attributes
pango_attr_underline_color_new, function in Text Attributes
F
pango_font_description_get_size_is_absolute, function in Fonts
pango_font_description_set_absolute_size, function in Fonts
L
pango_layout_get_font_description, function in Layout Objects
R
PangoRenderer, struct in PangoRenderer
PangoRendererClass, struct in PangoRenderer
pango_renderer_activate, function in PangoRenderer
pango_renderer_deactivate, function in PangoRenderer
pango_renderer_draw_error_underline, function in PangoRenderer
pango_renderer_draw_glyph, function in PangoRenderer
pango_renderer_draw_glyphs, function in PangoRenderer
pango_renderer_draw_layout, function in PangoRenderer
pango_renderer_draw_layout_line, function in PangoRenderer
pango_renderer_draw_rectangle, function in PangoRenderer
pango_renderer_draw_trapezoid, function in PangoRenderer
pango_renderer_get_color, function in PangoRenderer
pango_renderer_get_matrix, function in PangoRenderer
pango_renderer_part_changed, function in PangoRenderer
pango_renderer_set_color, function in PangoRenderer
pango_renderer_set_matrix, function in PangoRenderer
PangoRenderPart, enum in PangoRenderer
X
PangoXftRenderer, struct in Xft Fonts and Rendering
PangoXftRendererClass, struct in Xft Fonts and Rendering
pango_xft_renderer_new, function in Xft Fonts and Rendering
pango_xft_renderer_set_default_color, function in Xft Fonts and Rendering
pango_xft_renderer_set_draw, function in Xft Fonts and Rendering
pango_xft_render_layout, function in Xft Fonts and Rendering
pango_xft_render_layout_line, function in Xft Fonts and Rendering
pango_xft_render_transformed, function in Xft Fonts and Rendering
docs/xml/annotation-glossary.xml 0000664 0001750 0001750 00000012455 13751777750 017225 0 ustar mclasen mclasen
]>
Annotation Glossary
A
allow-none
NULL is OK, both for passing and for returning.
array
Parameter points to an array of items.
C
closure
This parameter is a 'user_data', for callbacks; many bindings can pass NULL here.
E
element-type
Generics and defining elements of containers and arrays.
I
inout
Parameter for input and for returning results. Default is transfer full.
N
not nullable
NULL must not be passed as the value in, out, in-out; or as a return value.
nullable
NULL may be passed as the value in, out, in-out; or as a return value.
O
optional
NULL may be passed instead of a pointer to a location.
out
Parameter for returning results. Default is transfer full.
out caller-allocates
Out parameter, where caller must allocate storage.
S
scope call
The callback is valid only during the call to the method.
skip
Exposed in C code, not necessarily available in other languages.
T
transfer container
Free data container after the code is done.
transfer full
Free data after the code is done.
transfer none
Don't free data after the code is done.
type
Override the parsed C type with given type.
U
Unstable
Unstable interfaces are experimental or transitional. They are typically used to
give outside developers early access to new or rapidly changing technology, or
to provide an interim solution to a problem where a more general solution is
anticipated. No claims are made about either source or binary compatibility from
one minor release to the next.
The Unstable interface level is a warning that these interfaces are subject to
change without warning and should not be used in unbundled products.
Given such caveats, customer impact need not be a factor when considering
incompatible changes to an Unstable interface in a major or minor release.
Nonetheless, when such changes are introduced, the changes should still be
mentioned in the release notes for the affected release.
docs/version.xml 0000664 0001750 0001750 00000000007 13751777735 014070 0 ustar mclasen mclasen 1.48.0
docs/pango.types 0000664 0001750 0001750 00000003207 13751777736 014061 0 ustar mclasen mclasen pango_alignment_get_type
pango_attr_iterator_get_type
pango_attr_list_get_type
pango_attr_type_get_type
pango_attribute_get_type
pango_bidi_type_get_type
pango_cairo_fc_font_get_type
pango_cairo_fc_font_map_get_type
pango_cairo_font_get_type
pango_cairo_font_map_get_type
pango_cairo_renderer_get_type
pango_color_get_type
pango_context_get_type
pango_coverage_get_type
pango_coverage_level_get_type
pango_direction_get_type
pango_ellipsize_mode_get_type
pango_engine_get_type
pango_engine_lang_get_type
pango_engine_shape_get_type
pango_fc_decoder_get_type
pango_fc_font_get_type
pango_fc_font_map_get_type
pango_font_description_get_type
pango_font_face_get_type
pango_font_family_get_type
pango_font_get_type
pango_font_map_get_type
pango_font_mask_get_type
pango_font_metrics_get_type
pango_fontset_get_type
pango_fontset_simple_get_type
pango_ft2_font_get_type
pango_ft2_font_map_get_type
pango_ft2_renderer_get_type
pango_glyph_item_get_type
pango_glyph_item_iter_get_type
pango_glyph_string_get_type
pango_gravity_get_type
pango_gravity_hint_get_type
pango_item_get_type
pango_language_get_type
pango_layout_get_type
pango_layout_iter_get_type
pango_layout_line_get_type
pango_matrix_get_type
pango_ot_info_get_type
pango_ot_ruleset_get_type
pango_render_part_get_type
pango_renderer_get_type
pango_script_get_type
pango_script_iter_get_type
pango_shape_flags_get_type
pango_show_flags_get_type
pango_stretch_get_type
pango_style_get_type
pango_tab_align_get_type
pango_tab_array_get_type
pango_underline_get_type
pango_variant_get_type
pango_weight_get_type
pango_wrap_mode_get_type
pango_xft_font_get_type
pango_xft_font_map_get_type
pango_xft_renderer_get_type
docs/pango-docs.sgml 0000664 0001750 0001750 00000014350 13751777746 014607 0 ustar mclasen mclasen
]>
Pango Reference Manual
Internationalized text layout and rendering
for Pango &version;.
Online at
https://developer.gnome.org/pango/
Basic Pango Interfaces
Rendering with Pango
Low Level Functionality
Deprecated APIs
Object Hierarchy
Index of all symbols
Index of deprecated symbols
Index of new symbols in 1.2
Index of new symbols in 1.4
Index of new symbols in 1.6
Index of new symbols in 1.8
Index of new symbols in 1.10
Index of new symbols in 1.12
Index of new symbols in 1.14
Index of new symbols in 1.16
Index of new symbols in 1.18
Index of new symbols in 1.20
Index of new symbols in 1.22
Index of new symbols in 1.24
Index of new symbols in 1.26
Index of new symbols in 1.30
Index of new symbols in 1.31
Index of new symbols in 1.32
Index of new symbols in 1.32.4
Index of new symbols in 1.34
Index of new symbols in 1.38
Index of new symbols in 1.42
Index of new symbols in 1.44
Index of new symbols in 1.46
docs/pango-sections.txt 0000664 0001750 0001750 00000070734 13751777746 015373 0 ustar mclasen mclasen
Text Processing
main
PangoItem
PangoAnalysis
PANGO_ANALYSIS_FLAG_CENTERED_BASELINE
PANGO_ANALYSIS_FLAG_IS_ELLIPSIS
PANGO_ANALYSIS_FLAG_NEED_HYPHEN
pango_itemize
pango_itemize_with_base_dir
pango_item_free
pango_item_copy
pango_item_new
pango_item_split
pango_item_apply_attrs
pango_reorder_items
pango_break
pango_get_log_attrs
pango_find_paragraph_boundary
pango_default_break
pango_tailor_break
PangoLogAttr
pango_shape
pango_shape_full
PangoShapeFlags
pango_shape_with_flags
PANGO_TYPE_DIRECTION
PANGO_TYPE_ITEM
pango_item_get_type
Contexts
context
PangoContext
pango_context_new
pango_context_changed
pango_context_get_serial
pango_context_set_font_map
pango_context_get_font_map
pango_context_get_font_description
pango_context_set_font_description
pango_context_get_language
pango_context_set_language
pango_context_get_base_dir
pango_context_set_base_dir
pango_context_get_base_gravity
pango_context_set_base_gravity
pango_context_get_gravity
pango_context_get_gravity_hint
pango_context_set_gravity_hint
pango_context_get_matrix
pango_context_set_matrix
pango_context_get_round_glyph_positions
pango_context_set_round_glyph_positions
pango_context_load_font
pango_context_load_fontset
pango_context_get_metrics
pango_context_list_families
PANGO_TYPE_CONTEXT
PangoContextClass
PANGO_CONTEXT
PANGO_CONTEXT_CLASS
PANGO_IS_CONTEXT
PANGO_IS_CONTEXT_CLASS
PANGO_CONTEXT_GET_CLASS
PANGO_TYPE_ITEM
pango_context_get_type
Glyph Storage
glyphs
PANGO_SCALE
PANGO_PIXELS
PANGO_PIXELS_FLOOR
PANGO_PIXELS_CEIL
PANGO_UNITS_ROUND
pango_units_to_double
pango_units_from_double
PangoRectangle
PANGO_ASCENT
PANGO_DESCENT
PANGO_LBEARING
PANGO_RBEARING
pango_extents_to_pixels
PangoMatrix
PANGO_MATRIX_INIT
pango_matrix_copy
pango_matrix_free
pango_matrix_translate
pango_matrix_scale
pango_matrix_rotate
pango_matrix_concat
pango_matrix_transform_point
pango_matrix_transform_distance
pango_matrix_transform_rectangle
pango_matrix_transform_pixel_rectangle
pango_matrix_get_font_scale_factor
pango_matrix_get_font_scale_factors
PangoGlyph
PANGO_GLYPH_EMPTY
PANGO_GLYPH_INVALID_INPUT
PANGO_GLYPH_UNKNOWN_FLAG
PANGO_GET_UNKNOWN_GLYPH
PangoGlyphInfo
PangoGlyphGeometry
PangoGlyphUnit
PangoGlyphVisAttr
PangoGlyphString
PangoGlyphItem
PangoGlyphItemIter
pango_glyph_string_new
pango_glyph_string_copy
pango_glyph_string_set_size
pango_glyph_string_free
pango_glyph_string_extents
pango_glyph_string_extents_range
pango_glyph_string_get_width
pango_glyph_string_index_to_x
pango_glyph_string_x_to_index
pango_glyph_string_get_logical_widths
pango_glyph_item_copy
pango_glyph_item_free
pango_glyph_item_split
pango_glyph_item_apply_attrs
pango_glyph_item_letter_space
pango_glyph_item_get_logical_widths
pango_glyph_item_iter_copy
pango_glyph_item_iter_free
pango_glyph_item_iter_init_start
pango_glyph_item_iter_init_end
pango_glyph_item_iter_next_cluster
pango_glyph_item_iter_prev_cluster
PANGO_TYPE_GLYPH_STRING
PANGO_TYPE_GLYPH_ITEM
PANGO_TYPE_GLYPH_ITEM_ITER
PANGO_TYPE_MATRIX
pango_glyph_string_get_type
pango_glyph_item_get_type
pango_glyph_item_iter_get_type
pango_matrix_get_type
Coverage Maps
coverage-maps
PangoCoverageLevel
PANGO_TYPE_COVERAGE_LEVEL
PangoCoverage
pango_coverage_new
pango_coverage_ref
pango_coverage_unref
pango_coverage_copy
pango_coverage_get
pango_coverage_max
pango_coverage_set
pango_coverage_to_bytes
pango_coverage_from_bytes
pango_coverage_level_get_type
pango_coverage_get_type
PANGO_COVERAGE
PANGO_COVERAGE_CLASS
PANGO_COVERAGE_GET_CLASS
PANGO_IS_COVERAGE
PANGO_IS_COVERAGE_CLASS
PANGO_TYPE_COVERAGE
PangoCoverageClass
PangoCoveragePrivate
Fonts
fonts
PangoFontDescription
PangoStyle
PangoWeight
PangoVariant
PangoStretch
PangoFontMask
pango_font_description_new
pango_font_description_copy
pango_font_description_copy_static
pango_font_description_hash
pango_font_description_equal
pango_font_description_free
pango_font_descriptions_free
pango_font_description_set_family
pango_font_description_set_family_static
pango_font_description_get_family
pango_font_description_set_style
pango_font_description_get_style
pango_font_description_set_variant
pango_font_description_get_variant
pango_font_description_set_weight
pango_font_description_get_weight
pango_font_description_set_stretch
pango_font_description_get_stretch
pango_font_description_set_size
pango_font_description_get_size
pango_font_description_set_absolute_size
pango_font_description_get_size_is_absolute
pango_font_description_set_gravity
pango_font_description_get_gravity
pango_font_description_set_variations
pango_font_description_set_variations_static
pango_font_description_get_variations
pango_font_description_get_set_fields
pango_font_description_unset_fields
pango_font_description_merge
pango_font_description_merge_static
pango_font_description_better_match
pango_font_description_from_string
pango_font_description_to_string
pango_font_description_to_filename
PangoFontMetrics
pango_font_metrics_ref
pango_font_metrics_unref
pango_font_metrics_get_ascent
pango_font_metrics_get_descent
pango_font_metrics_get_height
pango_font_metrics_get_approximate_char_width
pango_font_metrics_get_approximate_digit_width
pango_font_metrics_get_underline_thickness
pango_font_metrics_get_underline_position
pango_font_metrics_get_strikethrough_thickness
pango_font_metrics_get_strikethrough_position
PangoFont
pango_font_find_shaper
pango_font_describe
pango_font_describe_with_absolute_size
pango_font_get_face
pango_font_get_coverage
pango_font_has_char
pango_font_get_glyph_extents
pango_font_get_metrics
pango_font_get_font_map
pango_font_get_features
pango_font_get_hb_font
PangoFontFamily
pango_font_family_get_name
pango_font_family_is_monospace
pango_font_family_is_variable
pango_font_family_list_faces
pango_font_family_get_face
PangoFontFace
pango_font_face_get_face_name
pango_font_face_list_sizes
pango_font_face_describe
pango_font_face_is_synthesized
pango_font_face_get_family
PangoFontMap
PangoFontMapClass
pango_font_map_create_context
pango_font_map_load_font
pango_font_map_load_fontset
pango_font_map_list_families
pango_font_map_get_family
pango_font_map_get_serial
pango_font_map_changed
PangoFontset
PangoFontsetClass
pango_fontset_get_font
pango_fontset_get_metrics
PangoFontsetForeachFunc
pango_fontset_foreach
PANGO_TYPE_FONTSET
PANGO_TYPE_FONT_MAP
PANGO_FONT_MAP
PANGO_IS_FONT_MAP
PANGO_FONT_MAP_CLASS
PANGO_IS_FONT_MAP_CLASS
PANGO_FONT_MAP_GET_CLASS
PANGO_TYPE_FONT_FAMILY
PANGO_FONT_FAMILY
PANGO_IS_FONT_FAMILY
PANGO_TYPE_FONT_FACE
PANGO_FONT_FACE
PANGO_IS_FONT_FACE
PANGO_TYPE_FONT_METRICS
PANGO_TYPE_FONT
PANGO_FONT
PANGO_IS_FONT
PANGO_TYPE_FONT_DESCRIPTION
PANGO_TYPE_STYLE
PANGO_TYPE_WEIGHT
PANGO_TYPE_VARIANT
PANGO_TYPE_STRETCH
PANGO_TYPE_FONT_MASK
PANGO_FONT_FACE_CLASS
PANGO_IS_FONT_CLASS
PANGO_FONT_FACE_GET_CLASS
PangoFontFamilyClass
PangoFontFaceClass
PANGO_FONT_GET_CLASS
PANGO_FONT_CLASS
PANGO_IS_FONT_FAMILY_CLASS
PangoFontClass
PANGO_FONT_FAMILY_GET_CLASS
PANGO_FONT_FAMILY_CLASS
PANGO_IS_FONT_FACE_CLASS
PANGO_FONTSET
PANGO_IS_FONTSET
PANGO_FONTSET_CLASS
PANGO_IS_FONTSET_CLASS
PANGO_FONTSET_GET_CLASS
PANGO_FONTSET_SIMPLE
PANGO_IS_FONTSET_SIMPLE
PangoFontsetSimpleClass
pango_font_metrics_new
pango_font_get_type
pango_stretch_get_type
pango_style_get_type
pango_variant_get_type
pango_weight_get_type
pango_font_mask_get_type
pango_font_description_get_type
pango_font_map_get_type
pango_font_face_get_type
pango_font_family_get_type
pango_font_metrics_get_type
pango_fontset_get_type
pango_fontset_simple_get_type
PANGO_UNKNOWN_GLYPH_WIDTH
PANGO_UNKNOWN_GLYPH_HEIGHT
Text Attributes
text-attributes
PangoAttrType
PangoAttrClass
PangoAttribute
PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING
PANGO_ATTR_INDEX_TO_TEXT_END
PangoAttrString
PangoAttrLanguage
PangoAttrColor
PangoAttrInt
PangoAttrFloat
PangoAttrFontDesc
PangoAttrShape
PangoAttrSize
PangoAttrFontFeatures
pango_attr_type_register
pango_attr_type_get_name
pango_attribute_init
pango_attribute_copy
pango_attribute_equal
pango_attribute_destroy
pango_attr_language_new
pango_attr_family_new
pango_attr_style_new
pango_attr_variant_new
pango_attr_stretch_new
pango_attr_weight_new
pango_attr_size_new
pango_attr_size_new_absolute
pango_attr_font_desc_new
pango_attr_foreground_new
pango_attr_background_new
pango_attr_strikethrough_new
pango_attr_strikethrough_color_new
pango_attr_underline_new
pango_attr_underline_color_new
PangoUnderline
pango_attr_overline_new
pango_attr_overline_color_new
PangoOverline
pango_attr_shape_new
pango_attr_shape_new_with_data
PangoAttrDataCopyFunc
pango_attr_scale_new
PANGO_SCALE_XX_SMALL
PANGO_SCALE_X_SMALL
PANGO_SCALE_SMALL
PANGO_SCALE_MEDIUM
PANGO_SCALE_LARGE
PANGO_SCALE_X_LARGE
PANGO_SCALE_XX_LARGE
pango_attr_rise_new
pango_attr_letter_spacing_new
pango_attr_fallback_new
pango_attr_gravity_new
pango_attr_gravity_hint_new
pango_attr_font_features_new
pango_attr_foreground_alpha_new
pango_attr_background_alpha_new
pango_attr_allow_breaks_new
pango_attr_insert_hyphens_new
PangoShowFlags
pango_attr_show_new
PangoColor
pango_color_parse
pango_color_parse_with_alpha
pango_color_copy
pango_color_free
pango_color_to_string
PangoAttrList
pango_attr_list_new
pango_attr_list_ref
pango_attr_list_unref
pango_attr_list_copy
pango_attr_list_insert
pango_attr_list_insert_before
pango_attr_list_change
pango_attr_list_splice
pango_attr_list_filter
pango_attr_list_update
PangoAttrFilterFunc
pango_attr_list_get_attributes
pango_attr_list_equal
pango_attr_list_get_iterator
PangoAttrIterator
pango_attr_iterator_copy
pango_attr_iterator_next
pango_attr_iterator_range
pango_attr_iterator_get
pango_attr_iterator_get_font
pango_attr_iterator_get_attrs
pango_attr_iterator_destroy
PANGO_TYPE_ATTR_TYPE
PANGO_TYPE_UNDERLINE
PANGO_TYPE_COLOR
PANGO_TYPE_ATTR_LIST
pango_attr_type_get_type
pango_attr_list_get_type
pango_underline_get_type
pango_color_get_type
pango_attribute_get_type
Markup
markup
pango_parse_markup
pango_markup_parser_new
pango_markup_parser_finish
Tab Stops
tab-stops
PangoTabArray
PangoTabAlign
pango_tab_array_new
pango_tab_array_new_with_positions
pango_tab_array_copy
pango_tab_array_free
pango_tab_array_get_size
pango_tab_array_resize
pango_tab_array_set_tab
pango_tab_array_get_tab
pango_tab_array_get_tabs
pango_tab_array_get_positions_in_pixels
PANGO_TYPE_TAB_ARRAY
PANGO_TYPE_TAB_ALIGN
pango_tab_align_get_type
pango_tab_array_get_type
Layout Objects
layout
PangoLayout
PangoLayoutIter
pango_layout_new
pango_layout_copy
pango_layout_get_context
pango_layout_context_changed
pango_layout_get_serial
pango_layout_set_text
pango_layout_get_text
pango_layout_get_character_count
pango_layout_set_markup
pango_layout_set_markup_with_accel
pango_layout_set_attributes
pango_layout_get_attributes
pango_layout_set_font_description
pango_layout_get_font_description
pango_layout_set_width
pango_layout_get_width
pango_layout_set_height
pango_layout_get_height
pango_layout_set_wrap
pango_layout_get_wrap
pango_layout_is_wrapped
PangoWrapMode
pango_layout_set_ellipsize
pango_layout_get_ellipsize
pango_layout_is_ellipsized
PangoEllipsizeMode
pango_layout_set_indent
pango_layout_get_indent
pango_layout_get_spacing
pango_layout_set_spacing
pango_layout_set_line_spacing
pango_layout_get_line_spacing
pango_layout_set_justify
pango_layout_get_justify
pango_layout_set_auto_dir
pango_layout_get_auto_dir
pango_layout_get_direction
pango_layout_set_alignment
pango_layout_get_alignment
pango_layout_set_tabs
pango_layout_get_tabs
pango_layout_set_single_paragraph_mode
pango_layout_get_single_paragraph_mode
PangoAlignment
pango_layout_get_unknown_glyphs_count
pango_layout_get_log_attrs
pango_layout_get_log_attrs_readonly
pango_layout_index_to_pos
pango_layout_index_to_line_x
pango_layout_xy_to_index
pango_layout_get_cursor_pos
pango_layout_move_cursor_visually
pango_layout_get_extents
pango_layout_get_pixel_extents
pango_layout_get_size
pango_layout_get_pixel_size
pango_layout_get_baseline
pango_layout_get_line_count
pango_layout_get_line
pango_layout_get_line_readonly
pango_layout_get_lines
pango_layout_get_lines_readonly
pango_layout_get_iter
pango_layout_iter_copy
pango_layout_iter_free
pango_layout_iter_next_run
pango_layout_iter_next_char
pango_layout_iter_next_cluster
pango_layout_iter_next_line
pango_layout_iter_at_last_line
pango_layout_iter_get_index
pango_layout_iter_get_baseline
pango_layout_iter_get_run
pango_layout_iter_get_run_readonly
pango_layout_iter_get_line
pango_layout_iter_get_line_readonly
pango_layout_iter_get_layout
pango_layout_iter_get_char_extents
pango_layout_iter_get_cluster_extents
pango_layout_iter_get_run_extents
pango_layout_iter_get_line_yrange
pango_layout_iter_get_line_extents
pango_layout_iter_get_layout_extents
PangoLayoutLine
PangoLayoutRun
pango_layout_line_ref
pango_layout_line_unref
pango_layout_line_get_extents
pango_layout_line_get_pixel_extents
pango_layout_line_index_to_x
pango_layout_line_x_to_index
pango_layout_line_get_x_ranges
pango_layout_line_get_height
PANGO_TYPE_WRAP_MODE
PANGO_TYPE_ELLIPSIZE_MODE
PANGO_TYPE_ALIGNMENT
PANGO_TYPE_LAYOUT
PangoLayoutClass
PANGO_LAYOUT
PANGO_IS_LAYOUT
PANGO_LAYOUT_CLASS
PANGO_IS_LAYOUT_CLASS
PANGO_LAYOUT_GET_CLASS
PANGO_TYPE_LAYOUT_ITER
PANGO_TYPE_LAYOUT_LINE
pango_layout_get_type
pango_layout_iter_get_type
pango_layout_line_get_type
pango_alignment_get_type
pango_wrap_mode_get_type
pango_ellipsize_mode_get_type
Scripts and Languages
scripts
PangoScript
PangoScriptIter
pango_script_for_unichar
pango_script_get_sample_language
pango_script_iter_new
pango_script_iter_get_range
pango_script_iter_next
pango_script_iter_free
PangoLanguage
pango_language_from_string
pango_language_to_string
pango_language_matches
pango_language_includes_script
pango_language_get_scripts
pango_language_get_default
pango_language_get_preferred
pango_language_get_sample_string
PANGO_TYPE_LANGUAGE
PANGO_TYPE_SCRIPT
pango_script_get_type
pango_language_get_type
Engines
engines
PangoEngineInfo
PangoEngineScriptInfo
PangoEngine
PangoEngineClass
script_engine_list
script_engine_init
script_engine_exit
script_engine_create
PANGO_ENGINE
PANGO_IS_ENGINE
PANGO_TYPE_ENGINE
PANGO_ENGINE_CLASS
PANGO_IS_ENGINE_CLASS
PANGO_ENGINE_GET_CLASS
pango_engine_get_type
PANGO_MODULE_ENTRY
PANGO_ENGINE_DEFINE_TYPE
PangoEngineLang
pango-engine-lang
PangoEngineLang
PangoEngineLangClass
PANGO_ENGINE_TYPE_LANG
PANGO_ENGINE_LANG_DEFINE_TYPE
PANGO_ENGINE_LANG
PANGO_IS_ENGINE_LANG
PANGO_TYPE_ENGINE_LANG
PANGO_ENGINE_LANG_CLASS
PANGO_IS_ENGINE_LANG_CLASS
PANGO_ENGINE_LANG_GET_CLASS
pango_engine_lang_get_type
PangoEngineShape
pango-engine-shape
PangoEngineShape
PangoEngineShapeClass
PANGO_ENGINE_TYPE_SHAPE
PANGO_ENGINE_SHAPE_DEFINE_TYPE
PANGO_ENGINE_SHAPE
PANGO_IS_ENGINE_SHAPE
PANGO_TYPE_ENGINE_SHAPE
PANGO_ENGINE_SHAPE_CLASS
PANGO_IS_ENGINE_SHAPE_CLASS
PANGO_ENGINE_SHAPE_GET_CLASS
pango_engine_shape_get_type
Modules
modules
PangoIncludedModule
PangoMap
PangoMapEntry
pango_find_map
pango_map_get_engine
pango_map_get_engines
pango_module_register
pango-renderer
PangoRenderer
PangoRenderPart
PANGO_TYPE_RENDER_PART
PangoRendererClass
PangoRenderer
pango_renderer_draw_layout
pango_renderer_draw_layout_line
pango_renderer_draw_glyphs
pango_renderer_draw_glyph_item
pango_renderer_draw_rectangle
pango_renderer_draw_error_underline
pango_renderer_draw_trapezoid
pango_renderer_draw_glyph
pango_renderer_activate
pango_renderer_deactivate
pango_renderer_part_changed
pango_renderer_set_color
pango_renderer_get_color
pango_renderer_set_alpha
pango_renderer_get_alpha
pango_renderer_set_matrix
pango_renderer_get_matrix
pango_renderer_get_layout
pango_renderer_get_layout_line
PANGO_RENDERER
PANGO_IS_RENDERER
PANGO_TYPE_RENDERER
pango_renderer_get_type
PANGO_RENDERER_CLASS
PANGO_IS_RENDERER_CLASS
PANGO_RENDERER_GET_CLASS
pango_render_part_get_type
PangoRendererPrivate
Win32 Fonts and Rendering
win32-fonts
pango_win32_get_context
pango_win32_render
pango_win32_render_transformed
pango_win32_render_layout_line
pango_win32_render_layout
pango_win32_get_unknown_glyph
pango_win32_font_get_glyph_index
pango_win32_font_select_font
pango_win32_font_done_font
pango_win32_font_get_metrics_factor
pango_win32_get_debug_flag
pango_win32_get_dc
PangoWin32FontCache
pango_win32_font_cache_new
pango_win32_font_cache_free
pango_win32_font_cache_load
pango_win32_font_cache_loadw
pango_win32_font_cache_unload
pango_win32_font_map_for_display
pango_win32_shutdown_display
pango_win32_font_map_get_font_cache
pango_win32_font_logfont
pango_win32_font_logfontw
pango_win32_font_description_from_logfont
pango_win32_font_description_from_logfontw
STRICT
FreeType Fonts and Rendering
freetype-fonts
PangoFT2FontMap
pango_ft2_font_map_new
pango_ft2_font_map_set_resolution
pango_ft2_font_map_create_context
PangoFT2SubstituteFunc
pango_ft2_font_map_set_default_substitute
pango_ft2_font_map_substitute_changed
pango_ft2_get_context
pango_ft2_render
pango_ft2_render_transformed
pango_ft2_render_layout_line
pango_ft2_render_layout_line_subpixel
pango_ft2_render_layout
pango_ft2_render_layout_subpixel
pango_ft2_get_unknown_glyph
pango_ft2_font_get_kerning
pango_ft2_font_get_face
pango_ft2_font_get_coverage
pango_ft2_font_map_for_display
pango_ft2_shutdown_display
PANGO_TYPE_FT2_FONT_MAP
PANGO_FT2_FONT_MAP
PANGO_FT2_IS_FONT_MAP
pango_ft2_font_map_get_type
STRICT
Xft Fonts and Rendering
xft-fonts
PangoXftFont
PangoXftFontMap
pango_xft_get_context
pango_xft_get_font_map
pango_xft_set_default_substitute
PangoXftSubstituteFunc
pango_xft_substitute_changed
pango_xft_shutdown_display
pango_xft_font_get_font
pango_xft_font_get_display
pango_xft_font_has_char
pango_xft_font_lock_face
pango_xft_font_unlock_face
pango_xft_font_get_glyph
pango_xft_font_get_unknown_glyph
PangoXftRenderer
PangoXftRendererClass
pango_xft_renderer_new
pango_xft_renderer_set_draw
pango_xft_renderer_set_default_color
pango_xft_render
pango_xft_picture_render
pango_xft_render_transformed
pango_xft_render_layout_line
pango_xft_render_layout
PANGO_TYPE_XFT_FONT
PANGO_XFT_FONT
PANGO_XFT_IS_FONT
PANGO_TYPE_XFT_FONT_MAP
PANGO_XFT_FONT_MAP
PANGO_XFT_IS_FONT_MAP
PANGO_XFT_RENDERER
PANGO_IS_XFT_RENDERER
PANGO_TYPE_XFT_RENDERER
PANGO_XFT_RENDERER_CLASS
PANGO_IS_XFT_RENDERER_CLASS
PANGO_XFT_RENDERER_GET_CLASS
PangoXftRendererPrivate
pango_xft_font_get_type
pango_xft_font_map_get_type
pango_xft_renderer_get_type
Cairo Rendering
pangocairo
PangoCairoFont
PangoCairoFontMap
pango_cairo_font_map_get_default
pango_cairo_font_map_set_default
pango_cairo_font_map_new
pango_cairo_font_map_new_for_font_type
pango_cairo_font_map_get_font_type
pango_cairo_font_map_set_resolution
pango_cairo_font_map_get_resolution
pango_cairo_font_map_create_context
pango_cairo_font_get_scaled_font
pango_cairo_context_set_resolution
pango_cairo_context_get_resolution
pango_cairo_context_set_font_options
pango_cairo_context_get_font_options
PangoCairoShapeRendererFunc
pango_cairo_context_set_shape_renderer
pango_cairo_context_get_shape_renderer
pango_cairo_create_context
pango_cairo_update_context
pango_cairo_create_layout
pango_cairo_update_layout
pango_cairo_show_glyph_string
pango_cairo_show_glyph_item
pango_cairo_show_layout_line
pango_cairo_show_layout
pango_cairo_show_error_underline
pango_cairo_glyph_string_path
pango_cairo_layout_line_path
pango_cairo_layout_path
pango_cairo_error_underline_path
PANGO_CAIRO_FONT
PANGO_CAIRO_FONT_MAP
PANGO_IS_CAIRO_FONT
PANGO_IS_CAIRO_FONT_MAP
PANGO_TYPE_CAIRO_FONT
PANGO_TYPE_CAIRO_FONT_MAP
pango_cairo_font_get_type
pango_cairo_font_map_get_type
CoreText Fonts
coretext-fonts
pango_core_text_font_get_ctfont
PANGO_CAIRO_CORE_TEXT_FONT
PANGO_CAIRO_CORE_TEXT_FONT_CLASS
PANGO_CAIRO_CORE_TEXT_FONT_GET_CLASS
PANGO_CAIRO_CORE_TEXT_FONT_MAP
PANGO_CORE_TEXT_FONT
PANGO_CORE_TEXT_FONT_CLASS
PANGO_CORE_TEXT_FONT_GET_CLASS
PANGO_CORE_TEXT_FONT_MAP
PANGO_CORE_TEXT_FONT_MAP_CLASS
PANGO_CORE_TEXT_FONT_MAP_GET_CLASS
PANGO_CORE_TEXT_IS_FONT_MAP
PANGO_IS_CAIRO_CORE_TEXT_FONT_CLASS
PANGO_IS_CAIRO_CORE_TEXT_FONT_MAP
PANGO_IS_CORE_TEXT_FONT
PANGO_IS_CORE_TEXT_FONT_CLASS
PANGO_IS_CORE_TEXT_FONT_MAP_CLASS
PANGO_TYPE_CAIRO_CORE_TEXT_FONT
PANGO_TYPE_CAIRO_CORE_TEXT_FONT_MAP
PANGO_TYPE_CORE_TEXT_FONT
PANGO_TYPE_CORE_TEXT_FONT_MAP
PangoCairoCoreTextFont
PangoCairoCoreTextFontClass
PangoCairoCoreTextFontMap
PangoCoreTextFace
PangoCoreTextFamily
PangoCoreTextFont
PangoCoreTextFontClass
PangoCoreTextFontMap
PangoCoreTextFontMapClass
PangoCoreTextFontPrivate
pango_cairo_core_text_font_get_type
pango_cairo_core_text_font_map_get_type
pango_core_text_font_get_type
pango_core_text_font_map_get_type
pangofc-fontmap
PangoFcFontMap
PangoFcFontMap
PangoFcFontMapClass
pango_fc_font_map_create_context
PangoFcDecoderFindFunc
pango_fc_font_map_add_decoder_find_func
pango_fc_font_map_find_decoder
pango_fc_font_map_cache_clear
pango_fc_font_map_config_changed
pango_fc_font_map_shutdown
pango_fc_font_map_set_config
pango_fc_font_map_get_config
PangoFcSubstituteFunc
pango_fc_font_map_set_default_substitute
pango_fc_font_map_substitute_changed
pango_fc_font_description_from_pattern
PANGO_FC_FONT_FEATURES
PANGO_FC_GRAVITY
PANGO_FC_VERSION
PANGO_FC_PRGNAME
PANGO_FC_FONT_VARIATIONS
PANGO_FC_FONT_MAP
PANGO_IS_FC_FONT_MAP
PANGO_TYPE_FC_FONT_MAP
PANGO_FC_FONT_MAP_CLASS
PANGO_IS_FC_FONT_MAP_CLASS
PANGO_FC_FONT_MAP_GET_CLASS
PangoFcFontMapPrivate
pango_fc_font_map_get_type
pangofc-font
PangoFcFont
PangoFcFont
PangoFcFontClass
pango_fc_font_lock_face
pango_fc_font_unlock_face
pango_fc_font_has_char
pango_fc_font_get_glyph
pango_fc_font_get_unknown_glyph
pango_fc_font_kern_glyphs
pango_fc_font_get_languages
pango_fc_font_get_pattern
PANGO_FC_FONT
PANGO_IS_FC_FONT
PANGO_TYPE_FC_FONT
PANGO_FC_FONT_CLASS
PANGO_IS_FC_FONT_CLASS
PANGO_FC_FONT_GET_CLASS
pango_fc_font_get_type
pangofc-decoder
PangoFcDecoder
PangoFcDecoder
PangoFcDecoderClass
pango_fc_decoder_get_charset
pango_fc_decoder_get_glyph
PANGO_FC_DECODER
PANGO_IS_FC_DECODER
PANGO_TYPE_FC_DECODER
pango_fc_decoder_get_type
PANGO_FC_DECODER_CLASS
PANGO_IS_FC_DECODER_CLASS
PANGO_FC_DECODER_GET_CLASS
OpenType Font Handling
opentype
PangoOTTag
PangoOTInfo
PangoOTBuffer
PangoOTGlyph
PangoOTRuleset
PangoOTRulesetDescription
PangoOTTableType
PangoOTFeatureMap
PANGO_OT_TAG_MAKE
PANGO_OT_TAG_MAKE_FROM_STRING
PANGO_OT_ALL_GLYPHS
PANGO_OT_NO_FEATURE
PANGO_OT_NO_SCRIPT
PANGO_OT_DEFAULT_LANGUAGE
PANGO_OT_TAG_DEFAULT_LANGUAGE
PANGO_OT_TAG_DEFAULT_SCRIPT
pango_ot_info_get
pango_ot_info_find_script
pango_ot_info_find_language
pango_ot_info_find_feature
pango_ot_info_list_scripts
pango_ot_info_list_languages
pango_ot_info_list_features
pango_ot_buffer_new
pango_ot_buffer_destroy
pango_ot_buffer_clear
pango_ot_buffer_add_glyph
pango_ot_buffer_set_rtl
pango_ot_buffer_set_zero_width_marks
pango_ot_buffer_get_glyphs
pango_ot_buffer_output
pango_ot_ruleset_get_for_description
pango_ot_ruleset_new
pango_ot_ruleset_new_for
pango_ot_ruleset_new_from_description
pango_ot_ruleset_add_feature
pango_ot_ruleset_maybe_add_feature
pango_ot_ruleset_maybe_add_features
pango_ot_ruleset_get_feature_count
pango_ot_ruleset_substitute
pango_ot_ruleset_position
pango_ot_ruleset_description_copy
pango_ot_ruleset_description_equal
pango_ot_ruleset_description_free
pango_ot_ruleset_description_hash
pango_ot_tag_from_language
pango_ot_tag_from_script
pango_ot_tag_to_language
pango_ot_tag_to_script
PANGO_IS_OT_INFO
PANGO_IS_OT_RULESET
PANGO_OT_INFO
PANGO_OT_RULESET
PANGO_TYPE_OT_INFO
PANGO_TYPE_OT_RULESET
pango_ot_info_get_type
pango_ot_ruleset_get_type
Miscellaneous Utilities
utils
pango_split_file_list
pango_trim_string
pango_read_line
pango_skip_space
pango_scan_word
pango_scan_string
pango_scan_int
pango_parse_enum
pango_parse_style
pango_parse_variant
pango_parse_weight
pango_parse_stretch
pango_log2vis_get_embedding_levels
pango_is_zero_width
pango_quantize_line_geometry
Version Checking
pango-version
PANGO_VERSION_ENCODE
PANGO_VERSION
PANGO_VERSION_MAJOR
PANGO_VERSION_MINOR
PANGO_VERSION_MICRO
PANGO_VERSION_STRING
PANGO_VERSION_CHECK
pango_version
pango_version_string
pango_version_check
PANGO_VERSION_1_2
PANGO_VERSION_1_4
PANGO_VERSION_1_6
PANGO_VERSION_1_8
PANGO_VERSION_1_10
PANGO_VERSION_1_12
PANGO_VERSION_1_14
PANGO_VERSION_1_16
PANGO_VERSION_1_18
PANGO_VERSION_1_20
PANGO_VERSION_1_22
PANGO_VERSION_1_24
PANGO_VERSION_1_26
PANGO_VERSION_1_28
PANGO_VERSION_1_30
PANGO_VERSION_1_32
PANGO_VERSION_1_34
PANGO_VERSION_1_36
PANGO_VERSION_1_38
PANGO_VERSION_1_40
PANGO_VERSION_1_42
PANGO_VERSION_1_44
PANGO_VERSION_MIN_REQUIRED
PANGO_VERSION_MAX_ALLOWED
PANGO_UNAVAILABLE
PANGO_AVAILABLE_IN_ALL
PANGO_VERSION_CUR_STABLE
PANGO_VERSION_PREV_STABLE
PANGO_AVAILABLE_IN_1_2
PANGO_AVAILABLE_IN_1_4
PANGO_AVAILABLE_IN_1_6
PANGO_AVAILABLE_IN_1_8
PANGO_AVAILABLE_IN_1_10
PANGO_AVAILABLE_IN_1_12
PANGO_AVAILABLE_IN_1_14
PANGO_AVAILABLE_IN_1_16
PANGO_AVAILABLE_IN_1_18
PANGO_AVAILABLE_IN_1_20
PANGO_AVAILABLE_IN_1_22
PANGO_AVAILABLE_IN_1_24
PANGO_AVAILABLE_IN_1_26
PANGO_AVAILABLE_IN_1_28
PANGO_AVAILABLE_IN_1_30
PANGO_AVAILABLE_IN_1_32
PANGO_AVAILABLE_IN_1_34
PANGO_AVAILABLE_IN_1_36
PANGO_AVAILABLE_IN_1_38
PANGO_AVAILABLE_IN_1_40
PANGO_AVAILABLE_IN_1_42
PANGO_AVAILABLE_IN_1_44
PANGO_DEPRECATED
PANGO_DEPRECATED_FOR
PANGO_DEPRECATED_IN_1_2
PANGO_DEPRECATED_IN_1_2_FOR
PANGO_DEPRECATED_IN_1_4
PANGO_DEPRECATED_IN_1_4_FOR
PANGO_DEPRECATED_IN_1_6
PANGO_DEPRECATED_IN_1_6_FOR
PANGO_DEPRECATED_IN_1_8
PANGO_DEPRECATED_IN_1_8_FOR
PANGO_DEPRECATED_IN_1_10
PANGO_DEPRECATED_IN_1_10_FOR
PANGO_DEPRECATED_IN_1_12
PANGO_DEPRECATED_IN_1_12_FOR
PANGO_DEPRECATED_IN_1_14
PANGO_DEPRECATED_IN_1_14_FOR
PANGO_DEPRECATED_IN_1_16
PANGO_DEPRECATED_IN_1_16_FOR
PANGO_DEPRECATED_IN_1_18
PANGO_DEPRECATED_IN_1_18_FOR
PANGO_DEPRECATED_IN_1_20
PANGO_DEPRECATED_IN_1_20_FOR
PANGO_DEPRECATED_IN_1_22
PANGO_DEPRECATED_IN_1_22_FOR
PANGO_DEPRECATED_IN_1_24
PANGO_DEPRECATED_IN_1_24_FOR
PANGO_DEPRECATED_IN_1_26
PANGO_DEPRECATED_IN_1_26_FOR
PANGO_DEPRECATED_IN_1_28
PANGO_DEPRECATED_IN_1_28_FOR
PANGO_DEPRECATED_IN_1_30
PANGO_DEPRECATED_IN_1_30_FOR
PANGO_DEPRECATED_IN_1_32
PANGO_DEPRECATED_IN_1_32_FOR
PANGO_DEPRECATED_IN_1_34
PANGO_DEPRECATED_IN_1_34_FOR
PANGO_DEPRECATED_IN_1_36
PANGO_DEPRECATED_IN_1_36_FOR
PANGO_DEPRECATED_IN_1_38
PANGO_DEPRECATED_IN_1_38_FOR
PANGO_DEPRECATED_IN_1_40
PANGO_DEPRECATED_IN_1_40_FOR
PANGO_DEPRECATED_IN_1_42
PANGO_DEPRECATED_IN_1_42_FOR
PANGO_DEPRECATED_IN_1_44
PANGO_DEPRECATED_IN_1_44_FOR
Vertical Text
vertical
PangoGravity
PangoGravityHint
PANGO_GRAVITY_IS_IMPROPER
PANGO_GRAVITY_IS_VERTICAL
pango_gravity_get_for_matrix
pango_gravity_get_for_script
pango_gravity_get_for_script_and_width
pango_gravity_to_rotation
PANGO_TYPE_GRAVITY
PANGO_TYPE_GRAVITY_HINT
pango_gravity_get_type
pango_gravity_hint_get_type
Bidirectional Text
bidi
PangoDirection
pango_unichar_direction
pango_find_base_dir
pango_get_mirror_char
PangoBidiType
pango_bidi_type_for_unichar
PANGO_TYPE_BIDI_TYPE
pango_bidi_type_get_type
pango_direction_get_type
docs/pango-overrides.txt 0000664 0001750 0001750 00000000000 13751777746 015521 0 ustar mclasen mclasen docs/html/ 0000775 0001750 0001750 00000000000 13751777766 012634 5 ustar mclasen mclasen docs/html/layout.png 0000664 0001750 0001750 00000066373 13751777746 014674 0 ustar mclasen mclasen ‰PNG
IHDR ô I m‚ß! ÀzTXtRaw profile type exif xÚÕ›W’$9vEÿ±
.êA,ÒŒ;àòy."KNMÛLXÕ•‘ž¸ðvçþûºÿâOÉ¡¸lµ•^ŠçOî¹ÇÁ7Íþ|^ƒÏïëûsó×wá×÷]î_ßF^¯éó‹r>¯að¾ý¸ æ¯÷ç¯ï»º>ßÄö5Ð×/øýIº³¾ß_“ü(ÅÏûáëg׿.å§å|ý‹ëû2>cÿös®cã¥èâI!ù÷5~EêiðZßW‹zGß¾æô‡ø¹¯yü1€£}_æ/ñóßf–~„ã3зe•ßâôõ~°ßÞOßo™Qˆß3IuÕÿüç§øݻ۽糺‘©£žË×¢¾-ñ}Ç'áLï²ÂßÊ?ãûúþvþ6?ü"k›¥Nç'?ô‰ø
9ì0Â
ç½®°˜bŽ'V^c\1½÷Zª±Çõ’’õ7ÜXùÙ©‘«EæoÇïs ï¾]÷ãf;ïÀ'c`0rüë_÷û÷ï/Ý«2AÁíÅŠyEÕÓPæô•O‘p¿bj/¾Á}^üï”ØDí…¹±ÀáçgˆiáGm¥—çäÍñÑì?ýêþ€qoc2!‘_B²P‚¯1Öˆc#?ƒ™Ç”ã$ÁœÅÍ,cN©œuo®©á}6Zü¼
¼K…&ij ’•³åB¿5Jh8K–ͬXµfÝFI%+¥Ô"œ5Õ\–Zk«½Ž–ZnÖJ«µÞF=cæzéµ·ÞûÜtäÁXƒÏÞ˜q¦™§Í2ël³Ï±(Ÿ•—²êj«¯±ãNp»ìºÛî{œp(¥“rêi§Ÿq©µ›n¾vË·Ý~Ç÷¬}eõ׬ýž¹¿ÎZøÊZ|‰Òçê¬ñv߆‚SÎÈXÌŒWe€‚ŽÊ™o!ç¨Ì)g¾Çä¸Å,MÉÙA#ƒù„h7|ÏÝÌýÓ¼9¢ûïæ-þ)sN©û¿ÈœSê~ÊÜ?æíYÛãÁmz RS2Ñ~|hÄÆtëß{uþ?àߨϘ՞{™µ;#Á-àè$—wÝØî»]bå0¯qÕh{ŸAÀÈ[M{ï5ÖU™ä²ãj§„’¦)áýø:<½„å„Ê€.mý0ü™NK?QÀŒ]uh”QªÏ̘þô”OË3îµ;ÿmªkùãwŒþªÐwƒ.(+k°~,éußQôʽü\ýyMÌçî·(G=S—Ê›Ÿ+¥[7(ÛÂØ4-0F—=¨}P¸ŠdPÌŒ{ViãØ]i^Ò?W²WµÍœæéñ[®ç‹®7ªæút.Á?-ÝÞLÒU¯óæ}OÈtáã/–ôuíçÊo×}¿^ׅݽ뾮¢ÎµNO ƒò®$ìî4åJ™EqÿÎ[¸ö&
ÊŸ6J¶ØhZHÖv
fqÞu:âÜÏþòÕèÔÃ$¤ô;½6«¿hº[Zo>ïI#¶4[Ý'´“.¢
ænÉ—YX3ˆüÔy(Qʯ»5ªRaH;â
¹ ]¥1 m†LÇ\@‡é"¨,qÅ—*º1ÁªÛ¦£õS¾1k;„À…”Z¢í-ìyhw£üµÀeÔj¨±NñÈbí®¬ëWO‡¸<*ü2ÏŠÂ Ælä~-µ7Ka
¨µ¹Ê9k$ݬõN«®)gÀ2ëŠÃhn@e€+¦Âw%du]šô?UÎ.
(æ²€µ8BGk6Æ>ôØ¡k+*vêà>TÝdÉÊ<ÑOÀ “
ó„ìЀyû±öE³¡½&4rb¡§Í=7ðÚ{Ém„ÞmŸ%šO¹¥u«`!ÜÌäXRt‹ÄæÝFÊX½LûÕà3
”"¯õ¼€îN†V˜£ò2!šõîÝ,wžÔHÔšt');,BD¼Î˜‹îBÞÕ@c¿šðÐׄcð¹Tv¬šNæî·Åi”\(öÆê$>3lÅ
Qö”é©s뻩ÕUÃ&„uEÇt2¸±Êùž3‰+—¤oγå“Cºê|Æ:kÖ±ë\µµÅZBæ~øèÓ¬5çh-[§2
Ø‘²’ˆºš|Ÿvv¡ìVP¶Ê©6ª¤ÎÜÚj{Ý}VÍÎÂÈ€WîµAT Hîvàåy@þÄ-(¯>zÈÑWñR™|@hwÐîl:@ˆХ r–q2½×”·R„5fˆÊÐBÖé†q€<â—ãj›Ù·ÍÍFÜÍfã.Ïx°æ%Ø~W¾o^/š Á4g!Ù)y}¼‡ãðV€'–rÛã–ð¬o«bN`E1:ðY×ö³>MãDÊ¥"ÂñÝ¥ÓŒRèžð!)`RÒQ Ü*„ئj‡xÀøí]E^‹£É£ëŒîºuwJä†òf•ÇîHs"üÒW48@²‚Þ7Fݪ4XIz!"ˆN˼LjŽˆ´˜„Ü!•1‚„¢Ógžef¹]›d‡@lË[ü©ï³«6î"k2K’plyj¦V
%BÕÛ+a€'$œl7ø]tûhÉQévîHÍ XÌÈ5zæZ›{p>@m
6=ÉÀÒùùÒÅtrïÂw¸f'„¿è0
טˆ<…= Zö°ª´#Van¸.Þ°‰[H>á_
· _!·c7À5*´
¦ ª#ªóàǯÈé›Î¥u‰ï)»#:1øl^öt.«WDŒUˆœZ[¦œçÛaW‘õr€¦R/´ìÞÖd,O†‘½P.(ó.Ë(KZ6W†°¹ÊV@i±’£*“Ô#§bèûq¨½66 H·©:Ñçp,ôŽð'U§ï&Yã¹D 'õ¬Éà‡Ÿ‚-Z-=ACtb£àÆq¶žýÛ Î_}j€&Þ‘Î'Ø}Üegfë°¡ã.Ž) à†=χ ‘]{¡;ÉùK9&J+J—[CËizÊ83ÿ¤‚9ë½xcÞòϺ%w‚
°Ñ¬X‡ŠË.tÃ>øö0[h½*È‚