diff --git a/panda/src/text/config_text.cxx b/panda/src/text/config_text.cxx index 5b9889a52c..9d33566392 100644 --- a/panda/src/text/config_text.cxx +++ b/panda/src/text/config_text.cxx @@ -36,7 +36,7 @@ ConfigureFn(config_text) { const bool text_flatten = config_text.GetBool("text-flatten", true); const bool text_update_cleared_glyphs = config_text.GetBool("text-update-cleared-glyphs", false); const int text_anisotropic_degree = config_text.GetInt("text-anisotropic-degree", 1); -const int text_texture_margin = config_text.GetInt("text-texture-margin", 2); +const int text_texture_margin = config_text.GetInt("text-texture-margin", 3); const float text_poly_margin = config_text.GetFloat("text-poly-margin", 1.0f); const int text_page_x_size = config_text.GetInt("text-page-x-size", 256); const int text_page_y_size = config_text.GetInt("text-page-y-size", 256); diff --git a/panda/src/text/textFont.I b/panda/src/text/textFont.I index eb62b484a2..8fc3b18911 100644 --- a/panda/src/text/textFont.I +++ b/panda/src/text/textFont.I @@ -39,12 +39,33 @@ get_line_height() const { return _line_height; } +//////////////////////////////////////////////////////////////////// +// Function: TextFont::set_line_height +// Access: Published +// Description: Changes the number of units high each line of text +// is. +//////////////////////////////////////////////////////////////////// +INLINE void TextFont:: +set_line_height(float line_height) { + _line_height = line_height; +} + //////////////////////////////////////////////////////////////////// // Function: TextFont::get_space_advance -// Access: Public +// Access: Published // Description: Returns the number of units wide a space is. //////////////////////////////////////////////////////////////////// INLINE float TextFont:: get_space_advance() const { return _space_advance; } + +//////////////////////////////////////////////////////////////////// +// Function: TextFont::set_space_advance +// Access: Published +// Description: Changes the number of units wide a space is. +//////////////////////////////////////////////////////////////////// +INLINE void TextFont:: +set_space_advance(float space_advance) { + _space_advance = space_advance; +} diff --git a/panda/src/text/textFont.h b/panda/src/text/textFont.h index ec228fe757..8768e4f73e 100644 --- a/panda/src/text/textFont.h +++ b/panda/src/text/textFont.h @@ -53,6 +53,10 @@ PUBLISHED: INLINE bool is_valid() const; INLINE float get_line_height() const; + INLINE void set_line_height(float line_height); + + INLINE float get_space_advance() const; + INLINE void set_space_advance(float space_advance); float calc_width(int character); float calc_width(const string &line); @@ -66,7 +70,6 @@ public: wstring wordwrap_to(const wstring &text, float wordwrap_width, bool preserve_trailing_whitespace); - INLINE float get_space_advance() const; virtual bool get_glyph(int character, const TextGlyph *&glyph, float &glyph_scale)=0;