diff --git a/indra/integration_tests/llui_libtest/llui_libtest.cpp b/indra/integration_tests/llui_libtest/llui_libtest.cpp index 8ec8a91a6d..e7fae25693 100644 --- a/indra/integration_tests/llui_libtest/llui_libtest.cpp +++ b/indra/integration_tests/llui_libtest/llui_libtest.cpp @@ -169,6 +169,7 @@ void init_llui() LLFontGL::initClass(96.f, 1.f, 1.f, gDirUtilp->getAppRODataDir(), LLUI::getXUIPaths(), + "fonts.xml", false ); // don't create gl textures LLFloaterView::Params fvparams; diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index a3f9313e90..903983aa0c 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, 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, bool create_gl_textures) { sVertDPI = (F32)llfloor(screen_dpi * y_scale); sHorizDPI = (F32)llfloor(screen_dpi * x_scale); @@ -811,7 +811,12 @@ void LLFontGL::initClass(F32 screen_dpi, F32 x_scale, F32 y_scale, const std::st if (!sFontRegistry) { sFontRegistry = new LLFontRegistry(xui_paths, create_gl_textures); - sFontRegistry->parseFontInfo("fonts.xml"); + // Allow the user to pick the fonts + if (!sFontRegistry->parseFontInfo(fonts_file)) + { + // fall back to default if specifed font settings file is not found -KC + sFontRegistry->parseFontInfo("fonts.xml"); + } } else { diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h index dc8d848ed2..007e15b30c 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, 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, bool create_gl_textures = true); // Load sans-serif, sans-serif-small, etc. // Slow, requires multiple seconds to load fonts. diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 54acfcd1d2..897f857f29 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -15083,5 +15083,16 @@ Change of this parameter will affect the layout of buttons in notification toast 1 + PhoenixFontSettingsFile + + Comment + Line spacing on chat + Persist + 1 + Type + String + Value + fonts.xml + diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ba981058f9..52ce159bab 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1526,7 +1526,8 @@ LLViewerWindow::LLViewerWindow( mDisplayScale.mV[VX], mDisplayScale.mV[VY], gDirUtilp->getAppRODataDir(), - LLUI::getXUIPaths()); + LLUI::getXUIPaths(), + gSavedSettings.getString("PhoenixFontSettingsFile")); // Create container for all sub-views LLView::Params rvp; @@ -4577,7 +4578,8 @@ void LLViewerWindow::initFonts(F32 zoom_factor) mDisplayScale.mV[VX] * zoom_factor, mDisplayScale.mV[VY] * zoom_factor, gDirUtilp->getAppRODataDir(), - LLUI::getXUIPaths()); + LLUI::getXUIPaths(), + gSavedSettings.getString("PhoenixFontSettingsFile")); // 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 02556e4785..b12b50b63c 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml @@ -1,25 +1,37 @@ + width="535"> + + + + + - + + + + + + Font Scheme: + + + + + + + + + (Requires restart) + + + + + + + +