Author: alg
Date: Thu May 16 14:53:56 2013
New Revision: 1483396

URL: http://svn.apache.org/r1483396
Log:
i122324 detect own re-import of EmbeddedFonts and correct font name

Modified:
    openoffice/trunk/main/svgio/source/svgreader/svgcharacternode.cxx

Modified: openoffice/trunk/main/svgio/source/svgreader/svgcharacternode.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/svgio/source/svgreader/svgcharacternode.cxx?rev=1483396&r1=1483395&r2=1483396&view=diff
==============================================================================
--- openoffice/trunk/main/svgio/source/svgreader/svgcharacternode.cxx (original)
+++ openoffice/trunk/main/svgio/source/svgreader/svgcharacternode.cxx Thu May 
16 14:53:56 2013
@@ -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);


Reply via email to