diff options
Diffstat (limited to 'svgio')
-rw-r--r-- | svgio/source/svgreader/svgcharacternode.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/svgio/source/svgreader/svgcharacternode.cxx b/svgio/source/svgreader/svgcharacternode.cxx index e6a4a1982a4e..b154645bb2bd 100644 --- a/svgio/source/svgreader/svgcharacternode.cxx +++ b/svgio/source/svgreader/svgcharacternode.cxx @@ -243,9 +243,19 @@ namespace svgio if(nLength) { // prepare FontAttribute - const OUString aFontFamily = rSvgStyleAttributes.getFontFamily().empty() ? - OUString(OUString::createFromAscii("Times New Roman")) : + OUString aFontFamily = rSvgStyleAttributes.getFontFamily().empty() ? + OUString("Times New Roman") : rSvgStyleAttributes.getFontFamily()[0]; + + // #i122324# if the FontFamily name ends on ' embedded' it is probably a re-import + // of a SVG export with font embedding. Remove this to make font matching work. This + // is pretty safe since there should be no font family names ending on ' embedded'. + // Remove again when FontEmbedding is implemented in SVG import + if(aFontFamily.endsWithAsciiL(" embedded", 9)) + { + aFontFamily = aFontFamily.copy(0, aFontFamily.getLength() - 9); + } + const ::FontWeight nFontWeight(getVclFontWeight(rSvgStyleAttributes.getFontWeight())); bool bSymbol(false); bool bVertical(false); |