18 #include "pandabase.h" 20 #include "textGlyph.h" 21 #include "typedReferenceCount.h" 24 #include "pointerTo.h" 72 virtual PT(
TextFont) make_copy()
const=0;
74 INLINE
bool is_valid()
const;
75 INLINE
operator bool ()
const;
76 INLINE PN_stdfloat get_line_height()
const;
77 INLINE
void set_line_height(PN_stdfloat line_height);
79 INLINE PN_stdfloat get_space_advance()
const;
80 INLINE
void set_space_advance(PN_stdfloat space_advance);
81 INLINE
const TextGlyph *get_glyph(
int character);
83 virtual void write(ostream &out,
int indent_level)
const;
86 virtual bool get_glyph(
int character,
const TextGlyph *&glyph)=0;
89 static RenderMode string_render_mode(
const string &
string);
90 static WindingOrder string_winding_order(
const string &
string);
93 void make_invalid_glyph();
97 PN_stdfloat _line_height;
98 PN_stdfloat _space_advance;
105 static void init_type() {
106 TypedReferenceCount::init_type();
107 register_type(_type_handle,
"TextFont",
108 TypedReferenceCount::get_class_type());
111 return get_class_type();
113 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
119 EXPCL_PANDA_TEXT ostream &operator << (ostream &out, TextFont::RenderMode rm);
120 EXPCL_PANDA_TEXT istream &operator >> (istream &in, TextFont::RenderMode &rm);
121 EXPCL_PANDA_TEXT ostream &operator << (ostream &out, TextFont::WindingOrder wo);
122 EXPCL_PANDA_TEXT istream &operator >> (istream &in, TextFont::WindingOrder &wo);
124 #include "textFont.I" A base class for things which need to inherit from both TypedObject and from ReferenceCount.
An encapsulation of a font; i.e.
A base class for all things which can have a name.
A representation of a single glyph (character) from a font.
TypeHandle is the identifier used to differentiate C++ class types.