summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2013-03-08 12:17:28 +0000
committer~suv <suv-sf@users.sourceforge.net>2013-03-08 12:17:28 +0000
commit963f5b812ca630ec5b40c71e78b76a2b4929be79 (patch)
tree9c6bccd2d4d5c87b2f029a84cc8c537bfb3529ac /src/libnrtype
parentmerge from trunk (r12181) (diff)
parentRestore CSS generic faux faces. (diff)
downloadinkscape-963f5b812ca630ec5b40c71e78b76a2b4929be79.tar.gz
inkscape-963f5b812ca630ec5b40c71e78b76a2b4929be79.zip
merge from trunk (r12182)
(bzr r11668.1.54)
Diffstat (limited to 'src/libnrtype')
-rw-r--r--src/libnrtype/FontFactory.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp
index a1a9ddc89..bb8b0887f 100644
--- a/src/libnrtype/FontFactory.cpp
+++ b/src/libnrtype/FontFactory.cpp
@@ -741,16 +741,23 @@ void font_factory::GetUIFamiliesAndStyles(FamilyToStylesMap *map)
continue;
}
- // Disable synthesized (faux) font faces
- if (pango_font_face_is_synthesized(faces[currentFace]) ) {
- continue;
- }
-
PangoFontDescription *faceDescr = pango_font_face_describe(faces[currentFace]);
if (faceDescr) {
Glib::ustring familyUIName = GetUIFamilyString(faceDescr);
Glib::ustring styleUIName = GetUIStyleString(faceDescr);
+ // Disable synthesized (faux) font faces except for CSS generic faces
+ if (pango_font_face_is_synthesized(faces[currentFace]) ) {
+ if( familyUIName.compare( "sans-serif" ) != 0 &&
+ familyUIName.compare( "serif" ) != 0 &&
+ familyUIName.compare( "monospace" ) != 0 &&
+ familyUIName.compare( "fantasy" ) != 0 &&
+ familyUIName.compare( "cursive" ) != 0 ) {
+ //std::cout << "faux: " << familyUIName << " | " << styleUIName << std::endl;
+ continue;
+ }
+ }
+
if (!familyUIName.empty() && !styleUIName.empty()) {
// Find the right place to put the style information, adding