TextGlyph

class TextGlyph

Bases: TypedReferenceCount

A representation of a single glyph (character) from a font. This is a piece of renderable geometry of some kind.

Inheritance diagram

digraph inheritance7a204f1d59 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "ReferenceCount" [URL="acron.core.ReferenceCount.html#acron.core.ReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ReferenceCount" [arrowsize=0.75,style=""]; "TextGlyph" [URL="acron.core.TextGlyph.html#acron.core.TextGlyph",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedReferenceCount" -> "TextGlyph" [arrowsize=0.75,style=""]; "TypedObject" [URL="acron.core.TypedObject.html#acron.core.TypedObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "TypedObject" [arrowsize=0.75,style=""]; "TypedReferenceCount" [URL="acron.core.TypedReferenceCount.html#acron.core.TypedReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedReferenceCount" [arrowsize=0.75,style=""]; }
TextGlyph.get_advance()

Returns the distance by which the character pointer should be advanced after placing this character; i.e. the approximate width the character takes up on the line.

TextGlyph.get_character()

Returns the Unicode value that corresponds to the character this glyph represents.

static TextGlyph.get_class_type()
TextGlyph.get_geom()

Returns a Geom that renders the particular glyph. It will be generated if necessary.

This method will always return a copy of the Geom, so the caller is free to modify it.

TextGlyph.get_quad()

Assuming that this glyph is representable as a textured quad, returns its dimensions and UV range. Returns false if it is not representable as a quad, or if it is whitespace.

The order of the components is left, bottom, right, top.

TextGlyph.get_state()

Returns the state in which the glyph should be rendered.

TextGlyph.has_quad()

Returns true if this glyph contains the definition for a simple quad, rather than a more complex piece of geometry.

You may still call get_geom() even if this returns true, which will synthesize a Geom for this quad.

TextGlyph.is_whitespace()

Returns true if this glyph represents invisible whitespace, or false if it corresponds to some visible character.