diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ui/dialog/text-edit.cpp | 1 | ||||
| -rw-r--r-- | src/ui/widget/font-variants.cpp | 6 | ||||
| -rw-r--r-- | src/ui/widget/font-variants.h | 5 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp index 1b19f6d02..fca65a1ba 100644 --- a/src/ui/dialog/text-edit.cpp +++ b/src/ui/dialog/text-edit.cpp @@ -493,6 +493,7 @@ void TextEdit::onTextChange (GtkTextBuffer *text_buffer, TextEdit *self) void TextEdit::onFontChange(Glib::ustring fontspec) { + font_features.update_opentype ( fontspec ); onChange(); } diff --git a/src/ui/widget/font-variants.cpp b/src/ui/widget/font-variants.cpp index 72e67f88b..1c8815499 100644 --- a/src/ui/widget/font-variants.cpp +++ b/src/ui/widget/font-variants.cpp @@ -423,6 +423,12 @@ namespace Widget { _feature_label.hide(); } + update_opentype( font_spec ); + } + + // Update GUI based on OpenType tables of selected font (which may be changed in font selector tab). + void + FontVariants::update_opentype (Glib::ustring& font_spec) { // Disable/Enable based on available OpenType tables. font_instance* res = font_factory::Default()->FaceFromFontSpecification( font_spec.c_str() ); diff --git a/src/ui/widget/font-variants.h b/src/ui/widget/font-variants.h index 023bc8ef2..e6eeebd5f 100644 --- a/src/ui/widget/font-variants.h +++ b/src/ui/widget/font-variants.h @@ -148,6 +148,11 @@ public: void update( SPStyle const *query, bool different_features, Glib::ustring& font_spec ); /** + * Update GUI based on OpenType features of selected font. + */ + void update_opentype( Glib::ustring& font_spec ); + + /** * Fill SPCSSAttr based on settings of buttons. */ void fill_css( SPCSSAttr* css ); |
