TextFont

from panda3d.core import TextFont
class TextFont

Bases: TypedReferenceCount, Namable

An encapsulation of a font; i.e. a set of glyphs that may be assembled together by a TextNode to represent a string of text.

This is just an abstract interface; see StaticTextFont or DynamicTextFont for an actual implementation.

Inheritance diagram

Inheritance diagram of TextFont

RMDistanceField = 5
RMExtruded = 3
RMInvalid = 6
RMPolygon = 2
RMSolid = 4
RMTexture = 0
RMWireframe = 1
RM_distance_field = 5
RM_extruded = 3
RM_invalid = 6
RM_polygon = 2
RM_solid = 4
RM_texture = 0
RM_wireframe = 1
__init__(*args, **kwargs)
getClassType()

C++ Interface: get_class_type()

getGlyph()

C++ Interface: get_glyph(const TextFont self, int character)

/**
  • 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.

*/

getKerning()

C++ Interface: get_kerning(TextFont self, int first, int second)

/**
  • 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.

*/

getLineHeight()

C++ Interface: get_line_height(TextFont self)

/**
  • Returns the number of units high each line of text is.

*/

getSpaceAdvance()

C++ Interface: get_space_advance(TextFont self)

/**
  • Returns the number of units wide a space is.

*/

get_class_type()

C++ Interface: get_class_type()

get_glyph()

C++ Interface: get_glyph(const TextFont self, int character)

/**
  • 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.

*/

get_kerning()

C++ Interface: get_kerning(TextFont self, int first, int second)

/**
  • 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.

*/

get_line_height()

C++ Interface: get_line_height(TextFont self)

/**
  • Returns the number of units high each line of text is.

*/

get_space_advance()

C++ Interface: get_space_advance(TextFont self)

/**
  • Returns the number of units wide a space is.

*/

isValid()

C++ Interface: is_valid(TextFont self)

/**
  • Returns true if the font is valid and ready to use, false otherwise.

*/

is_valid()

C++ Interface: is_valid(TextFont self)

/**
  • Returns true if the font is valid and ready to use, false otherwise.

*/

line_height
makeCopy()

C++ Interface: make_copy(TextFont self)

make_copy()

C++ Interface: make_copy(TextFont self)

setLineHeight()

C++ Interface: set_line_height(const TextFont self, float line_height)

/**
  • Changes the number of units high each line of text is.

*/

setSpaceAdvance()

C++ Interface: set_space_advance(const TextFont self, float space_advance)

/**
  • Changes the number of units wide a space is.

*/

set_line_height()

C++ Interface: set_line_height(const TextFont self, float line_height)

/**
  • Changes the number of units high each line of text is.

*/

set_space_advance()

C++ Interface: set_space_advance(const TextFont self, float space_advance)

/**
  • Changes the number of units wide a space is.

*/

space_advance
upcastToNamable()

C++ Interface: upcast_to_Namable(const TextFont self)

upcast from TextFont to Namable

upcastToTypedReferenceCount()

C++ Interface: upcast_to_TypedReferenceCount(const TextFont self)

upcast from TextFont to TypedReferenceCount

upcast_to_Namable()

C++ Interface: upcast_to_Namable(const TextFont self)

upcast from TextFont to Namable

upcast_to_TypedReferenceCount()

C++ Interface: upcast_to_TypedReferenceCount(const TextFont self)

upcast from TextFont to TypedReferenceCount

valid
write()

C++ Interface: write(TextFont self, ostream out, int indent_level)

/**

*/