19 _character(character),
32 _character(character),
38 if (geom !=
nullptr) {
41 if (_state ==
nullptr) {
42 _state = RenderState::make_empty();
51 _character(copy._character),
54 _advance(copy._advance),
55 _has_quad(copy._has_quad),
56 _quad_dimensions(copy._quad_dimensions),
57 _quad_texcoords(copy._quad_texcoords)
64 INLINE
void TextGlyph::
66 _character = copy._character;
69 _advance = copy._advance;
70 _has_quad = copy._has_quad;
71 _quad_dimensions = copy._quad_dimensions;
72 _quad_texcoords = copy._quad_texcoords;
79 INLINE
int TextGlyph::
80 get_character()
const {
104 get_quad(LVecBase4 &dimensions, LVecBase4 &texcoords)
const {
109 dimensions = _quad_dimensions;
110 texcoords = _quad_texcoords;
127 INLINE PN_stdfloat TextGlyph::
128 get_advance()
const {
TextGlyph(int character, PN_stdfloat advance=0)
This constructor makes an empty glyph.
A container for geometry primitives.
A representation of a single glyph (character) from a font.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
bool has_quad() const
Returns true if this glyph contains the definition for a simple quad, rather than a more complex piec...
bool get_quad(LVecBase4 &dimensions, LVecBase4 &texcoords) const
Assuming that this glyph is representable as a textured quad, returns its dimensions and UV range.