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