Weird font size with SVG files made with pstoedit

Bug #169125 reported by Rockstar1707
2
Affects Status Importance Assigned to Milestone
Inkscape
Fix Committed
Low
vonHalenbach

Bug Description

This is quite annoying bug connected with the font size. It applies to
Win32 and Inkscape 0.45.1. I also use Ghostscript AFPL 8.54 and pstoedit
3.44 on WinXP SP2.

I'm using Ghostscript+PsToEdit for converting PDF files to SVG files. I
open a PDF file in Ghostview and I choose "Convert to vector". I use
plot-svg (GNU liblplot) or conversion.
Now you open a SVG in Inkscape, made with the procedure described above,
choose text tool (F8) and start typing. The font size immediately changes
to some really big number, like 21000 or so. In some small file this is not
a problem, you change font size and you continue. But in big files this is
really annoying.

Steps to reproduce:
1. Make some file in Inkscape and save it as PDF.
2. Convert PDF to SVG with Ghostscript and pstoedit (via GSView).
3. Open converted SVG with Inkscape and start typing.
=> the font size should change to some really big number, like 8000 or
20000 (it's not always the same, depends on the file).

I'm not sure, but I think I experienced the same problems with SVG files
produced with Gnuplot. The common thing of all these files is, that they
don't have layers. Everything is in "root". Made this has something to do
with that. But the problem still exists even if you move everything from
"root" to some newly created layer.

I'm attaching 3 files:
1. original SVG, made with Inkscape.
2. PDF made in Inkscape from "original" SVG.
3. SVG, made with Ghostcript+pstoedit. The "bug" appears only in this SVG
file.

I hope the explanation of the problem was good enough.

Tags: viewbox
Revision history for this message
Rockstar1707 (rockstar1707) wrote : Weird font size with SVG files made with ghostscript
Revision history for this message
Rockstar1707 (rockstar1707) wrote :

Originator: YES

File Added: test.pdf

Revision history for this message
Rockstar1707 (rockstar1707) wrote :

Originator: YES

File Added: test-ghostscript.svg

Revision history for this message
Rockstar1707 (rockstar1707) wrote :

Originator: YES

One more thing. If you copy/paste the contents of the "problematic" SVG
file into a newly created empty file, the problem is gone. The font size
behaves as expected.

Revision history for this message
vonHalenbach (lustik) wrote :

Hm. On the first view i would say, that this is caused by Ghostscript. I will look into it. Thank you for your bugreport!

Changed in inkscape:
assignee: nobody → lustik
importance: Undecided → Low
status: New → In Progress
Revision history for this message
vonHalenbach (lustik) wrote :

The problem seems to be the conversion between PDF and SVG, where some strange parameters were introduced into the SVG. Example:
svg width="8in" height="8in" viewBox="0 0 1 1" preserveAspectRatio="none"

This adds a viewbox to the svg with the parameters "0 0 1 1".
g transform="translate(-0.03125,1.1875) scale(1,-1) scale(0.0017361) " xml:space="preserve"

This scales the 1px high and 1px wide svg up. No wonder, that inkscape understands something wrong and scales up the fonts with the same factor.

Revision history for this message
rockstar1707 (rockstar1707-gmail) wrote :

Thanks for looking up this. So I'll try to post the problem to ghostscript. I guess it would be good if they try to solve this issue.

Revision history for this message
Tim Holy (holy-wustl) wrote :

See related bug, 168777: it's not just ghostscript.

Thomas Holder (speleo3)
Changed in inkscape:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.