4.1.3.17. TextureFont

Texture font class

class PyOpenGLng.HighLevelApi.TextureFont.FontMetrics(texture_font_size)[source]

Bases: object

class PyOpenGLng.HighLevelApi.TextureFont.TextureFont(font_path)[source]

Bases: object

A texture font gathers a set of glyph relatively to a given font filename and size.

Points are a physical unit, where 1 point equals 1/72th of an inch. The size in pixel of a glyph is thus size_in_point * resolution_in_dpi / 72.

_dump_face_info()[source]
_logger = <logging.Logger object at 0x5b0b4d0>
atlas[source]
class PyOpenGLng.HighLevelApi.TextureFont.TextureFontSize(texture_font, font_size)[source]

Bases: object

_set_face_transfrom()[source]
_set_kerning(glyph1, glyph2)[source]
font[source]
load_all_glyphs()[source]
load_from_string(charcodes)[source]
load_glyph(charcode)[source]
metrics[source]
size[source]
class PyOpenGLng.HighLevelApi.TextureFont.TextureGlyph(charcode, size, offset, advance, texture_coordinates)[source]

Bases: object

A texture glyph gathers information relative to the size/offset/advance and texture coordinates of a single character. It is generally built automatically by a TextureFont.

Build a new texture glyph

Parameter:

charcode : char
Represented character
size: tuple of 2 ints
Glyph size in pixels
offset: tuple of 2 floats
Glyph offset relatively to anchor point
advance: tuple of 2 floats
Glyph advance
texture_coordinates: tuple of 4 floats
Texture coordinates of bottom-left and top-right corner
get_kerning(charcode)[source]

Get kerning information

Parameters:

charcode: char
Character preceding this glyph
PyOpenGLng.HighLevelApi.TextureFont.from_64th_point(x)[source]
PyOpenGLng.HighLevelApi.TextureFont.test_bit(flags, mask)[source]
PyOpenGLng.HighLevelApi.TextureFont.to_64th_point(x)[source]

Previous topic

4.1.3.16. TextureAtlas

Next topic

4.1.3.18. TextureVertexArray

This Page