W3C home > Mailing lists > Public > www-svg@w3.org > July 2011

RE: So long as we're tidying up text

From: David Dailey <ddailey@zoominternet.net>
Date: Wed, 13 Jul 2011 15:12:06 -0400
To: "'David Dailey'" <ddailey@zoominternet.net>, "'www-svg'" <www-svg@w3.org>
Message-ID: <002101cc4190$c1a25880$44e70980$@net>
Another set of experiments here:




Results in five browsers here (from upper left clockwise: IE9 , Chrome,
Safari, Opera, FF):




Key questions that seem to arise involve the attribute writing-mode="tb-rl" 


What happens when text is also rotated, or when it also follows a textPath?


1.       Does a gradient fill or stroke also rotate?

2.       Does the underline also rotate?

3.       Does any stretching as imposed through
font-stretch="ultra-expanded"  textLength="90"
lengthAdjust="spacingAndGlyphs" apply horizontally or vertically?

4.       Does a gradient stretch throughout the text or is it applied on a
character-by-character basis?





From: www-svg-request@w3.org [mailto:www-svg-request@w3.org] On Behalf Of
David Dailey
Sent: Tuesday, July 12, 2011 9:54 PM
To: 'www-svg'
Subject: So long as we're tidying up text


Take a look at this screen shot of five modern browsers rendering a
relatively simple SVG file with one text tag having various text effects




I must surely get some sort of prize for maximizing the ratio of
Sum(BrowserDiscrepancies) / SVGFileSize . The browsers depicted are
(clockwise from upper left): 

Opera, Firefox, Chrome, IE9, and Safari.


The raw file (barebones version ) is at

(Though the one depicted in the screen shots is actually
http://srufaculty.sru.edu/david.dailey/svg/text/textplay.svg . )


I think much of what we're seeing here stems from lack of specification
rather than bugs, though bugs appear to be ample as well.


The operative text tag reads as follows:


<text id="T" fill="none" stroke-width="4" stroke="url(#g)"

font-family="serif" font-stretch="ultra-expanded" stroke-dasharray="10 5"
rotate="-25 -20 -15 -10 -5 0 5 10 15 20"

textLength="90" lengthAdjust="spacingAndGlyphs" font-style="oblique"

font-size="50" x="5" y="65%"  font-weight="bold">       




1.       Firefox doesn't yet handle overline or textLength="90"
lengthAdjust="spacingAndGlyphs" . I am pretty confident that these are known
bugs and not surprises. textLength, though is rather important since it
seems to be the only way (short of converting text to paths) of making sure
that text will occupy roughly the same footprint on different sized devices.

2.       The browsers don't seem to agree on what units to use (pixels or
viewport) for dash array when applied to text.

3.       The browsers don't seem to agree on whether overline and glyphs use
the same dash-array units or not.

4.       The extent of the spread of the gradient through the text seems in
some cases to be based on total cumulative path length of the glyphs rather
than on each glyphs own horizontal size. Note the difference in gradient
spread across the four browsers where we can see the completion. IE hits the
final stop at about .8, while Opera does the expected thing at about .9;
Chrome hits it at about .1 and Safari only reaches the final stop color in
its overline. Only Opera seems to keep the gradients of the overline and the
text in sync.

5.       Commencement values of the dash-array seem to be differently
calculated for different glyphs than for others in some browsers.

6.       The overline is discontiguous in most browsers.

7.       Rotations of the overline follow rotations of the glyphs in most
browsers. Opera does it as I would expect.

8.       The baseline of the phrase seems to droop from left to right in
some browsers. It appears to be nonlinear in others. The simpler file (with
the guidelines at the bottom make this clearer).

9.       Some browsers allow the rotated glyphs to begin outside the drawing
area, others interpret textLength and spacingandGlyphs obviously

Hope this adds more clarity than confusion, as that is the goal.





Received on Wednesday, 13 July 2011 19:12:48 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:25 UTC