diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2017-06-05 19:32:59 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2017-06-05 19:32:59 +0000 |
| commit | cb200b0eff43b9f9afb14d9a7fcedb7f8ee7c3a9 (patch) | |
| tree | e675cb7da3aefcf4dacfdf36edb3e8fe705097c0 /src/ui/widget/font-variants.cpp | |
| parent | [Bug #1695016] Xaml export misses some radialGradients. (diff) | |
| download | inkscape-cb200b0eff43b9f9afb14d9a7fcedb7f8ee7c3a9.tar.gz inkscape-cb200b0eff43b9f9afb14d9a7fcedb7f8ee7c3a9.zip | |
Show glyphs with alternative styles in "Feature Settings" section of "Variants" tab of "Text and Font" dialog.
(bzr r15731)
Diffstat (limited to 'src/ui/widget/font-variants.cpp')
| -rw-r--r-- | src/ui/widget/font-variants.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/ui/widget/font-variants.cpp b/src/ui/widget/font-variants.cpp index 6753bbc7a..e7645b620 100644 --- a/src/ui/widget/font-variants.cpp +++ b/src/ui/widget/font-variants.cpp @@ -234,10 +234,14 @@ namespace Widget { _feature_list.set_justify( Gtk::JUSTIFY_LEFT ); _feature_list.set_line_wrap( true ); + _feature_substitutions.set_justify( Gtk::JUSTIFY_LEFT ); + _feature_substitutions.set_line_wrap( true ); + // Add to frame _feature_vbox.add( _feature_entry ); _feature_vbox.add( _feature_label ); _feature_vbox.add( _feature_list ); + _feature_vbox.add( _feature_substitutions ); _feature_frame.add( _feature_vbox ); add( _feature_frame ); @@ -566,6 +570,36 @@ namespace Widget { _feature_list.set_text( ott_list.c_str() ); + // "<span foreground='darkblue'>"; + Glib::ustring markup; + + for (auto table: res->openTypeSubstitutions) { + + markup += table.first; + markup += ": "; + + markup += "<span font_family='"; + markup += sp_font_description_get_family(res->descr); + markup += "'>"; + markup += Glib::Markup::escape_text(table.second); + markup += "</span>"; + + markup += " → "; + + markup += "<span font_family='"; + markup += sp_font_description_get_family(res->descr); + markup += "'>"; + markup += "<span font_features='"; + markup += table.first; + markup += "'>"; + markup += Glib::Markup::escape_text(table.second); + markup += "</span>"; + markup += "</span>\n"; + + } + + _feature_substitutions.set_markup ( markup.c_str() ); + } else { std::cerr << "FontVariants::update(): Couldn't find font_instance for: " << font_spec << std::endl; |
