|
class pango.GlyphString(gobject.GBoxed): |
A pango.GlyphString
object contains strings of glyphs with geometry and visual attribute
information.
pango.GlyphString()
Returns : | a new pango.GlyphString |
Creates a new pango.GlyphString
containing no glyphs.
def set_size(new_len
)
| the new length of the string. |
The set_size
() method resizes the glyph
string to the length specified by new_len
.
def copy()
Returns : | a pango.GlyphString |
The copy
() method returns a pango.GlyphString
that is a copy of the glyph string.
def extents(font
)
| a pango.Font |
Returns : | a 2-tuple containing two 4-tuples representing the ink and logical extents rectangles of the glyph string. |
The extents
() method returns a 2-tuple
containing two 4-tuples representing the logical and ink extents rectangles
of the glyph string as rendered in the pango.Font
specified
by font
. See the pango.Font.get_glyph_extents
()
for details about the interpretation of the rectangles.
def extents_range(start
, end
, font
)
| start index |
| end index |
| a pango.Font |
Returns : | a 2-tuple containing two 4-tuples representing the ink and logical extents rectangles of the glyph string range. |
The extents_range
() method returns a
2-tuple containing two 4-tuples representing the logical and ink extents
rectangles of a range (specified by start
and
end
) of the glyph string as rendered in the pango.Font
specified
by font
. 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).
def get_logical_widths(text
, embedding_level
)
| the text corresponding to the glyphs |
| the embedding level of the string |
Returns : | a list containing the calculated character widths. |
The get_logical_widths
() method returns
a list of the screen width of the characters in the specified
text
that corresponds to the glyph string. When
multiple characters compose a single cluster, the width of the entire
cluster is divided equally among the characters.
© manpagez.com 2000-2024 Individual documents may contain additional copyright information.