diff options
| author | Felipe Corr??a da Silva Sanches <juca@members.fsf.org> | 2009-01-05 23:49:00 +0000 |
|---|---|---|
| committer | JucaBlues <JucaBlues@users.sourceforge.net> | 2009-01-05 23:49:00 +0000 |
| commit | e3e21769a60c52a3dd858a37c120aa8646946485 (patch) | |
| tree | fbba755eccd3c25f61e82ffa28d259a0e300240e /src/ui | |
| parent | Removed two g_warning's I had used for debugging... (diff) | |
| download | inkscape-e3e21769a60c52a3dd858a37c120aa8646946485.tar.gz inkscape-e3e21769a60c52a3dd858a37c120aa8646946485.zip | |
Another week coding offline...
* Adding Set Width (horiz-adv-x attribute) slider to the SVGFonts dialog.
* Fixed the order of some language options at the i18n preferences page.
* Fixed parsing and handling of u1 and u2 (CSS2 unicode range) attributes for kerning pair nodes
* Fixed a warning in helper-fns.h
* commented out unused variable in sp-font.cpp
* refactoring of nr-svgfonts.cpp
* using 1000 instead of horiz-adv-x when scaling the glyph coordinates. Probably should use a value based on units-per-em in the future. Or maybe accent-height,
cap-height, x-height... I don't know. I should study this subject a bit more first.
(bzr r7082)
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/dialog/inkscape-preferences.cpp | 8 | ||||
| -rw-r--r-- | src/ui/dialog/svg-fonts-dialog.cpp | 13 |
2 files changed, 13 insertions, 8 deletions
diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index e8a1e539c..0d97c0b77 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -1044,14 +1044,14 @@ void InkscapePreferences::initPageUI() _("sv Swedish"), _("th Thai"), _("tr Turkish"), _("uk Ukrainian"), _("vi Vietnamese"), _("zh_CN Chinese, as spoken in China"), _("zh_TW Chinese, as spoken in Taiwan")}; Glib::ustring langValues[] = {"", "am", "ar", "az", "be", "bg", "bn", "br", "ca", "ca@valencia", "cs", "da", "de", - "dz", "el", "en", "en_AU", "en_CA", "en_GB", "en_US@piglatin", "eo", "es_MX", "es", "et", "eu", "fi", "fr", "ga", + "dz", "el", "en", "en_AU", "en_CA", "en_GB", "en_US@piglatin", "eo", "es", "es_MX", "et", "eu", "fi", "fr", "ga", "gl", "he", "hr", "hu", "hy", "id", "it", "ja", "km", "ko", "lt", "mk", "mn", "nb", "ne", "nl", "nn", "pa", - "pl", "pt_BR", "pt", "ro", "ru", "rw", "sk", "sl", "sq", "sr@latin", "sr", "sv", "th", "tr", "uk", "vi", + "pl", "pt", "pt_BR", "ro", "ru", "rw", "sk", "sl", "sq", "sr", "sr@latin", "sv", "th", "tr", "uk", "vi", "zh_CN", "zh_TW"}; - _ui_languages.init( "/ui/language", languages, langValues, G_N_ELEMENTS(languages), languages[0]); + _ui_languages.init( "/ui/language", languages, langValues, G_N_ELEMENTS(languages), languages[0]); _page_ui.add_line( false, _("Language (requires restart):"), _ui_languages, "", - _("Set the language for menues and number-formats"), false); + _("Set the language for menus and number-formats"), false); Glib::ustring sizeLabels[] = {_("Normal"), _("Medium"), _("Small")}; int sizeValues[] = {0, 1, 2}; diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp index a29a01510..abdf4c3ae 100644 --- a/src/ui/dialog/svg-fonts-dialog.cpp +++ b/src/ui/dialog/svg-fonts-dialog.cpp @@ -321,6 +321,9 @@ void SvgFontsDialog::on_setwidth_changed(){ if (spfont){ spfont->horiz_adv_x = setwidth_spin.get_value(); //TODO: tell cairo that the glyphs cache has to be invalidated + // The current solution is to recreate the whole cairo svgfont. + // This is not a good solution to the issue because big fonts will result in poor performance. + update_glyphs(); } } @@ -364,16 +367,17 @@ Gtk::VBox* SvgFontsDialog::global_settings_tab(){ global_vbox->add(*AttrCombo((gchar*) _("Variant:"), SP_PROP_FONT_VARIANT)); global_vbox->add(*AttrCombo((gchar*) _("Weight:"), SP_PROP_FONT_WEIGHT)); */ + //Set Width (horiz_adv_x): -/* Gtk::HBox* setwidth_hbox = Gtk::manage(new Gtk::HBox()); + Gtk::HBox* setwidth_hbox = Gtk::manage(new Gtk::HBox()); setwidth_hbox->add(*Gtk::manage(new Gtk::Label(_("Set width:")))); setwidth_hbox->add(setwidth_spin); setwidth_spin.signal_changed().connect(sigc::mem_fun(*this, &SvgFontsDialog::on_setwidth_changed)); setwidth_spin.set_range(0, 4096); setwidth_spin.set_increments(10, 100); - global_vbox->add(*setwidth_hbox); -*/ + global_vbox.pack_start(*setwidth_hbox, false, false); + return &global_vbox; } @@ -498,7 +502,8 @@ void SvgFontsDialog::missing_glyph_description_from_selected_path(){ Geom::Matrix m(Geom::Coord(1),Geom::Coord(0),Geom::Coord(0),Geom::Coord(-1),Geom::Coord(0),Geom::Coord(0)); pathv*=m; //then we offset it - pathv+=Geom::Point(Geom::Coord(0),Geom::Coord(get_selected_spfont()->horiz_adv_x)); +// pathv+=Geom::Point(Geom::Coord(0),Geom::Coord(get_selected_spfont()->horiz_adv_x)); + pathv+=Geom::Point(Geom::Coord(0),Geom::Coord(1000));//TODO: use here the units-per-em attribute? SPObject* obj; for (obj = get_selected_spfont()->children; obj; obj=obj->next){ |
