diff --git a/indra/integration_tests/llui_libtest/llui_libtest.cpp b/indra/integration_tests/llui_libtest/llui_libtest.cpp index e7fae25693..0372c5f39a 100644 --- a/indra/integration_tests/llui_libtest/llui_libtest.cpp +++ b/indra/integration_tests/llui_libtest/llui_libtest.cpp @@ -170,6 +170,7 @@ void init_llui() gDirUtilp->getAppRODataDir(), LLUI::getXUIPaths(), "fonts.xml", + f.0, false ); // don't create gl textures LLFloaterView::Params fvparams; diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 903983aa0c..bd3ce28435 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -799,7 +799,7 @@ const LLFontDescriptor& LLFontGL::getFontDesc() const } // static -void LLFontGL::initClass(F32 screen_dpi, F32 x_scale, F32 y_scale, const std::string& app_dir, const std::vector& xui_paths, const std::string& fonts_file, bool create_gl_textures) +void LLFontGL::initClass(F32 screen_dpi, F32 x_scale, F32 y_scale, const std::string& app_dir, const std::vector& xui_paths, const std::string& fonts_file, F32 size_mod, bool create_gl_textures) { sVertDPI = (F32)llfloor(screen_dpi * y_scale); sHorizDPI = (F32)llfloor(screen_dpi * x_scale); @@ -810,7 +810,7 @@ void LLFontGL::initClass(F32 screen_dpi, F32 x_scale, F32 y_scale, const std::st // Font registry init if (!sFontRegistry) { - sFontRegistry = new LLFontRegistry(xui_paths, create_gl_textures); + sFontRegistry = new LLFontRegistry(xui_paths, create_gl_textures, size_mod); // Allow the user to pick the fonts if (!sFontRegistry->parseFontInfo(fonts_file)) { diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h index 007e15b30c..3209ba7e57 100644 --- a/indra/llrender/llfontgl.h +++ b/indra/llrender/llfontgl.h @@ -150,7 +150,7 @@ public: const LLFontDescriptor& getFontDesc() const; - static void initClass(F32 screen_dpi, F32 x_scale, F32 y_scale, const std::string& app_dir, const std::vector& xui_paths, const std::string& fonts_file, bool create_gl_textures = true); + static void initClass(F32 screen_dpi, F32 x_scale, F32 y_scale, const std::string& app_dir, const std::vector& xui_paths, const std::string& fonts_file, F32 size_mod = 0, bool create_gl_textures = true); // Load sans-serif, sans-serif-small, etc. // Slow, requires multiple seconds to load fonts. diff --git a/indra/llrender/llfontregistry.cpp b/indra/llrender/llfontregistry.cpp index 4d22eba3d9..246e2dff26 100644 --- a/indra/llrender/llfontregistry.cpp +++ b/indra/llrender/llfontregistry.cpp @@ -164,8 +164,8 @@ LLFontDescriptor LLFontDescriptor::normalize() const } LLFontRegistry::LLFontRegistry(const string_vec_t& xui_paths, - bool create_gl_textures) -: mCreateGLTextures(create_gl_textures) + bool create_gl_textures, F32 size_mod) +: mCreateGLTextures(create_gl_textures), mFontSizeMod(size_mod) { // Propagate this down from LLUICtrlFactory so LLRender doesn't // need an upstream dependency on LLUI. @@ -320,7 +320,9 @@ bool LLFontRegistry::initFromXML(LLXMLNodePtr node) if (child->getAttributeString("name",size_name) && child->getAttributeF32("size",size_value)) { - mFontSizes[size_name] = size_value; + // mFontSizes[size_name] = size_value; + // +/- defualt font sizes -KC + mFontSizes[size_name] = size_value + mFontSizeMod; } } diff --git a/indra/llrender/llfontregistry.h b/indra/llrender/llfontregistry.h index 8b06191c56..74eed5e7e0 100644 --- a/indra/llrender/llfontregistry.h +++ b/indra/llrender/llfontregistry.h @@ -68,7 +68,7 @@ public: // create_gl_textures - set to false for test apps with no OpenGL window, // such as llui_libtest LLFontRegistry(const string_vec_t& xui_paths, - bool create_gl_textures); + bool create_gl_textures, F32 size_mod); ~LLFontRegistry(); // Load standard font info from XML file(s). @@ -107,6 +107,8 @@ private: string_vec_t mUltimateFallbackList; string_vec_t mXUIPaths; bool mCreateGLTextures; + // +/- defualt font sizes -KC + F32 mFontSizeMod; }; #endif // LL_LLFONTREGISTRY_H diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 897f857f29..612a3a3805 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -15094,5 +15094,16 @@ Change of this parameter will affect the layout of buttons in notification toast Value fonts.xml + PhoenixFontSizeAdjustment + + Comment + Number of points to add to the defualt font sizes + Persist + 1 + Type + F32 + Value + 0 + diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 52ce159bab..2b2bc0fb48 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1527,7 +1527,8 @@ LLViewerWindow::LLViewerWindow( mDisplayScale.mV[VY], gDirUtilp->getAppRODataDir(), LLUI::getXUIPaths(), - gSavedSettings.getString("PhoenixFontSettingsFile")); + gSavedSettings.getString("PhoenixFontSettingsFile"), + gSavedSettings.getF32("PhoenixFontSizeAdjustment")); // Create container for all sub-views LLView::Params rvp; @@ -4579,7 +4580,8 @@ void LLViewerWindow::initFonts(F32 zoom_factor) mDisplayScale.mV[VY] * zoom_factor, gDirUtilp->getAppRODataDir(), LLUI::getXUIPaths(), - gSavedSettings.getString("PhoenixFontSettingsFile")); + gSavedSettings.getString("PhoenixFontSettingsFile"), + gSavedSettings.getF32("PhoenixFontSizeAdjustment")); // Force font reloads, which can be very slow LLFontGL::loadDefaultFonts(); } diff --git a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml index 2bd0d3c39a..6b00d03ba1 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml @@ -672,6 +672,7 @@ min_val="1" max_val="1.75" name="chat_line_spacing_slider" /> +--> - Small Font Size: + Font Size Adjustment: + control_name="PhoenixFontSizeAdjustment" + increment=".1" + decimal_digits="1" + initial_val="0" + min_val="-1" + max_val="2" /> - pt (defualt 10) + pt (defualt 0, larger values may not work well, requires restart) --->