Author: jghali
Date: Mon Feb  5 18:36:15 2018
New Revision: 22381

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22381
Log:
#15099, improve librevenge based import: handle italic style <dtardon>

Modified:
    trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp

Modified: trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22381&path=/trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp Mon Feb  5 
18:36:15 2018
@@ -1640,11 +1640,13 @@
        const librevenge::RVNGProperty *fontNameProp = 
propList["style:font-name"] ? propList["style:font-name"] : 
propList["fo:font-name"];
        if (fontNameProp)
        {
-               QString fontVari;
-               if (propList["fo:font-weight"])
-                       fontVari = 
QString(propList["fo:font-weight"]->getStr().cstr());
+               QStringList fontVari;
+               if (propList["fo:font-weight"] && 
propList["fo:font-weight"]->getStr() != "normal")
+                       
fontVari.append(propList["fo:font-weight"]->getStr().cstr());
+               if (propList["fo:font-style"] && 
propList["fo:font-style"]->getStr() != "normal")
+                       
fontVari.append(propList["fo:font-style"]->getStr().cstr());
                QString fontName = QString(fontNameProp->getStr().cstr());
-               QString realFontName = constructFontName(fontName, fontVari);
+               QString realFontName = constructFontName(fontName, 
fontVari.join(' '));
                textCharStyle.setFont((*m_Doc->AllFonts)[realFontName]);
        }
        StyleFlag styleEffects = textCharStyle.effects();


_______________________________________________
scribus-commit mailing list
[email protected]
http://lists.scribus.net/mailman/listinfo/scribus-commit

Reply via email to