|
class pangocairo.CairoFontMap(pangocairo.CairoFontMap): |
Functions
def pangocairo.cairo_font_map_get_default()
pangocairo.CairoFontMap
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.
Cairo is a graphics library that supports vector graphics and image compositing that can be used with PyGTK. Since 2.8, GTK+ and Pango do most of their drawing using Cairo. The Cairo drawing model and primitives are similar to PostScript which uses an imaging model of painting on a two dimensional surface.
pangocairo.CairoFontMap()
Returns : | a new pangocairo.CairoFontMap object |
Creates a new pangocairo.CairoFontMap
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 the pangocairo.cairo_font_map_get_default
()
function 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 pango.FontMap
and
pangocairo.CairoFontMap
interfaces on the returned object.
def set_resolution(dpi
)
| the resolution in "dots per inch". (Physical inches aren't actually involved; the terminology is conventional.) |
This method is available in PyGTK 2.8 and above.
The set_resolution
() method sets the
resolution for the fontmap to the value specified by
dpi
. This is a scale factor between the points
specified in a pango.FontDescription
and Cairo units. The default value is 96, meaning that a 10 point font will
be 13 units high. (10 * 96. / 72. = 13.3).
def get_resolution()
Returns : | the resolution in "dots per inch" |
This method is available in PyGTK 2.8 and above.
The get_resolution
() method returns the
resolution for the fontmap. See the set_resolution
()
method for more information.
def create_context()
Returns : | a new pango.Context
object |
This method is available in PyGTK 2.8 and above.
The create_context
() method creates a
new pango.Context
object.
© manpagez.com 2000-2024 Individual documents may contain additional copyright information.