diff options
Diffstat (limited to 'src/libnrtype')
| -rw-r--r-- | src/libnrtype/FontFactory.cpp | 17 |
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 |
