62 virtual PT(
TextFont) make_copy()
const=0;
64 INLINE
bool is_valid()
const;
65 INLINE
operator bool ()
const;
66 INLINE PN_stdfloat get_line_height()
const;
67 INLINE
void set_line_height(PN_stdfloat line_height);
68 MAKE_PROPERTY(valid, is_valid);
69 MAKE_PROPERTY(line_height, get_line_height, set_line_height);
71 INLINE PN_stdfloat get_space_advance()
const;
72 INLINE
void set_space_advance(PN_stdfloat space_advance);
73 MAKE_PROPERTY(space_advance, get_space_advance, set_space_advance);
75 INLINE CPT(
TextGlyph) get_glyph(
int character);
77 virtual PN_stdfloat get_kerning(
int first,
int second)
const;
79 virtual void write(std::ostream &out,
int indent_level)
const;
82 INLINE PN_stdfloat get_total_poly_margin()
const;
84 virtual bool get_glyph(
int character, CPT(
TextGlyph) &glyph)=0;
87 static RenderMode string_render_mode(
const std::string &
string);
90 void make_invalid_glyph();
94 PN_stdfloat _line_height;
95 PN_stdfloat _space_advance;
96 PN_stdfloat _total_poly_margin;
103 static void init_type() {
104 TypedReferenceCount::init_type();
106 TypedReferenceCount::get_class_type());
109 return get_class_type();
111 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
An encapsulation of a font; i.e.
A representation of a single glyph (character) from a font.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.