diff options
Diffstat (limited to 'src/ui/widget/font-variants.cpp')
| -rw-r--r-- | src/ui/widget/font-variants.cpp | 69 |
1 files changed, 35 insertions, 34 deletions
diff --git a/src/ui/widget/font-variants.cpp b/src/ui/widget/font-variants.cpp index 62598dead..6753bbc7a 100644 --- a/src/ui/widget/font-variants.cpp +++ b/src/ui/widget/font-variants.cpp @@ -8,26 +8,18 @@ */ #ifdef HAVE_CONFIG_H -# include <config.h> +#include <config.h> #endif #include <gtkmm.h> #include <glibmm/i18n.h> #include <libnrtype/font-instance.h> -#include <iostream> #include "font-variants.h" // For updating from selection #include "desktop.h" -#include "selection.h" -#include "style.h" #include "sp-text.h" -#include "sp-tspan.h" -#include "sp-tref.h" -#include "sp-textpath.h" -#include "sp-item-group.h" -#include "xml/repr.h" namespace Inkscape { namespace UI { @@ -239,9 +231,13 @@ namespace Widget { // Add tooltips _feature_entry.set_tooltip_text( _("Feature settings in CSS form. No sanity checking is performed.")); + _feature_list.set_justify( Gtk::JUSTIFY_LEFT ); + _feature_list.set_line_wrap( true ); + // Add to frame _feature_vbox.add( _feature_entry ); _feature_vbox.add( _feature_label ); + _feature_vbox.add( _feature_list ); _feature_frame.add( _feature_vbox ); add( _feature_frame ); @@ -540,30 +536,35 @@ namespace Widget { // Make list of tables not handled above... eventually add Gtk::Label with // this info. - // std::map<Glib::ustring,int> table_copy = res->openTypeTables; - // if( (it = table_copy.find("liga")) != table_copy.end() ) table_copy.erase( it ); - // if( (it = table_copy.find("clig")) != table_copy.end() ) table_copy.erase( it ); - // if( (it = table_copy.find("dlig")) != table_copy.end() ) table_copy.erase( it ); - // if( (it = table_copy.find("hlig")) != table_copy.end() ) table_copy.erase( it ); - // if( (it = table_copy.find("calt")) != table_copy.end() ) table_copy.erase( it ); - // if( (it = table_copy.find("subs")) != table_copy.end() ) table_copy.erase( it ); - // if( (it = table_copy.find("sups")) != table_copy.end() ) table_copy.erase( it ); - // if( (it = table_copy.find("smcp")) != table_copy.end() ) table_copy.erase( it ); - // if( (it = table_copy.find("c2sc")) != table_copy.end() ) table_copy.erase( it ); - // if( (it = table_copy.find("pcap")) != table_copy.end() ) table_copy.erase( it ); - // if( (it = table_copy.find("unic")) != table_copy.end() ) table_copy.erase( it ); - // if( (it = table_copy.find("titl")) != table_copy.end() ) table_copy.erase( it ); - // if( (it = table_copy.find("lnum")) != table_copy.end() ) table_copy.erase( it ); - // if( (it = table_copy.find("onum")) != table_copy.end() ) table_copy.erase( it ); - // if( (it = table_copy.find("pnum")) != table_copy.end() ) table_copy.erase( it ); - // if( (it = table_copy.find("tnum")) != table_copy.end() ) table_copy.erase( it ); - // if( (it = table_copy.find("frac")) != table_copy.end() ) table_copy.erase( it ); - // if( (it = table_copy.find("afrc")) != table_copy.end() ) table_copy.erase( it ); - // if( (it = table_copy.find("ordn")) != table_copy.end() ) table_copy.erase( it ); - // if( (it = table_copy.find("zero")) != table_copy.end() ) table_copy.erase( it ); - // for(it = table_copy.begin(); it != table_copy.end(); ++it) { - // std::cout << "Other: " << it->first << " Occurances: " << it->second << std::endl; - // } + std::map<Glib::ustring,int> table_copy = res->openTypeTables; + if( (it = table_copy.find("liga")) != table_copy.end() ) table_copy.erase( it ); + if( (it = table_copy.find("clig")) != table_copy.end() ) table_copy.erase( it ); + if( (it = table_copy.find("dlig")) != table_copy.end() ) table_copy.erase( it ); + if( (it = table_copy.find("hlig")) != table_copy.end() ) table_copy.erase( it ); + if( (it = table_copy.find("calt")) != table_copy.end() ) table_copy.erase( it ); + if( (it = table_copy.find("subs")) != table_copy.end() ) table_copy.erase( it ); + if( (it = table_copy.find("sups")) != table_copy.end() ) table_copy.erase( it ); + if( (it = table_copy.find("smcp")) != table_copy.end() ) table_copy.erase( it ); + if( (it = table_copy.find("c2sc")) != table_copy.end() ) table_copy.erase( it ); + if( (it = table_copy.find("pcap")) != table_copy.end() ) table_copy.erase( it ); + if( (it = table_copy.find("unic")) != table_copy.end() ) table_copy.erase( it ); + if( (it = table_copy.find("titl")) != table_copy.end() ) table_copy.erase( it ); + if( (it = table_copy.find("lnum")) != table_copy.end() ) table_copy.erase( it ); + if( (it = table_copy.find("onum")) != table_copy.end() ) table_copy.erase( it ); + if( (it = table_copy.find("pnum")) != table_copy.end() ) table_copy.erase( it ); + if( (it = table_copy.find("tnum")) != table_copy.end() ) table_copy.erase( it ); + if( (it = table_copy.find("frac")) != table_copy.end() ) table_copy.erase( it ); + if( (it = table_copy.find("afrc")) != table_copy.end() ) table_copy.erase( it ); + if( (it = table_copy.find("ordn")) != table_copy.end() ) table_copy.erase( it ); + if( (it = table_copy.find("zero")) != table_copy.end() ) table_copy.erase( it ); + std::string ott_list = "OpenType tables not included above: "; + for(it = table_copy.begin(); it != table_copy.end(); ++it) { + // std::cout << "Other: " << it->first << " Occurances: " << it->second << std::endl; + ott_list += it->first; + ott_list += ", "; + } + + _feature_list.set_text( ott_list.c_str() ); } else { std::cerr << "FontVariants::update(): Couldn't find font_instance for: " @@ -637,7 +638,7 @@ namespace Widget { } else if( _caps_all_small.get_active() ) { css_string = "all-small-caps"; caps_new = SP_CSS_FONT_VARIANT_CAPS_ALL_SMALL; - } else if( _caps_all_petite.get_active() ) { + } else if( _caps_petite.get_active() ) { css_string = "petite"; caps_new = SP_CSS_FONT_VARIANT_CAPS_PETITE; } else if( _caps_all_petite.get_active() ) { |
