freetypy.Glyph.render¶
-
Glyph.render()¶ Convert a given glyph image to a
Bitmap. It does so by inspecting the glyph image format, finding the relevant renderer, and invoking it.Parameters: render_mode : int, optional
This is the render mode used to render the glyph image into a bitmap.
See
RENDER_MODEfor the available options.origin : 2-sequence of floats
The (x, y) origin to translate the glyph image before rendering.
Returns: bitmap : Bitmap
The generated bitmap.
Notes
The selected render mode only affects vector glyphs of a font. Embedded bitmaps often have a different pixel mode like
PIXEL_MODE.MONO. You can useBitmap.convertto transform them into 8-bit pixmaps.