diff options
author | Armin Le Grand <alg@apache.org> | 2013-05-16 14:53:56 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-17 13:59:17 +0100 |
commit | 5f84a4cdcb9ae2b2fc002cefeccf349682f0a29d (patch) | |
tree | f3a8e50400f6b1afd406ffafc3cc5ec760126482 /svgio | |
parent | 06f22f5ae0eafe094b280f03c770eebdbb33d403 (diff) |
Resolves: #i122324# detect own re-import of EmbeddedFonts...
and correct font name
(cherry picked from commit c2b5f0eedcc0fb7e0175e81b6f6127b99b8b7499)
Conflicts:
svgio/source/svgreader/svgcharacternode.cxx
Change-Id: I437db7feccd31a653f1100b426b568278faee4cc
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); |