diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2013-01-31 16:52:48 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2013-01-31 16:52:48 +0000 |
| commit | baa52078f68c3c07e4e88447b4808d8bb791332b (patch) | |
| tree | 85905f1d3d72fccd393d8f2fede5d91abd9a3f20 /src | |
| parent | Partial fix for bug 595432 "Clicking Arial Black selects Arial Bold" (diff) | |
| download | inkscape-baa52078f68c3c07e4e88447b4808d8bb791332b.tar.gz inkscape-baa52078f68c3c07e4e88447b4808d8bb791332b.zip | |
Partial fix to allow change of style when the font-family is a font list.
(bzr r12081)
Diffstat (limited to 'src')
| -rw-r--r-- | src/libnrtype/FontFactory.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp index af46d6986..2cf4b8673 100644 --- a/src/libnrtype/FontFactory.cpp +++ b/src/libnrtype/FontFactory.cpp @@ -824,7 +824,12 @@ font_instance* font_factory::FaceFromUIStrings(char const *uiFamily, char const g_assert(uiFamily && uiStyle); if (uiFamily && uiStyle) { - Glib::ustring uiString = Glib::ustring(uiFamily) + Glib::ustring(uiStyle); + + // If font list, take only first font in list + gchar** tokens = g_strsplit( uiFamily, ",", 0 ); + g_strstrip( tokens[0] ); + + Glib::ustring uiString = Glib::ustring(tokens[0]) + Glib::ustring(uiStyle); UIStringToPangoStringMap::iterator uiToPangoIter = fontStringMap.find(uiString); |
