Bug 34236 - When using SVG fonts with @font-face word-spacing and text-align: justify are not being honored
Summary: When using SVG fonts with @font-face word-spacing and text-align: justify are...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 59085
Blocks:
  Show dependency treegraph
 
Reported: 2010-01-27 17:43 PST by michael lewis
Modified: 2011-06-20 01:29 PDT (History)
4 users (show)

See Also:


Attachments
html for test file (you need the SVG too) (1.28 KB, text/html)
2010-01-27 17:43 PST, michael lewis
no flags Details
SVG to go along with html (32.10 KB, image/svg+xml)
2010-01-27 17:43 PST, michael lewis
no flags Details
test case downloads font from Bugzilla (1.30 KB, text/html)
2010-05-03 11:29 PDT, Adam Roben (:aroben)
no flags Details
test case that downloads font from Bugzilla (1.32 KB, text/html)
2010-05-03 11:30 PDT, Adam Roben (:aroben)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description michael lewis 2010-01-27 17:43:30 PST
Created attachment 47582 [details]
html for test file (you need the SVG too)

When using @font-face with the src being of svg format, in Safari on OS X and iPhone, and chrome word-spacing is not being honored.  There's also a strange behaviour, when you insert a span, it does advance the text to the position where it *should* be if the word-spacing were being honored, even when the span breaks up a word (without any spaces).

I've attached a test file which demonstrates both these behaviors with an SVG font file.
Comment 1 michael lewis 2010-01-27 17:43:57 PST
Created attachment 47583 [details]
SVG to go along with html
Comment 2 michael lewis 2010-04-29 21:27:28 PDT
Did I file this in the wrong place?
Comment 3 Adam Roben (:aroben) 2010-04-30 12:57:03 PDT
(In reply to comment #2)
> Did I file this in the wrong place?

No, this is the right place.
Comment 4 Adam Roben (:aroben) 2010-05-03 11:29:09 PDT
Created attachment 54945 [details]
test case downloads font from Bugzilla
Comment 5 Adam Roben (:aroben) 2010-05-03 11:30:21 PDT
Created attachment 54946 [details]
test case that downloads font from Bugzilla
Comment 6 Adam Roben (:aroben) 2010-05-03 11:31:34 PDT
Niko, any idea what's going on here?
Comment 7 Nikolas Zimmermann 2010-05-06 06:56:27 PDT
Sorry for the late reply. I guess the problem happens when using SVGFonts in HTML.
When drawing an SVG font inside SVG, we're explicitely disabling any spacing handling, as the SVG Text layouting code handles this on it's own. I suspect that we're also disabling that logic when using SVG Fonts in HTML, which is wrong.

Going to check this during the next days, hopefully!
Comment 8 Nikolas Zimmermann 2010-07-09 07:20:30 PDT
Changed component to SVG, so it shows up in my all-svg-bugs search.
Comment 9 mitz 2010-07-09 10:43:31 PDT
See also bug 32227.
Comment 10 Nikolas Zimmermann 2011-06-20 01:29:12 PDT
Fixed in r89233.