Page MenuHomePhabricator

Parameterized SVGs
Closed, ResolvedPublic

Description

This is a proposed feature I've discussed with some contributors on Common. Check out this category:

http://commons.wikimedia.org/wiki/Category:Texas_Highways

All the images are nearly identical except for the number printed on them. If converted to SVGs,
the only difference from one image to another would be the content of a single text tag (assuming
the appropriate font is embedded if necessary). There are other images where only a single colour
would change, or the position of a small red dot, or some other very minor element. These could all
be supported by a scheme which allows users to supply parameters to SVGs using much the same syntax
they use to supply them to templates. Symbols in the SVG file would be macro-expanded just prior to
rendering. The cached version used would have to depend on the specific parameters.

Here are some more examples where this feature would be very useful:

http://commons.wikimedia.org/wiki/Category:Autobahn_numbers
http://commons.wikimedia.org/wiki/Category:Bundesstra%C3%9Fen_numbers
http://commons.wikimedia.org/wiki/Category:Maps_of_Ugandan_districts

Discussion here:

http://commons.wikimedia.org/wiki/Commons:Village_pump#SVGs_with_arguments

If you don't have time to do this, please at least advise roughly what might be involved. Thanks.


Version: 1.5.x
Severity: enhancement
OS: Linux
Platform: PC

Details

Reference
bz4702

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:03 PM
bzimport set Reference to bz4702.
bzimport added a subscriber: Unknown Object (MLST).

ayg wrote:

Not strictly a duplicate, but I'm merging this with general SVG editing anyway
on Rob's orders.

*** This bug has been marked as a duplicate of 5899 ***