textLength and textAdjust

Hi,

 

Edge, IE, Opera, Chrome and Firefox all seem to support textLength and
textAdjust which is a good thing since it allows one to draw text, almost
Logo-like allowing text to remain text (searchable, selectable, accessible
and all) while still retaining a designer's desire to have text fit into a
display in a predictable way (example, [ 1]). At [2], Taylor Hunt has this
to say about textLength and textAdjust:

 

"Sadly, both are just attributes, and cannot be used in CSS. It would be
super nice to write text { length-adjust: spacingAndGlyphs; }, but instead
you have to specify it on each <text> element you want it on."

 

I concur with this sentiment, and while I would posit that all (with the
possible exception of a thoroughly bounded number) animatable attributes
from SVG have a place in the grand pantheon of the world's future animation,
this is one of those "presentational" things that CSS seems especially
well-suited for.

 

Further, Mr. Hunt goes on to say that these are applicable only to <text>
and not to <tspan>, I get the sense from the SVG1.1 spec that both are meant
to be applicable to <tspan>, however the example [3] seems to render
inconsistently everywhere, with only Chrome doing it as I might like. 

 

Cheers,

David

 

[1] http://srufaculty.sru.edu/david.dailey/svg/text/belize.svg 

[2]
https://codepen.io/tigt/post/more-robust-svg-text-with-lengthadjust-and-font
-size-adjust 

[3] http://cs.sru.edu/~ddailey/ello/waterfallMask.svg 

Received on Sunday, 28 August 2016 14:07:01 UTC