diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/libnrtype/FontFactory.cpp | 2 | ||||
| -rw-r--r-- | src/widgets/text-toolbar.cpp | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp index 2cf4b8673..fdb02aa0f 100644 --- a/src/libnrtype/FontFactory.cpp +++ b/src/libnrtype/FontFactory.cpp @@ -831,6 +831,8 @@ font_instance* font_factory::FaceFromUIStrings(char const *uiFamily, char const Glib::ustring uiString = Glib::ustring(tokens[0]) + Glib::ustring(uiStyle); + g_strfreev( tokens ); + UIStringToPangoStringMap::iterator uiToPangoIter = fontStringMap.find(uiString); if (uiToPangoIter != fontStringMap.end ()) { diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp index 6c22c81e3..1f60c6214 100644 --- a/src/widgets/text-toolbar.cpp +++ b/src/widgets/text-toolbar.cpp @@ -178,6 +178,11 @@ static void sp_text_fontstyle_populate(GObject *tbl, font_instance *font=NULL) return; } + // If font list, take only first font in list + gchar** tokens = g_strsplit( current_font, ",", 0 ); + g_strstrip( tokens[0] ); + current_font = tokens[0]; + // Get an iter to the selected font from the model data // We cant get it from the combo, cause it might not have been created yet gboolean found = false; @@ -197,6 +202,8 @@ static void sp_text_fontstyle_populate(GObject *tbl, font_instance *font=NULL) valid = gtk_tree_model_iter_next( model, &iter ); } + g_strfreev( tokens ); + if (!found) { return; } |
