Re: SVG Fonts inside of OpenType fonts? [Cross-post from www-font@w3.org]

2011/6/29 Robert O'Callahan <robert@ocallahan.org>

> We should focus on things Web authors want to do.
>
>
Well, as one of them I agree with that assumption. However by simply
providing as generic tools as possible you'll achieve much more. Web authors
can be very resourceful to twist the technologies to reach what they have in
mind >:-) the CSS3 box-shadow property is a very good example, Web authors
use it to build much more complex things than simple drop shadows.

With fonts, having generic tools to access the core of individual glyph open
a wide range of unpredictable creative usages.

I know it's amazingly naive, but if Web authors could do something like the
following, it opens doors to incredibly creative things :

var myFont = document.getFont("My Font Name"); // Need to see if it's doable
to work with the CSS font-family name, not sure it's that easy due to CSS
font variant.
var length = myFont.character(\uXXXX).glyphs.length // Number of alternative
Glyphs available for a single character

for(i=0; i < length; i++){
    // Getting a single glyph
    var glyph = myFont.character(\uXXXX).glyphs[i]; // returning an
SVGElement

    // Do stuff on the glyph which is an SVG DOM tree <- imagination belong
here

    // Setting back the glyph on track
    myFont.character(\uXXXX).setGlyph(i, glyph);
}

My 2ct (definitely not more in such a complex matter ;)
-- 
Jeremie
.............................
Web : http://jeremie.patonnier.net
Twitter : @JeremiePat <http://twitter.com/JeremiePat>

Received on Wednesday, 29 June 2011 21:28:19 UTC