diff options
-rw-r--r-- | sdext/source/pdfimport/inc/wrapper.hxx | 12 | ||||
-rw-r--r-- | sdext/source/pdfimport/wrapper/wrapper.cxx | 26 |
2 files changed, 37 insertions, 1 deletions
diff --git a/sdext/source/pdfimport/inc/wrapper.hxx b/sdext/source/pdfimport/inc/wrapper.hxx index 9f25e1b7290b..94cc2b24327d 100644 --- a/sdext/source/pdfimport/inc/wrapper.hxx +++ b/sdext/source/pdfimport/inc/wrapper.hxx @@ -58,16 +58,28 @@ namespace pdfi // and they are checked from the suffix, thus the order matters. // e.g. for "TimesNewRomanPS-BoldItalic", to get "TimesNewRoman", you should // first have "Italic", and then "Bold", then "-", and then "PS". + "-VKana", "MT", "PS", "PSMT", "Regular", + "Normal", + "Book", + "Medium", + "ExtraBold", + "UltraBold", + "ExtraLight", + "UltraLight", "Bold", + "Heavy", + "Black", "Italic", "Oblique", "Bold", //BoldItalic, BoldOblique "Light", + "Thin", "Semibold", + "-Roman", "Reg", "VKana", "-", diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index 0560826d5727..cfa256f0acfa 100644 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -492,7 +492,15 @@ void LineParser::parseFontFamilyName( FontAttributes& rResult ) { rResult.familyName = rResult.familyName.replaceAll(fontAttributesSuffix, ""); SAL_INFO("sdext.pdfimport", rResult.familyName); - if (fontAttributesSuffix == u"Bold") + if (fontAttributesSuffix == u"Heavy" || fontAttributesSuffix == u"Black") + { + rResult.fontWeight = u"900"; + } + else if (fontAttributesSuffix == u"ExtraBold" || fontAttributesSuffix == u"UltraBold") + { + rResult.fontWeight = u"800"; + } + else if (fontAttributesSuffix == u"Bold") { rResult.fontWeight = u"bold"; } @@ -500,10 +508,26 @@ void LineParser::parseFontFamilyName( FontAttributes& rResult ) { rResult.fontWeight = u"600"; } + else if (fontAttributesSuffix == u"Medium") + { + rResult.fontWeight = u"500"; + } + else if (fontAttributesSuffix == u"Normal" || fontAttributesSuffix == u"Regular" || fontAttributesSuffix == u"Book") + { + rResult.fontWeight = u"400"; + } else if (fontAttributesSuffix == u"Light") { rResult.fontWeight = u"300"; } + else if (fontAttributesSuffix == u"ExtraLight" || fontAttributesSuffix == u"UltraLight") + { + rResult.fontWeight = u"200"; + } + else if (fontAttributesSuffix == u"Thin") + { + rResult.fontWeight = u"100"; + } if ( (fontAttributesSuffix == "Italic") or (fontAttributesSuffix == "Oblique") ) { |