diff options
author | Anton Yabchinskiy <arn@bestmx.ru> | 2015-01-05 23:56:24 +0300 |
---|---|---|
committer | Anton Yabchinskiy <arn@bestmx.ru> | 2015-01-05 23:56:24 +0300 |
commit | a7875c586af74302584544d777b189f4cb85c393 (patch) | |
tree | f4929f77383d835b5be8b6e099b9db59000af610 /tools/editor/code_editor.cpp | |
parent | 4ab1bcde35a02cfe7b25d630720de1cc81ef5a1a (diff) | |
parent | 8c4dd8de3919b789eac1a0f030563008bdcd44f5 (diff) | |
download | redot-engine-a7875c586af74302584544d777b189f4cb85c393.tar.gz |
Merge branch 'master' of github.com:okamstudio/godot
Diffstat (limited to 'tools/editor/code_editor.cpp')
-rw-r--r-- | tools/editor/code_editor.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tools/editor/code_editor.cpp b/tools/editor/code_editor.cpp index 242654c472..2209b24245 100644 --- a/tools/editor/code_editor.cpp +++ b/tools/editor/code_editor.cpp @@ -599,7 +599,19 @@ CodeTextEditor::CodeTextEditor() { add_child(text_editor); text_editor->set_area_as_parent_rect(); text_editor->set_margin(MARGIN_BOTTOM,20); - text_editor->add_font_override("font",get_font("source","Fonts")); + + String editor_font = EDITOR_DEF("text_editor/font", ""); + bool font_overrode = false; + if (editor_font!="") { + Ref<Font> fnt = ResourceLoader::load(editor_font); + if (fnt.is_valid()) { + text_editor->add_font_override("font",fnt); + font_overrode = true; + } + } + + if (!font_overrode) + text_editor->add_font_override("font",get_font("source","Fonts")); text_editor->set_show_line_numbers(true); text_editor->set_brace_matching(true); |