Kaydet (Commit) c2b5f0ee authored tarafından Armin Le Grand's avatar Armin Le Grand

i122324 detect own re-import of EmbeddedFonts and correct font name

üst 7f6f4407
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment