Issue 122183 - SVG with wrong Font "Times New Roman" instead of "Arial"
Summary: SVG with wrong Font "Times New Roman" instead of "Arial"
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: Draw
Classification: Application
Component: save-export (show other issues)
Version: 4.0.0-dev
Hardware: All Windows 7
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-28 09:32 UTC by Rainer Bielefeld
Modified: 2017-05-20 09:59 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Test Kit (240.21 KB, application/zip)
2013-04-28 09:32 UTC, Rainer Bielefeld
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Rainer Bielefeld 2013-04-28 09:32:12 UTC
Created attachment 80602 [details]
Test Kit

Steps how to reproduce Reproducible with server installation of  "AOOo 4.0.0-Dev – English UI / German locale [AOO400m1(Build:9700) - Rev.1476029]" on WIN7 Home Premium (64bit)", own separate user profile:

0. Download / unzip attached test kit
1. Open sample.odg via OOo Start center File menu
2. Menu 'File -> Export -> SVG - Myresult.svg' <Export>
3. Open "Myresult.svg" with any viewer (FF, IE)
   Expected: Arial from Source shown as Arial in "Myresult.svg"
   Actual: Times New roman instead of Arial

Screenshot in Test Kit shows how it looks for me in OOo, also my export result sample.svg is in the test kit
Comment 1 DanielAlvaro 2013-05-10 19:40:46 UTC
Hello,

I reproduced this issue with A00 4.0.0 DEV 64 bit and I found the same problem with the type font.

Regards,

Daniel Alvaro
Comment 2 Armin Le Grand 2013-05-15 17:05:52 UTC
ALG: Tried this out, created svg file contains two embedded fonts, one "Arial embedded" and one "Courier New embedded". When importing to AOO and breaking, this fonts get used. No error visible. Checking if there is a possibility to switch off font embedding for the SVG export...
Comment 3 Armin Le Grand 2013-05-15 17:18:11 UTC
ALG: Looks as if SVG_DISABLE_FONT_EMBEDDING has to be set to false in the environment, did that in the debugger. The exported SVG looks good, -re-import has the fonts as expected.
Directly re-imported to AOO, selected, F4, set object size to page size, break -> the fonts are correct, the font sizes are correct.
FF looks good, too. Looks less good with font embedding, though.

@rainerbielefeld: Please check with font embedding deactivated, maybe also do the re-import and break.

ALG: Cannot reproduce.
Comment 4 Rainer Bielefeld 2013-05-15 17:40:31 UTC
(In reply to comment #3)
> @rainerbielefeld: Please check with font embedding deactivated, 

I do not know how to do that
Comment 5 Ariel Constenla-Haile 2013-05-15 18:16:50 UTC
(In reply to comment #4)
> > @rainerbielefeld: Please check with font embedding deactivated, 
> 
> I do not know how to do that

On Linux, open a terminal, type

export SVG_DISABLE_FONT_EMBEDDING=1

press Enter, and run OpenOffice from the terminal, by invoking /opt/openoffice.org3/program/soffice

On Windows, execute cmd.exe, set the variable on the
command prompt

set SVG_DISABLE_FONT_EMBEDDING=1

and execute AOO within that command prompt - using the full path to soffice.exe
Comment 6 Rainer Bielefeld 2013-05-15 20:20:32 UTC
(In reply to comment #5)
> On Windows ...

Yes, that makes the difference:
Problem is still reproducible with normally launched server installation of  "AOO 4.0.0-Dev – English UI / German locale [AOO400m1(Build:9700) - Rev. 1482523 Rev.1482259 (2013-05-15)]" on WIN7 Home Premium (64bit)", own separate user profile.

But proceeding as per Comment 4 with the same version shows the correct fonts in export.svg
Comment 7 Rainer Bielefeld 2013-05-15 20:40:42 UTC
Sorry, wanted to type "But proceeding as per Comment 5 with the same ..."
Comment 8 Armin Le Grand 2013-05-16 09:22:26 UTC
ALG: Checked and for some reason in the source there *is* a dialog for SVG export which would allow switching options like this on/off, but it's not used/connected (and I do not know how to do that). Does someone know more here and could try to activate that dialog so that it pops up when the export starts (as some exports do)? It's in main\filter\source\svg\svgdialog.cxx

Back to the problem: The 'error' seems to be more that the FontEmbedding (which is there to ensure better quality) leads to less quality because the character spacing is choosen so bad...
Comment 9 Armin Le Grand 2013-05-16 09:36:40 UTC
ALG: Checked with different browsers
Safari: Both exported versions look identical, only small difefrences
FF: The embed version looks horrible, the other looks okay, same as in safari
IE: Shows the SVG source when opening, does someone know how to make it render SVG?
Inkscape: Similar to FF, embedded looks ugly, but uses the embedded font (remove groupings until you can select text). Non-embedded looks much better, uses the fonts as defined (plus scaling in font size, of course).

I would conclude that our SVG export produces valid, high-quality font embedding as can be seen by the visualizations of some SVG users.
Some SVG users (e.g. FF and Inkscape) seem to have bugs dealing with this.

-> Not really our bug.

As workaround, switching off font embedding is possible, yet not on UI unfortunately.
Comment 10 Rainer Bielefeld 2013-05-16 10:46:08 UTC
(In reply to comment #9)
> Some SVG users (e.g. FF and Inkscape) seem to have bugs dealing with this.

And AOO ...

ALG's reasoning sounds plausible, and I agree with the rating for this one.

So I submitted "Bug 122324 - SVG with embedded fonts shows wrong kerning, character-distances, character rendering" for the import problems.