W3C home > Mailing lists > Public > www-style@w3.org > June 2011

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

From: Jeremie Patonnier <jeremie.patonnier@gmail.com>
Date: Wed, 29 Jun 2011 23:27:08 +0200
Message-ID: <BANLkTi=0_hR=9+qaEZKgM_WM6c7ZHmofcg@mail.gmail.com>
To: robert@ocallahan.org
Cc: Erik Dahlstrom <ed@opera.com>, Tab Atkins <tabatkins@google.com>, list.adam@twardoch.com, "www-font@w3.org" <www-font@w3.org>, www-svg@w3.org, "www-style@w3.org" <www-style@w3.org>, "public-webfonts-wg@w3.org" <public-webfonts-wg@w3.org>, OpenType List <opentype-migration-list@indx.co.uk>
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

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

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

My 2ct (definitely not more in such a complex matter ;)
Web : http://jeremie.patonnier.net
Twitter : @JeremiePat <http://twitter.com/JeremiePat>
Received on Wednesday, 29 June 2011 21:28:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:50:02 UTC