TextGlyph

from panda3d.core import 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

Inheritance diagram of TextGlyph

__init__(*args, **kwargs)
advance
character
getAdvance()

C++ Interface: get_advance(TextGlyph self)

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

*/

getCharacter()

C++ Interface: get_character(TextGlyph self)

/**
  • Returns the Unicode value that corresponds to the character this glyph

  • represents.

*/

getClassType()

C++ Interface: get_class_type()

getGeom()

C++ Interface: get_geom(TextGlyph self, int usage_hint)

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

*/

getQuad()

C++ Interface: get_quad(TextGlyph self, LVecBase4f dimensions, LVecBase4f texcoords)

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

*/

getState()

C++ Interface: get_state(TextGlyph self)

/**
  • Returns the state in which the glyph should be rendered.

*/

get_advance()

C++ Interface: get_advance(TextGlyph self)

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

*/

get_character()

C++ Interface: get_character(TextGlyph self)

/**
  • Returns the Unicode value that corresponds to the character this glyph

  • represents.

*/

get_class_type()

C++ Interface: get_class_type()

get_geom()

C++ Interface: get_geom(TextGlyph self, int usage_hint)

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

*/

get_quad()

C++ Interface: get_quad(TextGlyph self, LVecBase4f dimensions, LVecBase4f texcoords)

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

*/

get_state()

C++ Interface: get_state(TextGlyph self)

/**
  • Returns the state in which the glyph should be rendered.

*/

hasQuad()

C++ Interface: has_quad(TextGlyph self)

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

*/

has_quad()

C++ Interface: has_quad(TextGlyph self)

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

*/

isWhitespace()

C++ Interface: is_whitespace(TextGlyph self)

/**
  • Returns true if this glyph represents invisible whitespace, or false if it

  • corresponds to some visible character.

*/

is_whitespace()

C++ Interface: is_whitespace(TextGlyph self)

/**
  • Returns true if this glyph represents invisible whitespace, or false if it

  • corresponds to some visible character.

*/

state