diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2013-03-08 11:52:07 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2013-03-08 11:52:07 +0000 |
| commit | 14f6e2bcab3830c642ee4cf3591dc38831485fb1 (patch) | |
| tree | 8a8ede0dd9566bcbcbd95e04c4cb028f22bfc8fc /src/libnrtype | |
| parent | Drop deprecated get_vbox method in Gtk::Dialog (diff) | |
| download | inkscape-14f6e2bcab3830c642ee4cf3591dc38831485fb1.tar.gz inkscape-14f6e2bcab3830c642ee4cf3591dc38831485fb1.zip | |
Restore CSS generic faux faces.
(bzr r12182)
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 |
