Closed Bug 371787 Opened 13 years ago Closed 6 months ago
Support the 'letter-spacing' and 'word-spacing' properties in SVG
47 bytes, text/x-phabricator-request
|Details | Review|
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a3pre) Gecko/20070226 Minefield/3.0a3pre Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a3pre) Gecko/20070226 Minefield/3.0a3pre the word-spacing attribute doesn't seem to be implemented, see screenshot with rendering comparison Minefield/Opera: http://www.carto.net/neumann/mozillasvgbugs/word-spacing_minefield_opera.png The upper window shows the rendering in Minefield ignoring the word-spacing attribute, the lower window shows the correct rendering in Opera 9.1. Reproducible: Always Steps to Reproduce: 1. 2. 3.
letter-spacing has the same problem - attribute not implemented. FF3beta5, Windows XP SP2
example for word-spacing in SVG http://srufaculty.sru.edu/david.dailey/svg/newstuff/text6.svg
Example for letter-spacing in SVG: http://johan.github.com/kilobyte-svg-challenge/logos/lysator.svg Webkit reference rendition: http://i.imgur.com/nQhv0.png
Firefox 19 broken rendition: http://i.imgur.com/reRJm.png (alpha channel bugs are mine; ignore the white bg)
Cameron, what are your thoughts now that bug 839955 is fixed?
It's not trivial to get working. IIRC nsTextFrame uses a PropertyProvider object to get the spacing property values, and it wasn't obvious where to get one of those (with the right values) from within nsSVGTextFrame2. longsonr recently tried to get this working -- how far did you get Robert?
This is as far as I got. Asserts occur and the DOM mostly doesn't work. Rendering seems fairly reasonable though.
Just ran into this issue. Is there still any work being done?
Not by me currently so if you want to continue from where I left off, feel free.
AFAIK Gecko is the only engine that does not support these attributes.
Hi all, We would really like to use XUL and Gecko engine for rendering SVG graphics and this issue is halting the whole idea. How likely is it to be resolved in the next few months? Greetings, Dejan
See comment 10 i.e. How likely are you to submit a patch to implement or pay someone to do so on your behalf, Dejan?
(In reply to Robert Longson from comment #14) > See comment 10 i.e. How likely are you to submit a patch to implement or pay > someone to do so on your behalf, Dejan? Very unlikely.
who can do it? - I would like to spend some money to solve this issue. Maybe we can share the costs??
(In reply to Tom from comment #16) > who can do it? - I would like to spend some money to solve this issue. Maybe > we can share the costs?? Feel free to publish on https://www.bountysource.com/teams/mozilla/
The following SVG uses the letter spacing attribute: http://johan.github.io/kilobyte-svg-challenge/logos/lysator.svg As of Mar 2, 2017 this works properly in Safari, Chrome, Edge, and Internet Explorer 11. Firefox still appears to ignore the letter-spacing SVG attribute.
according to current job assignment, I will not have time to work on this feature in within six months. deassign.
Assignee: cku → nobody
Mass bug change to replace various 'parity' whiteboard flags with the new canonical keywords. (See bug 1443764 comment 13.)
This lack of support of this properties are annoying like in old days IE6. I can understood it if there are no string engine support for creating spacing between glyphs, but it exist! Property "dx" prove that there are all necessary mechanisms to support it. "dx" can be used to simulate 'letter-spacing' an probably 'word-spacing'. For 'letter-spacing: N;' it can be simulated by: 'dx: 0 N N N ... N;' where number of N is length of string in <text> minus one. In case of 'word-spacing' this is more complicated but doable.
Assignee: nobody → cam
Status: NEW → ASSIGNED
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/ed9b896fd383 Add support for letter-spacing and word-spacing in SVG text. r=jfkthame,longsonr
Attachment #8334130 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.