svgio/source/svgreader/svgcharacternode.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
New commits: commit c2b5f0eedcc0fb7e0175e81b6f6127b99b8b7499 Author: Armin Le Grand <a...@apache.org> Date: Thu May 16 14:53:56 2013 +0000 i122324 detect own re-import of EmbeddedFonts and correct font name diff --git a/svgio/source/svgreader/svgcharacternode.cxx b/svgio/source/svgreader/svgcharacternode.cxx index 7d3592f..eb337f0 100644 --- a/svgio/source/svgreader/svgcharacternode.cxx +++ b/svgio/source/svgreader/svgcharacternode.cxx @@ -248,9 +248,19 @@ namespace svgio if(nLength) { // prepare FontAttribute - const rtl::OUString aFontFamily = rSvgStyleAttributes.getFontFamily().empty() ? + rtl::OUString aFontFamily = rSvgStyleAttributes.getFontFamily().empty() ? rtl::OUString(rtl::OUString::createFromAscii("Times New Roman")) : rSvgStyleAttributes.getFontFamily()[0]; + + // #122324# if the FontFamily name ends on ' embedded' it is probably a re-import + // of a SVG export with fiont 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); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits