18INLINE
const std::string &DynamicTextFont::
20 return TextFont::get_name();
30INLINE
bool DynamicTextFont::
31set_point_size(PN_stdfloat point_size) {
33 nassertr(get_num_pages() == 0,
false);
35 return FreetypeFont::set_point_size(point_size);
41INLINE PN_stdfloat DynamicTextFont::
42get_point_size()
const {
43 return FreetypeFont::get_point_size();
57INLINE
bool DynamicTextFont::
58set_pixels_per_unit(PN_stdfloat pixels_per_unit) {
60 nassertr(get_num_pages() == 0,
false);
62 return FreetypeFont::set_pixels_per_unit(pixels_per_unit);
68INLINE PN_stdfloat DynamicTextFont::
69get_pixels_per_unit()
const {
70 return FreetypeFont::get_pixels_per_unit();
84INLINE
bool DynamicTextFont::
85set_scale_factor(PN_stdfloat scale_factor) {
87 nassertr(get_num_pages() == 0,
false);
89 return FreetypeFont::set_scale_factor(scale_factor);
95INLINE PN_stdfloat DynamicTextFont::
96get_scale_factor()
const {
97 return FreetypeFont::get_scale_factor();
110INLINE
void DynamicTextFont::
111set_native_antialias(
bool native_antialias) {
113 nassertv(get_num_pages() == 0);
115 FreetypeFont::set_native_antialias(native_antialias);
122INLINE
bool DynamicTextFont::
123get_native_antialias()
const {
124 return FreetypeFont::get_native_antialias();
136INLINE
int DynamicTextFont::
137get_font_pixel_size()
const {
138 return FreetypeFont::get_font_pixel_size();
144INLINE PN_stdfloat DynamicTextFont::
145get_line_height()
const {
152INLINE PN_stdfloat DynamicTextFont::
153get_space_advance()
const {
162INLINE
void DynamicTextFont::
163set_texture_margin(
int texture_margin) {
164 _texture_margin = texture_margin;
171INLINE
int DynamicTextFont::
172get_texture_margin()
const {
173 return _texture_margin;
184INLINE
void DynamicTextFont::
185set_poly_margin(PN_stdfloat poly_margin) {
186 _poly_margin = poly_margin;
193INLINE PN_stdfloat DynamicTextFont::
194get_poly_margin()
const {
202INLINE
void DynamicTextFont::
203set_page_size(
const LVecBase2i &page_size) {
204 _page_size = page_size;
211INLINE
void DynamicTextFont::
212set_page_size(
int x_size,
int y_size) {
213 _page_size.set(x_size, y_size);
220INLINE
const LVecBase2i &DynamicTextFont::
221get_page_size()
const {
229INLINE
int DynamicTextFont::
230get_page_x_size()
const {
231 return _page_size.get_x();
238INLINE
int DynamicTextFont::
239get_page_y_size()
const {
240 return _page_size.get_y();
247INLINE
void DynamicTextFont::
248set_minfilter(SamplerState::FilterType filter) {
257INLINE SamplerState::FilterType DynamicTextFont::
258get_minfilter()
const {
266INLINE
void DynamicTextFont::
267set_magfilter(SamplerState::FilterType filter) {
276INLINE SamplerState::FilterType DynamicTextFont::
277get_magfilter()
const {
286INLINE
void DynamicTextFont::
287set_anisotropic_degree(
int anisotropic_degree) {
288 _anisotropic_degree = anisotropic_degree;
296INLINE
int DynamicTextFont::
297get_anisotropic_degree()
const {
298 return _anisotropic_degree;
306INLINE
void DynamicTextFont::
307set_render_mode(DynamicTextFont::RenderMode render_mode) {
308 _render_mode = render_mode;
315INLINE DynamicTextFont::RenderMode DynamicTextFont::
316get_render_mode()
const {
330INLINE
void DynamicTextFont::
331set_fg(
const LColor &fg) {
333 nassertv(get_num_pages() == 0);
336 determine_tex_format();
343INLINE
const LColor &DynamicTextFont::
362INLINE
void DynamicTextFont::
363set_bg(
const LColor &bg) {
365 nassertv(get_num_pages() == 0);
368 determine_tex_format();
375INLINE
const LColor &DynamicTextFont::
395INLINE
void DynamicTextFont::
396set_outline(
const LColor &outline_color, PN_stdfloat outline_width,
397 PN_stdfloat outline_feather) {
399 nassertv(get_num_pages() == 0);
401 _outline_color = outline_color;
402 _outline_width = outline_width;
403 _outline_feather = outline_feather;
404 determine_tex_format();
411INLINE
const LColor &DynamicTextFont::
412get_outline_color()
const {
413 return _outline_color;
420INLINE PN_stdfloat DynamicTextFont::
421get_outline_width()
const {
422 return _outline_width;
429INLINE PN_stdfloat DynamicTextFont::
430get_outline_feather()
const {
431 return _outline_feather;
438INLINE Texture::Format DynamicTextFont::
439get_tex_format()
const {
445operator << (std::ostream &out,
const DynamicTextFont &dtf) {
446 return out << dtf.get_name();
get_line_height
Returns the number of units high each line of text is.
get_space_advance
Returns the number of units wide a space is.