Re: Alternatives to altGlyph for non-SVG fonts

On 28/09/14 01:17, Tab Atkins Jr. wrote:
> On Thu, Sep 25, 2014 at 10:15 AM, John Hewson <john@jahewson.com> wrote:
>> I noticed that altGlyph is to be removed from SVG2 along with SVG Fonts:
>>
>> http://lists.w3.org/Archives/Public/www-svg/2014Jun/0086.html
>>
>> But this will remove the ability for SVG to access arbitrary glyphs in
>> fonts,
>> which is often seen in formats such as PDF and of course, existing SVG 1.1
>> documents which make use of SVG Fonts. Currently there’s no way to
>> port such documents to SVG2.
>>
>> Would it be possible to either keep altGlyph and define a format for
>> glyphRef
>> to access TTF/OTF glyphs, for example GID 4 could be accessed using:
>>
>> <altGlyph glyphRef="gid(4)”>x<altGlyph>
>>
>> Better yet, could a minimal replacement for altGlyph be introduced, for
>> use only with TTF/OTF web fonts?

Yes we do want to have a feature that covers the same use cases as 
<altGlyph> for selecting individual glyphs from a font by ID. 
<altGlyph> never had a well defined format for specifying glyph IDs and 
as a consequence was never implemented (except in some UAs as a means of 
referencing individual glyphs in SVG Fonts).

> CSS has sprouted a number of controls for accessing alternate glyphs
> in fonts: <http://dev.w3.org/csswg/css-fonts/#font-rend-props>
>
> Are these sufficient for your needs?  If not, CSS's model probably has
> to become stronger.

I don't know that CSS is the right level to support this.  Still, I 
could see a couple of places where you could make this work:

   tspan.symbols { content: glyph(123) glyph(456); }

Or perhaps a way to augment the cmap that comes from the font, so that 
you can then reference the glyphs by Unicode character.  Something like:

   @font-face {
     font-family: My Font;
     src: url(...);
     glyphs: U+E000-E007 1234, U+E008 2345;
   }

which would map glyphs 1234-1241 to Unicode characters U+E000 to U+E007 
and glyph 2345 to character U+E008.

Still, it feels more like something that should be in the content of the 
document.

Received on Sunday, 28 September 2014 01:08:35 UTC