share/examples: rescale svgs to 96 dpi

Bug #1651815 reported by David Evans on 2016-12-21
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

In current trunk and 0.92.x, the example svgs in share/examples are old style 90 dpi files. When they are opened this now displays the warning dialog that these are old style 90 dpi files and offers to help make them 96 dpi compatible as required by CSS.

This is all well and good but raises the question of distributing outdated example files.

I'm suggesting that these files be rescaled to 96 dpi in trunk and backported to 0.92.x before the final 0.92 release.

Issue is visible in 0.92pre4 and trunk 15340 built using

Macports 2.3.5
Mac OS X 10.11.6 (El Capitan)
Xcode 8.2
Build version 8C38

Alvin Penner (apenner) wrote :

presence of warning dialog confirmed on Windows XP, Inkscape 0.92pre4

Changed in inkscape:
status: New → Confirmed
su_v (suv-lp) wrote :

The example files are actually legacy files (maybe time would be better spent to create examples for newer features ...)?

Personally, I'd focus on the tutorials (Inkscape SVG files) which ship with inkscape (see Help menu) - it seems more important to me to have those not triggering the document scale dialog (tutorials are built based on sources for i18n maintained in lp:inkscape-docs ).@JazzyNico - will all tutorials be rebuilt for the stable release branch (to update translations), and if so could either viewBox attribute be added, or 'inkscape:version' bumped to 0.92 in the final SVG files to not trigger the document scale dialog?)

su_v (suv-lp) wrote :

su_v wrote:
> @JazzyNico - will all tutorials be rebuilt for the stable release
> branch (to update translations), and if so could either viewBox
> attribute be added, or 'inkscape:version' bumped to 0.92 in the final
> SVG files to not trigger the document scale dialog?)

Actually, bumping inkscape:version to '0.92' would be sufficient for the tutorials ... no viewBox needed (unless there is a lot of concern wrt exact physical size relative to the page width (page height doesn't match anyway AFAICS), e.g. for PDF export).

Tavmjong Bah (tavmjong-free) wrote :

I agree with su_v, the tutorials should be a high priority.

A 0.92.1 project would be to clean-up the templates and tutorials, checking for relevancy and accuracy, and applying the options to remove unneeded and inappropriate attributes and style properties (available under Input/Output -> SVG Output in the Inkscape Preferences dialog.

I am working on a Mesh tutorial but it won't be ready for 0.92.

jazzynico (jazzynico) wrote :

The tutorials are up to date, but I can rebuild them with a new inkscape:version if needed.

tags: added: documentation
tags: added: units
Changed in inkscape-docs:
status: New → Triaged
importance: Undecided → High
assignee: nobody → jazzynico (jazzynico)
milestone: none → 0.92
jazzynico (jazzynico) on 2017-01-04
Changed in inkscape:
milestone: none → 0.92.1
assignee: nobody → jazzynico (jazzynico)
importance: Undecided → Medium
status: Confirmed → Triaged
jazzynico (jazzynico) on 2017-01-04
Changed in inkscape-docs:
status: Triaged → In Progress
jazzynico (jazzynico) wrote :

XSL file updated in lp:inkscape-docs rev. 568.
inkscape:version now set to 0.92.

SVG files generation in progress.

Changed in inkscape-docs:
status: In Progress → Fix Released
jazzynico (jazzynico) wrote :

Fixed SVG files available in lp:inkscape/0.92.x rev. 15302.

Changed in inkscape:
status: Triaged → In Progress
su_v (suv-lp) wrote :

Two of the updated tutorial files in lp:inkscape/0.92.x r15302 render no visible content in normal as well as in outline view (the content is there, and can be selected with <TAB>, inspected in XML Editor, and is listed in the Objects dialog):

* Help > Tutorials > Inkscape: Advanced
* Help > Tutorials > Inkscape: Calligraphy

Both files render as expected in Inkscape 0.92 r12599.

su_v (suv-lp) wrote :

It appears that the blank pages are triggered by (regular text) tspan 'y' values like:

  <tspan y="NaN" x="10">Conclusion</tspan>

Deleting all four 'y="NaN"' or restoring the old values prior to r15302 in tutorial-advanced.svg makes the content rendered visibly again (but with a partially messed-up layout).

Oddly, other strange and seemingly invalid attribute values for rect 'y' don't seem to bother Inkscape ('0INVALID' ?) - they do not seem to affect whether or not any content is rendered visibly at all:

 <rect id="d0e694" display="none" height="1e3px" width="288" y="0INVALID" x="10"/>

These occur with rectangles which are linked via <use> into <flowRegion/> elements.

For details, see e.g. the diff here:

jazzynico (jazzynico) wrote :

Weird. The issue affects the English Advanced tutorial, the Dutch Tracing pixelart, and all the Calligraphy. Investigations in progress.
Thanks for your tests!

jazzynico (jazzynico) wrote :

Rebuilding the Advanced from crash just worked. Possibly a temporary Java issue during generation.
Let's see if it also works with the others.

jazzynico (jazzynico) wrote :

Also worked for Pixelart NL, but not for the Calligraphy.

tutorial-advanced.svg and fixed in lp:inkscape/0.92.x rev. 15304.

jazzynico (jazzynico) wrote :

SVG files from the share/example and doc folders are not rescaled to 96 dpi in lp:inkscape/0.92.x rev. 15307 and lp:inkscape rev. 15394.

Changed in inkscape:
status: In Progress → Fix Committed
status: Fix Committed → In Progress
jazzynico (jazzynico) wrote :

Opening calligraphy-f07.svg generates the following warning (repeated about 30 times):

** (inkscape:30309): CRITICAL **: SPObject* SPDocument::getObjectById(const gchar*) const: assertion 'id != NULL' failed

No warning when opening the same file with 0.91, and using 0.91 to generate the calligraphy files with the inkscape-docs automated process works as expected.
So at least we have a workaround. Now I'm going to investigate if the warning can be fixed in the faulty file or if the bug is in Inkscape itself.

su_v (suv-lp) wrote :

Similar warnings are tracked in bug #1653184 (regression in 0.92 and trunk).

jazzynico (jazzynico) wrote :

Ok. It seems the warnings have the same cause as in Bug #1653184 "Critical warnings with symbols and clones".

The only difference with the other tutorials that also have the <use> element is that here the linked object has text content.

Following up the discussion to Bug #1653184.

jazzynico (jazzynico) wrote :

Fixed (built with 0.91) Calligraphy tutorials updated in lp:inkscape/0.92.x rev. 15308 and lp:inkscape rev. 15396 (with all the other tutorials).
At least, we have something clean for 0.92.1.

Still to be done: check other inkscape folders for SVGs to rescale.

Jabiertxof (jabiertxof) wrote :

Great work @jazzynico!

su_v (suv-lp) wrote :

Revisiting my earlier comment, I'm disappointed that the legacy files in the examples folder have been modified, and how. Several of them are now show-cases for bugs shipped with a new major release of the software. Some features they showcased are lost (features Inkscape can read but not write, e.g. gradients with objectBoundingBox as gradientUnits). They cannot reliable be used now for testing future Inkscape's backwards-compatibility with legacy files.

Tutorials are different - they are kept up-to-date and refer to the current state of the application. Thanks a lot for taking care of those!

jazzynico (jazzynico) wrote :

su_v> I'm disappointed that the legacy files in the examples folder have been modified, and how.

I'm not sure I understand correctly. Do you mean that the change broke the old files?

On the "how", they were just rescaled with the rescale dialog. But of course I can rollback and commit the old files with the same change I applied to the tutorials (setting inkscape:version to 0.92).

Apart from the example folder, the rescale dialog also opens for the following files:
 - share/patterns/patterns.svg
 - share/icons/*.svg
 - share/branding/*.svg
 - share/filters/filters.svg
 - share/extensions/test/svg/multilayered-test.svg
 - share/extensions/seamless_pattern.svg
 - share/extensions/jessyInk_video.svg

We can just change the version for everything, since it seems to be the less harmful modification. But maybe there are some cases were we *need* to rescale?

I have no strong opinion, so suggestions are welcome.

su_v (suv-lp) wrote :

@JazzyNico - I can prepare comments with regard to specific files 'share/examples' in current lp:inkscape/0.92.x (probably tomorrow); in the mean-time, could you share the Inkscape prefs file used with "0.92.0 r15304" to do the conversions of those files? I also want to prepare new or update existing reports wherever current user preferences may affect the 'Scale elements' option for DPI change (I assume you used that same option for all the files in 'share/examples' of the 0.92.x repo, without exception?).

jazzynico (jazzynico) wrote :

Preferences attached. Not exactly a default new file...

jazzynico (jazzynico) wrote :

su_v> (I assume you used that same option for all the files in 'share/examples' of the 0.92.x repo, without exception?)

Yes. Rescale everywhere.

su_v (suv-lp) wrote :

@JazzyNico - my current notes to the files are here:

There are a few files exposing issues still in need to be investigated:
- eastern-motive-P4G.svg
- flow-go.svg
- flowsample.svg
- markers.svg
- text-on-path.svg
In other cases, I refer to bugs already known and filed for 'Scale elements'.

I'll update the notes in the gist as needed wrt any new reports filed on the findings.

jazzynico (jazzynico) wrote :

So apparently most examples don't need to be rescaled at all. Proposing to revert the changes from r15308 and modify the inkscape version only so that we can focus on the bugs you reported, and not on the unnecessary changes I introduced.

su_v (suv-lp) wrote :

Notes updated (all but one [1] TODO done):

For now, I hope to have covered all (or relevant) issues I managed to notice with these legacy files when scaling the content. The decision whether to revert the earlier commit in both branches or not is for others to make (I'm aware that too often I tend to get lost in details/minor aspects while failing to see the bigger picture).

[1] The question about absolute units ('pt') used in Inkscape's stock markers when rescaling elements for DPI change

jazzynico (jazzynico) wrote :

Thanks for your very helpful notes!

Affected examples should now be fixed in lp:inkscape/0.92.x rev. 15315 and lp:inkscape rev. 15411.

For the SVG files, I just changed the inkscape:version to 0.92. In two cases (blend_modes.svg and markers.svg) I also changed the SVG height and width attributes manually so that the document fits in the page without having to resize from the application.
For the SVGZ files, I opened them in Inkscape, ignored the rescale dialog, slightly modified the document to allow saving (moved an object and reverted with the arrows), and then saved.
All changes based on the example files from rev. 15306 (0.92.x).

All documents without comments in the notes were left as previously committed.

jazzynico (jazzynico) wrote :

Closing now (all the initially targeted files are fixed).
Follow-up report for the other files:
Bug #1658342 "Some internal Inkscape SVG files open the rescale dialog".

Changed in inkscape:
milestone: 0.92.1 → 0.93
status: In Progress → Fix Committed
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments