TextFont¶
-
class TextFont¶
Bases:
TypedReferenceCount,NamableAn encapsulation of a font; i.e. a set of glyphs that may be assembled together by a
TextNodeto represent a string of text.This is just an abstract interface; see
StaticTextFontorDynamicTextFontfor an actual implementation.Inheritance diagram
digraph inheritanced6edd5b19c { 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=""]; "Namable" [URL="acron.core.Namable.html#acron.core.Namable",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" -> "Namable" [arrowsize=0.75,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=""]; "TextFont" [URL="acron.core.TextFont.html#acron.core.TextFont",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedReferenceCount" -> "TextFont" [arrowsize=0.75,style=""]; "Namable" -> "TextFont" [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=""]; }-
enum RenderMode¶
-
enumerator RM_texture = 0¶
Each glyph is a single textured rectangle
-
enumerator RM_wireframe = 1¶
Each glyph is a lot of line segments
-
enumerator RM_polygon = 2¶
Each glyph is a lot of triangles
-
enumerator RM_extruded = 3¶
a 3-D outline, like a cookie cutter
-
enumerator RM_solid = 4¶
combination of RM_extruded and RM_polygon
-
enumerator RM_distance_field = 5¶
-
enumerator RM_invalid = 6¶
Returned by string_render_mode() for an invalid match.
-
enumerator RM_texture = 0¶
- static TextFont.get_class_type()¶
- TextFont.get_glyph()¶
Gets the glyph associated with the given character code, as well as an optional scaling parameter that should be applied to the glyph’s geometry and advance parameters. Returns the glyph on success. On failure, it may still return a printable glyph, or it may return NULL.
- TextFont.get_kerning()¶
Returns the amount by which to offset the second glyph when it directly follows the first glyph. This is an additional offset that is added on top of the advance.
- TextFont.get_line_height()¶
Returns the number of units high each line of text is.
- TextFont.get_space_advance()¶
Returns the number of units wide a space is.
- TextFont.is_valid()¶
Returns true if the font is valid and ready to use, false otherwise.
- TextFont.make_copy()¶
- TextFont.set_line_height()¶
Changes the number of units high each line of text is.
- TextFont.set_space_advance()¶
Changes the number of units wide a space is.
- TextFont.write()¶
-
enum RenderMode¶