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

Re: proposal for text layout with positioned glyphs, anchoring and bidirectionality

From: Cameron McCormack <cam@mcc.id.au>
Date: Wed, 1 Jun 2011 10:55:02 +1200
To: David Dailey <ddailey@zoominternet.net>
Cc: www-svg@w3.org
Message-ID: <20110531225502.GC31214@wok.mcc.id.au>
David Dailey:
> I'm not quite sure if what we're talking about here is for an enhanced
> 1.1 or for 2.0?

Either, really, depending on whether it makes sense to have a Third
Edition of SVG 1.1 or not.  The proposal is a reworking of regular text
layout in SVG to make it a little more sensible and implementable.  It
doesn’t add any new features.

> If we're talking about 2.0, then I would like to submit these for
> consideration in addition to what this document [1] seems to be
> discussing
>
> 1. clarification of getExtentofText so that browser behavior
> (currently inconsistent) allows for alignment of tops of glyphs along
> a common baseline. See [2] for details.

getExtentOfChar is defined to return the glyph cell rectangle, not the
extent of the glyph ink.  It sounds like you might want the latter?
(The WG has previously discussed having a mode for getBBox that does
look at ink rather than glyph cell rectangles for <text>.)

> 2. A discussed here [3] & [4] , it would be nice to be able to flow
> glyphs in a way that squeezes their shapes to conform to both a top
> curve and a bottom curve. Such textual effects are surprisingly
> common in advertising, logos, shop signs, music album covers and the
> like, once one starts looking for them. Think of the WordArt effects
> in Microsoft Word only considerably more flexible, scriptable, and
> animatable. Squishing glyphs into convex polygons (such as in the
> logos for "NFL", "HTML5" and "Bankers Box") requires non-affine
> transforms, but those are already a part of 2.0 so should not too
> major a headache.

I like and want to have support for this effect, but it isn’t trivial.
(You could do it with a displacement map, but transforming the vectors
would be preferable.)  I’d like to see someone prototype it in
JavaScript, but this would require access to the glyph shapes – we
should expose this, too.

> There is another advantage here and that is it may set the stage for
> many typographical devices used in cartography in which not just text
> but glyphs conform to bounding regions.

Do you have an example of this?

-- 
Cameron McCormack ≝ http://mcc.id.au/
Received on Tuesday, 31 May 2011 22:55:29 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:48 GMT