From 2000d3607ac006d59fad8faf4f774a3f394a3f18 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 22 Oct 2010 17:20:34 -0500 Subject: Added FontSizeMultiplier and FontSizeRounding settings. Gives more control over font sizes, addresses font being smaller than some users desire. --- linden/indra/llrender/llfontregistry.cpp | 10 +++++++++- linden/indra/newview/app_settings/settings.xml | 22 ++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/linden/indra/llrender/llfontregistry.cpp b/linden/indra/llrender/llfontregistry.cpp index 2140dbd..28e38ce 100644 --- a/linden/indra/llrender/llfontregistry.cpp +++ b/linden/indra/llrender/llfontregistry.cpp @@ -442,7 +442,15 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc) std::string font_path = local_path + *file_name_it; BOOL is_fallback = !is_first_found; F32 size_mult = (is_fallback ? 1 : match_desc->getSizeMult()); - F32 size = (F32)llround(point_size * size_mult); + if (gSavedSettings.getF32("FontSizeMultiplier") > 0) + { + size_mult *= gSavedSettings.getF32("FontSizeMultiplier"); + } + F32 size = (F32)(point_size * size_mult); + if (gSavedSettings.getBOOL("FontSizeRounding")) + { + size = (F32)llround(size); + } if (!fontp->loadFace(font_path, size, LLFontGL::sVertDPI, LLFontGL::sHorizDPI, 2, is_fallback)) { diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 68b5ac6..a857b7a 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -266,6 +266,28 @@ Value DroidSans + FontSizeMultiplier + + Comment + Multiply all font sizes by this amount. Requires viewer restart. + Persist + 1 + Type + F32 + Value + 1.0 + + FontSizeRounding + + Comment + Round all font sizes to integer values, to potentially reduce font blurriness. The rounding occurs after FontSizeMultiplier is applied. Requires viewer restart. + Persist + 1 + Type + Boolean + Value + 0 + GoAction Comment -- cgit v1.1