Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- PangoXft.get_font_map(display, screen)[source]¶
- Parameters:
display (
xlib.Display
) – an X displayscreen (
int
) – the screen number of a screen within display
- Returns:
a
PangoFontMap
object, owned by Pango.- Return type:
Returns the
PangoXftFontMap
for the given display and screen. The fontmap is owned by Pango and will be valid until the display is closed.New in version 1.2.
- PangoXft.picture_render(display, src_picture, dest_picture, font, glyphs, x, y)[source]¶
- Parameters:
display (
xlib.Display
) – an X displaysrc_picture (
int
) – the source picture to draw the string withdest_picture (
int
) – the destination picture to draw the string ontofont (
Pango.Font
) – the font in which to draw the stringglyphs (
Pango.GlyphString
) – the glyph string to drawx (
int
) – the x position of start of string (in pixels)y (
int
) – the y position of baseline (in pixels)
Renders a
PangoGlyphString
onto an Xrender Picture object.
- PangoXft.render(draw, color, font, glyphs, x, y)[source]¶
- Parameters:
color (
xft.Color
) – the color in 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 start of string (in pixels)y (
int
) – the y position of baseline (in pixels)
Renders a
PangoGlyphString
onto anxft.Draw
object wrapping an X drawable.
- PangoXft.render_layout(draw, color, layout, x, y)[source]¶
- Parameters:
color (
xft.Color
) – the foreground color in which to draw the layout (may be overridden by color attributes)layout (
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 axft.Draw
New in version 1.8.
- PangoXft.render_layout_line(draw, color, line, x, y)[source]¶
- Parameters:
color (
xft.Color
) – the foreground color in which to draw the layout line (may be overridden by color attributes)line (
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 axft.Draw
New in version 1.8.
- PangoXft.render_transformed(draw, color, matrix, font, glyphs, x, y)[source]¶
- Parameters:
color (
xft.Color
) – the color in which to draw the glyphsmatrix (
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 axft.Draw
, 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.8.
- PangoXft.set_default_substitute(display, screen, func, *data)[source]¶
- Parameters:
display (
xlib.Display
) – an Xxlib.Display
screen (
int
) – the screen number of a screen within displayfunc (
PangoXft.SubstituteFunc
) – function to call to to do final config tweaking onfontconfig.Pattern
objects.
Sets a function that will be called to do final configuration substitution on a
fontconfig.Pattern
before it is used to load the font. This function can be used to do things like set hinting and antialiasing options.New in version 1.2.
Deprecated since version 1.46: Use
PangoFc.FontMap.set_default_substitute
() instead.
- PangoXft.shutdown_display(display, screen)[source]¶
- Parameters:
display (
xlib.Display
) – an X displayscreen (
int
) – the screen number of a screen within display
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.
New in version 1.2.
- PangoXft.substitute_changed(display, screen)[source]¶
- Parameters:
display (
xlib.Display
) – an Xxlib.Display
screen (
int
) – the screen number of a screen within display
Call this function any time the results of the default substitution function set with
PangoXft.set_default_substitute
() change. That is, if your substitution function will return different results for the same input pattern, you must call this function.New in version 1.2.
Deprecated since version 1.46: Use
PangoFc.FontMap.substitute_changed
() instead.