Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- PangoFT2.font_get_coverage(font, language)[source]¶
- Parameters:
font (
Pango.Font
) – a Pango FT2 fontlanguage (
Pango.Language
) – a language tag.
- Returns:
a
PangoCoverage
- Return type:
Gets the
PangoCoverage
for aPangoFT2Font
.Use [method`Pango`.Font.get_coverage] instead.
- PangoFT2.font_get_kerning(font, left, right)[source]¶
- Parameters:
font (
Pango.Font
) – aPangoFont
left (
int
) – the leftPangoGlyph
right (
int
) – the rightPangoGlyph
- Returns:
The amount of kerning (in Pango units) to apply for the given combination of glyphs.
- Return type:
Retrieves kerning information for a combination of two glyphs.
Use
PangoFc.Font.kern_glyphs
() instead.
- PangoFT2.get_unknown_glyph(font)[source]¶
- Parameters:
font (
Pango.Font
) – aPangoFont
- Returns:
a glyph index into font, or
Pango.GLYPH_EMPTY
- Return type:
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.
- PangoFT2.render(bitmap, font, glyphs, x, y)[source]¶
- Parameters:
bitmap (
freetype2.Bitmap
) – the FreeType2 bitmap onto which to draw the stringfont (
Pango.Font
) – the font in which to draw the stringglyphs (
Pango.GlyphString
) – the glyph string to drawx (
int
) – the x position of the start of the string (in pixels)y (
int
) – the y position of the baseline (in pixels)
Renders a
PangoGlyphString
onto a FreeType2 bitmap.
- PangoFT2.render_layout(bitmap, layout, x, y)[source]¶
- Parameters:
bitmap (
freetype2.Bitmap
) – afreetype2.Bitmap
to render the layout ontolayout (
Pango.Layout
) – aPangoLayout
x (
int
) – the X position of the left of the layout (in pixels)y (
int
) – the Y position of the top of the layout (in pixels)
Render a
PangoLayout
onto a FreeType2 bitmap
- PangoFT2.render_layout_line(bitmap, line, x, y)[source]¶
- Parameters:
bitmap (
freetype2.Bitmap
) – afreetype2.Bitmap
to render the line ontoline (
Pango.LayoutLine
) – aPangoLayoutLine
x (
int
) – the x position of start of string (in pixels)y (
int
) – the y position of baseline (in pixels)
Render a
PangoLayoutLine
onto a FreeType2 bitmap
- PangoFT2.render_layout_line_subpixel(bitmap, line, x, y)[source]¶
- Parameters:
bitmap (
freetype2.Bitmap
) – afreetype2.Bitmap
to render the line ontoline (
Pango.LayoutLine
) – aPangoLayoutLine
x (
int
) – the x position of start of string (in Pango units)y (
int
) – the y position of baseline (in Pango units)
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.)
New in version 1.6.
- PangoFT2.render_layout_subpixel(bitmap, layout, x, y)[source]¶
- Parameters:
bitmap (
freetype2.Bitmap
) – afreetype2.Bitmap
to render the layout ontolayout (
Pango.Layout
) – aPangoLayout
x (
int
) – the X position of the left of the layout (in Pango units)y (
int
) – the Y position of the top of the layout (in Pango units)
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.)
New in version 1.6.
- PangoFT2.render_transformed(bitmap, matrix, font, glyphs, x, y)[source]¶
- Parameters:
bitmap (
freetype2.Bitmap
) – the FreeType2 bitmap onto which to draw the stringmatrix (
Pango.Matrix
orNone
) – aPangoMatrix
font (
Pango.Font
) – the font in which to draw the stringglyphs (
Pango.GlyphString
) – the glyph string to drawx (
int
) – the x position of the start of the string (in Pango units in user space coordinates)y (
int
) – the y position of the baseline (in Pango units in user space coordinates)
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.New in version 1.6.