=== modified file 'src/libnrtype/font-lister.cpp'
--- src/libnrtype/font-lister.cpp 2015-05-09 15:39:31 +0000
+++ src/libnrtype/font-lister.cpp 2015-11-07 03:28:32 +0000
@@ -5,6 +5,7 @@
#include <gtkmm/liststore.h>
#include <gtkmm/treemodel.h>
+#include "libnrtype/FontFactory.h"
#include <libnrtype/font-instance.h>
#include <libnrtype/TextWrapper.h>
#include <libnrtype/one-glyph.h>
@@ -123,9 +124,14 @@
}
}
-FontLister *FontLister::get_instance()
+FontLister *FontLister::get_instance(bool refresh)
{
static Inkscape::FontLister *instance = new Inkscape::FontLister();
+ if(refresh){
+ PangoFontMap * fontmap = pango_cairo_font_map_get_default();
+ font_factory::fontServer = fontmap;
+ instance = new Inkscape::FontLister();
+ }
return instance;
}
=== modified file 'src/libnrtype/font-lister.h'
--- src/libnrtype/font-lister.h 2014-10-17 20:03:14 +0000
+++ src/libnrtype/font-lister.h 2015-11-07 01:20:07 +0000
@@ -150,7 +150,7 @@
void update_font_list(SPDocument *document);
public:
- static Inkscape::FontLister *get_instance();
+ static Inkscape::FontLister *get_instance(bool refresh = false);
/**
* Takes a hand written font spec and returns a Pango generated one in
=== modified file 'src/widgets/text-toolbar.cpp'
--- src/widgets/text-toolbar.cpp 2015-04-29 20:51:23 +0000
+++ src/widgets/text-toolbar.cpp 2015-11-07 01:22:26 +0000
@@ -855,7 +855,7 @@
Ink_ComboBoxEntry_Action* fontStyleAction =
INK_COMBOBOXENTRY_ACTION( g_object_get_data( tbl, "TextFontStyleAction" ) );
- Inkscape::FontLister* fontlister = Inkscape::FontLister::get_instance();
+ Inkscape::FontLister* fontlister = Inkscape::FontLister::get_instance(true);
if (!subselection) {
fontlister->update_font_list( SP_ACTIVE_DESKTOP->getDocument());
}
-
Please log in to leave a comment!