Issues with 'ex' relative units for <svg> width, height
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I have tried to convert this SVG file to PNG:
https:/
using the command-line tool:
inkscape -f e2293e769a19cf7
Although there are some warnings, my Linux version can convert it successfully, while my Mac version cannot: it produces a blank PNG file. It produces the following message:
/Applications/
** (inkscape-
Background RRGGBBAA: ffffff00
Area -1:-1:0:0 exported to 40 x 40 pixels (3600 dpi)
Bitmap saved as: /Users/
In Linux, it instead says:
Area 0:0:36634.4:2393.2 exported to 612 x 40 pixels (1.50426 dpi)
Both Mac and Linux has Inkscape 0.91 r13725. When I downgraded to Mac version 0.48.5 r10040, it works good.
summary: |
- Mac version cannot convert some SVG files + Issues with 'ex' relative units for <svg> width, height |
Not reproduced with Inkscape 0.91 r13725 on Ubuntu 14.04
Reproduced with Inkscape 0.91 r13725 (official package as well as with regular local build installed into fixed prefix), lp:inkscape 0.92.x r15116 (local build) on OS X 10.7.5.
The issue seems to be related to 'ex' units used for for the root <svg> element's width and height attributes:
<svg xmlns:xlink="http:// www.w3. org/1999/ xlink" width="85.087ex" height="5.558ex" focusable="false" xmlns="http:// www.w3. org/2000/ svg" style=" vertical- align: -2.054ex; margin-bottom: -0.147ex; max-width: 736px; position: static;" viewBox="0 -1445.5 36634.4 2393.2">
“(...) the em and ex unit identifiers are relative to the current font's font-size and x-height, respectively.“
Also affects regular opening (via GUI), and import of the file into a new document - the issue is not specific to command line usage or PNG export.
Import into a new document applies this transformation to the imported group (with 0.91): 0,0,0,0, 375,532. 3622)
matrix(
which renders 'invisible' since the group is scaled to zero size.