Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | [SVG import] too thick line segments | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Draw | Reporter: | datbug | ||||||||||||
Component: | open-import | Assignee: | AOO issues mailing list <issues> | ||||||||||||
Status: | ACCEPTED --- | QA Contact: | |||||||||||||
Severity: | Normal | ||||||||||||||
Priority: | P3 | CC: | Armin.Le.Grand, issues, rb.henschel | ||||||||||||
Version: | 4.0.0-dev | ||||||||||||||
Target Milestone: | --- | ||||||||||||||
Hardware: | All | ||||||||||||||
OS: | All | ||||||||||||||
Issue Type: | DEFECT | Latest Confirmation in: | --- | ||||||||||||
Developer Difficulty: | --- | ||||||||||||||
Attachments: |
|
Created attachment 80828 [details]
test file
ALG: Did a direct overlay with mozilla display, I see two errors: - The letters at the mulecules are too big (this covers the correct line in example1) - The lines in 2nd and 3rd example indeed have a linewidth they should not have. Thanks for the examples, I will have a look! Created attachment 80846 [details]
Overlayed parts (screenshot from other renderer, SVG in AOO)
ALG: Grepping ALG: Öetters may be the same as #122524# Created attachment 80848 [details]
Reduced example
ALG: Reduced the exaple to only have two lines and the letters of the last molecule. Mozilla and Safari render it the same. Lines: Each has it's own group, in the group a style with stroke-width, th eline itself also has a stroke-width (same numerical value). The group also defines a transform. Which stroke-width is valid and does it underly the transformation in the parent group? Letters: text elements have a style element which contains a font-size statement and a direct font-size statement, both numerically different. Which one wins in such a case? Removing the non-style font-size statement makes it look better. Need to check what SVG spec says about such a case. ALG: Letters: Difference is that one font-size is a 'presentation attribute' the other a 'CSS style'. Found something about it in http://www.w3.org/TR/SVG/styling.html#UsingPresentationAttributes, the interesting sentemce is 'In general, this means that the presentation attributes have lower priority than other CSS style rules specified in author style sheets or ‘style’ attributes.'. This means the 'CSS style' font-size should have priority. Checking how to do that for attributes in general... ALG: Okay, done that in SvgNode::parseAttributes (explanation there). comitting this, the 'Letters' part is solved with this. Created attachment 80873 [details]
Even further reduced example only showing the LineWidth issue
ALG: I further reduced the example (added here). Strange:
(a) In Safari, 1st line is very thin, 2nd is normal
(b) In Mozilla it's the same
(c) In Inkscape (ungroup twice) the two lines have the same width
Intended is probably (c), but I cannot see how this happens from the values directly in the SVG. All embeddings in transformations (the groups) have influence on LineWidth, this is taken into account in import. Still, first line is fat, 2nd is not.
ALG: Both lines have stroke-width defined twice, once in style at group level, once in style at line level. I am pretty sure the one from Line-level has to be used, thus it will get transformed. That's what is constructed in the import, but result is different from e.g. inkscape. @Regina (setting on CC): Do you see how/why in inkscape both lines have the same width...? Reset assigne to the default "issues@openoffice.apache.org". |
Created attachment 80827 [details] image showing the behaviour XP, AOO400m2(Build:9701) - Rev. 1489073 2013-06-03 13:48:37 (Mo, 03 Jun 2013) Insert->Picture->From File short line segments are too thick and look different although created the same way??