Bug 46860

Summary: LO gives wrong font name when export ODG to SVG
Product: LibreOffice Reporter: avi9526 <dromaretsky>
Component: DrawAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: sasha.libreoffice
Priority: medium    
Version: Inherited From OOo   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: ODG and SVGs exported under various versions of LO.

Description avi9526 2012-03-01 22:18:31 UTC
LO gives wrong font names in svg files. So file viewed incorrectly in other programs.
Steps to reproduce:
1. Create odg document with some text field and define some font for it
2. Go "File"->"Export". And write filename for svg file with end by ".svg". Hit "Enter".
3. Open saved svg file in text editor - it has "embedded" word in font name field.
For example:
style="font-family:ISOCPEUR embedded;font-size:494px;font-weight:400"
while normal font name "ISOCPEUR".
Comment 1 sasha.libreoffice 2012-05-29 05:46:11 UTC
Thanks for bugreport
reproduced in 3.3.4 and 3.5.3 on Fedora 64 bit
(word embedded in tag "font-face"). But I do not know it is good or bad
Resulting picture looks incorrectly, text in wrong place
Comment 2 avi9526 2012-05-29 19:07:46 UTC
Of course it's bad. Because font is not embedded in *.svg file, but font name have "embedded" prefix. When I export my *.odg files to svg format I must edit all text fields to remove from font-name word "embedded", otherwise - all text looks different when I open this *.svg files in other programs (OS use default font - which is inappropriate for me).
Comment 3 Owen Genat (retired) 2013-12-07 02:28:05 UTC
Created attachment 90385 [details]
ODG and SVGs exported under various versions of LO.

I think this bug can be RESOLVED as FIXED. Attached ODG contains two text boxes (text in Linux Libertine G and DejaVu Sans) and was created under Ubuntu 10.04 x86_64 running v3.3.0.4. It was then exported to SVG under Ubuntu 10.04 x86_64 running:

- v3.3.0.4 OOO330m19 Build: 6
- v3.4.6.2 OOO340m1 Build: 602
- v3.5.7.2 Build ID: 3215f89-f603614-ab984f2-7348103-1225a5b
- v3.6.7.2 Build ID: e183d5b
- v4.0.6.2 Build ID: 2e2573268451a50806fcd60ae2d9fe01dd0ce24
- v4.1.3.2 Build ID: 70feb7d99726f064edab4605a8ab840c50ec57a

Resultant code in the SVGs (also attached) indicates that this issue appears to have been fixed:

v3.3.0.4 and v3.4.6.2: 
<font-face font-family="Linux Libertine G embedded" ...
<font-face font-family="DejaVu Sans embedded" ...
<g font-family="Linux Libertine G embedded;font-size ... ">
<g font-family="DejaVu Sans embedded;font-size ... ">

v3.5.7.2 and v3.6.7.2: 
<font-face font-family="Linux Libertine G embedded" ...
<font-face font-family="DejaVu Sans embedded" ...
<g font-family="Linux Libertine G embedded" ...
<g font-family="DejaVu Sans embedded" ...

v4.0.6.2 and v4.1.3.2: 
<text class="TextShape"><tspan class="TextParagraph" font-family="Linux Libertine G" ...
<text class="TextShape"><tspan class="TextParagraph" font-family="DejaVu Sans, sans-serif" 

If the problem is still evident, then it may be font or context specific. If others could confirm with their chosen fonts and uses it would be much appreciated. Thanks.
Comment 4 Owen Genat (retired) 2013-12-07 02:28:52 UTC
Version set to Inherited From OOo as a result of comment #3.
Comment 5 sasha.libreoffice 2013-12-07 07:25:46 UTC
4.1.3 on Fedora 64 bit also works correctly
Comment 6 Owen Genat (retired) 2014-07-20 10:35:26 UTC
Appears to still be working as expected in v4.3.0.3 Build ID: 08ebe52789a201dd7d38ef653ef7a48925e7f9f7. As a result of comment 3 status set to RESOLVED as WORKSFORME. If this problem is still evident then please reopen.