23 INLINE
const string &DynamicTextFont::
25 return TextFont::get_name();
39 INLINE
bool DynamicTextFont::
40 set_point_size(PN_stdfloat point_size) {
42 nassertr(get_num_pages() == 0,
false);
44 return FreetypeFont::set_point_size(point_size);
52 INLINE PN_stdfloat DynamicTextFont::
53 get_point_size()
const {
54 return FreetypeFont::get_point_size();
72 INLINE
bool DynamicTextFont::
73 set_pixels_per_unit(PN_stdfloat pixels_per_unit) {
75 nassertr(get_num_pages() == 0,
false);
77 return FreetypeFont::set_pixels_per_unit(pixels_per_unit);
86 INLINE PN_stdfloat DynamicTextFont::
87 get_pixels_per_unit()
const {
88 return FreetypeFont::get_pixels_per_unit();
108 INLINE
bool DynamicTextFont::
109 set_scale_factor(PN_stdfloat scale_factor) {
111 nassertr(get_num_pages() == 0,
false);
113 return FreetypeFont::set_scale_factor(scale_factor);
122 INLINE PN_stdfloat DynamicTextFont::
123 get_scale_factor()
const {
124 return FreetypeFont::get_scale_factor();
142 INLINE
void DynamicTextFont::
143 set_native_antialias(
bool native_antialias) {
145 nassertv(get_num_pages() == 0);
147 FreetypeFont::set_native_antialias(native_antialias);
156 INLINE
bool DynamicTextFont::
157 get_native_antialias()
const {
158 return FreetypeFont::get_native_antialias();
174 INLINE
int DynamicTextFont::
175 get_font_pixel_size()
const {
176 return FreetypeFont::get_font_pixel_size();
185 INLINE PN_stdfloat DynamicTextFont::
186 get_line_height()
const {
195 INLINE PN_stdfloat DynamicTextFont::
196 get_space_advance()
const {
208 INLINE
void DynamicTextFont::
209 set_texture_margin(
int texture_margin) {
210 _texture_margin = texture_margin;
220 INLINE
int DynamicTextFont::
221 get_texture_margin()
const {
222 return _texture_margin;
238 INLINE
void DynamicTextFont::
239 set_poly_margin(PN_stdfloat poly_margin) {
240 _poly_margin = poly_margin;
250 INLINE PN_stdfloat DynamicTextFont::
251 get_poly_margin()
const {
261 INLINE
void DynamicTextFont::
262 set_page_size(
int x_size,
int y_size) {
263 _page_x_size = x_size;
264 _page_y_size = y_size;
273 INLINE
int DynamicTextFont::
274 get_page_x_size()
const {
284 INLINE
int DynamicTextFont::
285 get_page_y_size()
const {
295 INLINE
void DynamicTextFont::
296 set_minfilter(SamplerState::FilterType filter) {
307 INLINE SamplerState::FilterType DynamicTextFont::
308 get_minfilter()
const {
318 INLINE
void DynamicTextFont::
319 set_magfilter(SamplerState::FilterType filter) {
330 INLINE SamplerState::FilterType DynamicTextFont::
331 get_magfilter()
const {
343 INLINE
void DynamicTextFont::
344 set_anisotropic_degree(
int anisotropic_degree) {
345 _anisotropic_degree = anisotropic_degree;
355 INLINE
int DynamicTextFont::
356 get_anisotropic_degree()
const {
357 return _anisotropic_degree;
368 INLINE
void DynamicTextFont::
369 set_render_mode(DynamicTextFont::RenderMode render_mode) {
370 _render_mode = render_mode;
379 INLINE DynamicTextFont::RenderMode DynamicTextFont::
380 get_render_mode()
const {
393 INLINE
void DynamicTextFont::
394 set_winding_order(DynamicTextFont::WindingOrder winding_order) {
395 _winding_order = winding_order;
403 INLINE DynamicTextFont::WindingOrder DynamicTextFont::
404 get_winding_order()
const {
405 return _winding_order;
423 INLINE
void DynamicTextFont::
424 set_fg(
const LColor &fg) {
426 nassertv(get_num_pages() == 0);
429 determine_tex_format();
439 INLINE
const LColor &DynamicTextFont::
464 INLINE
void DynamicTextFont::
465 set_bg(
const LColor &bg) {
467 nassertv(get_num_pages() == 0);
470 determine_tex_format();
480 INLINE
const LColor &DynamicTextFont::
507 INLINE
void DynamicTextFont::
508 set_outline(
const LColor &outline_color, PN_stdfloat outline_width,
509 PN_stdfloat outline_feather) {
511 nassertv(get_num_pages() == 0);
513 _outline_color = outline_color;
514 _outline_width = outline_width;
515 _outline_feather = outline_feather;
516 determine_tex_format();
526 INLINE
const LColor &DynamicTextFont::
527 get_outline_color()
const {
528 return _outline_color;
538 INLINE PN_stdfloat DynamicTextFont::
539 get_outline_width()
const {
540 return _outline_width;
550 INLINE PN_stdfloat DynamicTextFont::
551 get_outline_feather()
const {
552 return _outline_feather;
562 INLINE Texture::Format DynamicTextFont::
563 get_tex_format()
const {
572 INLINE DynamicTextFont::ContourPoint::
574 _p(p), _in(in), _out(out)
583 INLINE DynamicTextFont::ContourPoint::
584 ContourPoint(PN_stdfloat px, PN_stdfloat py, PN_stdfloat tx, PN_stdfloat ty) :
585 _p(px, py), _in(tx, ty), _out(tx, ty)
598 INLINE
void DynamicTextFont::ContourPoint::
601 if (_in.dot(_out) > 0.7071) {
612 operator << (ostream &out,
const DynamicTextFont &dtf) {
613 return out << dtf.get_name();
bool normalize()
Normalizes the vector in place.
PN_stdfloat get_space_advance() const
Returns the number of units wide a space is.
This is the base class for all three-component vectors and points.
This is a two-component vector offset.
This is a two-component point in space.
PN_stdfloat get_line_height() const
Returns the number of units high each line of text is.