W3C home > Mailing lists > Public > www-svg@w3.org > February 2014

SVG fonts discussion

From: Robert O'Callahan <robert@ocallahan.org>
Date: Sun, 2 Feb 2014 01:01:24 +1300
Message-ID: <CAOp6jLZ8NOv7oDG673UhKuJNssBtR14Jdm8XLTvjLLberJ_qFg@mail.gmail.com>
To: Erik Dahlstrom <ed@opera.com>
Cc: "www-svg@w3.org" <www-svg@w3.org>
On Fri, Jan 31, 2014 at 5:13 AM, Erik Dahlstrom <ed@opera.com> wrote:

>    shepazu: I think there could be some value at republishing at
>    W3C
>    ... second question is, since we are killing off SVG fonts, for
>    those browsers who decided to never do SVG fonts, that's good
>    news
>    ... there's a chance we'll see this new SVG glyphs in other
>    browsers since they already do OpenType
>    ... with the shitty internationalization of the old SVG Fonts,
>    it was reasonable for them not to implement it
>    ... what I hated about SVG Fonts was the inverted coordinate
>    system
>    ... is there any possibility for us resurrecting SVG Fonts in a
>    way, by embedding an OpenType font in the document?
>
>    ChrisL: the XML serialization of OT, UFO, is very verbose
>    ... the binary format is very compact, lots of tables with
>    bytes
>    ... by the way, WOFF is a way to wrap up any sfnt font
>
>    Tav: would it be possible to have the table information in the
>    font, but feed in the SVG glyphs to it?
>
>    ChrisL: that would be interesting
>    ... there is a demo of that, but it's kind of hacky
>    ... roc made it. you load in an OpenType font, and gives you a
>    textarea to enter some SVG, wraps it up and sticks it into the
>    table, generates an OpenType font
>

You were referring to https://github.com/rocallahan/svg-opentype-workshop.
Naturally I don't think this solution is hacky :-). OpenType is just a
binary format; it's a little harder for JS to stuff SVG content into than
if it were XML, but it's not different in kind. That code is not complex. I
honestly think this is a solved problem and we won't need any browser API
for manipulating font data.

   Tav: I tried to do this with inkscape, but I ran into trouble
>    since we use Pango for text layout, which doesn't let you
>    insert a user font
>    ... I was going to intercept the layout information from Pango,
>    and just draw the SVG glyph
>
>    ChrisL: I should say, Behdad Esfabod has been at these meetings
>    and is aware of this
>    ... and is interested in adding this to Harfbuzz
>

I don't know what needs to be added to Harfbuzz. Harfbuzz is designed to
handle shaping and leaves glyph rendering to the application, so choosing
to rendering some glyphs via SVG doesn't require changes to Harfbuzz. I
suppose Harfbuzz could add an API to read the SVG glyphs directory but
that's very simple stuff.

   shepazu: maybe not right now, but this is a useful use case to
>    pursue in the future
>
>    Tav: yeah. it's a way of getting your cake and eating it too.
>    ... basically saying OpenType handles all the nasty i18n layout
>    stuff, and we provide a glyph
>

Yes, that separation between shaping and glyph rendering is assumed by
Harfbuzz (and by Cairo before it, and elsewhere).

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w
Received on Saturday, 1 February 2014 12:01:52 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:35 UTC