diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 76096f3385..1f9a6664e1 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -1135,6 +1135,10 @@ LLFontGL* LLFontGL::getFontByName(const std::string& name) { return getFontScripting(); } + else if (name == "Monospace") + { + return getFontMonospace(); + } // else { diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index c34c169fdb..744c1265d3 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -24532,6 +24532,28 @@ Change of this parameter will affect the layout of buttons in notification toast Value 3 + FSScriptingFontName + + Comment + The name of the font used for the LSL script editor + Persist + 1 + Type + String + Value + Scripting + + FSScriptingFontSize + + Comment + The size of the font used for the LSL script editor + Persist + 1 + Type + String + Value + Scripting + diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index ab6b9635fb..9a88e5c818 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -551,6 +551,14 @@ BOOL LLScriptEdCore::postBuild() mEditor = getChild("Script Editor"); + // FIRE-20818: User-selectable font and size for script editor + LLFontGL* font = LLFontGL::getFont(LLFontDescriptor(gSavedSettings.getString("FSScriptingFontName"), gSavedSettings.getString("FSScriptingFontSize"), LLFontGL::NORMAL)); + if (font) + { + mEditor->setFont(font); + } + // + // NaCl - LSL Preprocessor mCurrentEditor = mEditor; if (gSavedSettings.getBOOL("_NACL_LSLPreprocessor")) diff --git a/indra/newview/skins/default/xui/de/panel_preferences_firestorm.xml b/indra/newview/skins/default/xui/de/panel_preferences_firestorm.xml index 2cffcba418..68ac057f7d 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_firestorm.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_firestorm.xml @@ -199,6 +199,20 @@ + + Script Editor Font: + + + + + + + + + + + + +