Kaydet (Commit) 5f84a4cd authored tarafından Armin Le Grand's avatar Armin Le Grand Kaydeden (comit) Caolán McNamara

Resolves: #i122324# detect own re-import of EmbeddedFonts...

and correct font name

(cherry picked from commit c2b5f0ee)

Conflicts:
	svgio/source/svgreader/svgcharacternode.cxx

Change-Id: I437db7feccd31a653f1100b426b568278faee4cc
üst 06f22f5a
......@@ -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);
......
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