text-default-underscore-height

This commit is contained in:
David Rose 2008-10-30 22:43:54 +00:00
parent f2102c5912
commit 1ccecd7231
3 changed files with 7 additions and 1 deletions

View File

@ -168,6 +168,11 @@ ConfigVariableInt text_max_never_break
"characters in a row, do not treat any of them as special and " "characters in a row, do not treat any of them as special and "
"instead break the line wherever we can.")); "instead break the line wherever we can."));
ConfigVariableDouble text_default_underscore_height
("text-default-underscore-height", -0.2,
PRC_DESC("Specifies the default height of the underscore line, relative "
"to the text baseline, when underscoring is enabled."));
ConfigVariableEnum<Texture::FilterType> text_minfilter ConfigVariableEnum<Texture::FilterType> text_minfilter
("text-minfilter", Texture::FT_linear_mipmap_linear, ("text-minfilter", Texture::FT_linear_mipmap_linear,
PRC_DESC("The default texture minfilter type for dynamic text fonts")); PRC_DESC("The default texture minfilter type for dynamic text fonts"));

View File

@ -47,6 +47,7 @@ extern wstring get_text_soft_hyphen_output();
extern ConfigVariableDouble text_hyphen_ratio; extern ConfigVariableDouble text_hyphen_ratio;
extern wstring get_text_never_break_before(); extern wstring get_text_never_break_before();
extern ConfigVariableInt text_max_never_break; extern ConfigVariableInt text_max_never_break;
extern ConfigVariableDouble text_default_underscore_height;
extern ConfigVariableEnum<Texture::FilterType> text_minfilter; extern ConfigVariableEnum<Texture::FilterType> text_minfilter;
extern ConfigVariableEnum<Texture::FilterType> text_magfilter; extern ConfigVariableEnum<Texture::FilterType> text_magfilter;

View File

@ -346,7 +346,7 @@ has_underscore_height() const {
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
INLINE float TextProperties:: INLINE float TextProperties::
get_underscore_height() const { get_underscore_height() const {
return _underscore_height; return has_underscore_height() ? _underscore_height : text_default_underscore_height;
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////