Optimized SVG includes px sizing of fonts

Bug #644902 reported by Ian Barnes-Keoghan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Undecided
Unassigned
Scour
Invalid
Undecided
Unassigned

Bug Description

Save as "Optimized SVG" leaves "px" as the unit for font-size in text objects.

Other objects have no units (so are relative to the viewBox).

When this SVG is scaled by external application (e.g. PrinceXML), text objects are not scaled the same (Prince has a different default scaling for pixel-sized objects to that used by Inkscape).

Manually editing the svg to remove the "px" unit from the text objects fixes this problem.

Version 0.48, Windows XP.

Tags: saving svg units
tags: added: saving units
tags: added: svg
Revision history for this message
nightrow (jb-benoit) wrote :

If i understand correctly you want that saving to "optimized SVG" remove also units for for font-size in text objects ?

Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :

That looks like a correct interpretation of the bug description, nightrow.

But I must decline this as a Scour bug (was it even a Scour bug in 2012, or did someone recently apply it to Scour?).

px are absolute; they're meant to be measurements that don't change except maybe via transformation matrices that affect sizes. A px may be the same thing as a SVG-viewbox unit by default, but that's not the case for all SVGs, or even most, or many. Someone else may decide to take an SVG document and apply a viewbox to it to scale 256 units down to 96px, and then the px differs.

Since 2010-09-22, has Inkscape started to use SVG units for text elements, or has it continued using px?

Changed in scour:
status: New → Invalid
Revision history for this message
nightrow (jb-benoit) wrote : Re: [Bug 644902] Re: Optimized SVG includes px sizing of fonts

Just wanted this old "new" bug to be deal with, thanks to have it closed.

Le 08/12/2012 11:54, Louis Simard a écrit :
> That looks like a correct interpretation of the bug description,
> nightrow.
>
> But I must decline this as a Scour bug (was it even a Scour bug in 2012,
> or did someone recently apply it to Scour?).
>
> px are absolute; they're meant to be measurements that don't change
> except maybe via transformation matrices that affect sizes. A px may be
> the same thing as a SVG-viewbox unit by default, but that's not the case
> for all SVGs, or even most, or many. Someone else may decide to take an
> SVG document and apply a viewbox to it to scale 256 units down to 96px,
> and then the px differs.
>
> Since 2010-09-22, has Inkscape started to use SVG units for text
> elements, or has it continued using px?
>
> ** Changed in: scour
> Status: New => Invalid
>

Revision history for this message
su_v (suv-lp) wrote :

Closing as 'Invalid' for Inkscape (in disagreement with the earlier comment by the scour team explaining the reason why the report is considered as 'Invalid' for the project 'Scour' with the argument «px are absolute»): in SVG, one 'px' unit is defined to be equal to one user unit, and thus relative to the drawing scale as defined by the viewBox and the 'width', 'height' attributes of the top-level <svg> element:
http://www.w3.org/TR/SVG11/coords.html#Units

Font sizes defined as CSS style property in the 'style' attribute always need to include a unit identifier (see also bug #1314910).
Even when used in a CSS property as required unit identifier, 'px' still denotes a 'SVG user unit' (in the SVG context):
http://wiki.inkscape.org/wiki/index.php/Units_In_Inkscape#The_Philosophy

Inkscape uses 'px' as required by the specs for 'font-size' declared as CSS property in a 'style' attribute. Inkscape itself does not store properties in presentation attributes (the unit identifier may be omitted in the value of presentation attributes).

The reporter did not provide any test case, nor any specifics whether the context of the report is a CSS property in a style attribute, or via presentation attribute.

Changed in inkscape:
status: New → Invalid
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.