summaryrefslogtreecommitdiffstats
path: root/src/widgets/font-selector.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2014-10-15 18:56:16 +0000
committertavmjong-free <tavmjong@free.fr>2014-10-15 18:56:16 +0000
commit58989cdb66d715f968d4c3e77fd13532c92e1fda (patch)
tree3ae5fad83e24b42753aa14e117d06ff810abc40d /src/widgets/font-selector.cpp
parentFix build (diff)
parentVarious small font things. (diff)
downloadinkscape-58989cdb66d715f968d4c3e77fd13532c92e1fda.tar.gz
inkscape-58989cdb66d715f968d4c3e77fd13532c92e1fda.zip
Font caching from experimental branch. Speeds up Inkscape start-up.
Most work by Liam. Various tweeks by Tav. (bzr r13617)
Diffstat (limited to 'src/widgets/font-selector.cpp')
-rw-r--r--src/widgets/font-selector.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp
index f00f05768..327349844 100644
--- a/src/widgets/font-selector.cpp
+++ b/src/widgets/font-selector.cpp
@@ -304,6 +304,9 @@ static void sp_font_selector_family_select_row(GtkTreeSelection *selection,
GtkTreeModel *model;
GtkTreeIter iter;
if (!gtk_tree_selection_get_selected (selection, &model, &iter)) return;
+
+ Inkscape::FontLister *fontlister = Inkscape::FontLister::get_instance();
+ fontlister->ensureRowStyles(model, &iter);
// Next get family name with its style list
gchar *family;
@@ -311,7 +314,6 @@ static void sp_font_selector_family_select_row(GtkTreeSelection *selection,
gtk_tree_model_get (model, &iter, 0, &family, 1, &list, -1);
// Find best style match for selected family with current style (e.g. of selected text).
- Inkscape::FontLister *fontlister = Inkscape::FontLister::get_instance();
Glib::ustring style = fontlister->get_font_style();
Glib::ustring best = fontlister->get_best_style_match (family, style);