Re: SVG fonts discussion

Hello Roc,

Saturday, February 1, 2014, 1:01:24 PM, you wrote:

> On Fri, Jan 31, 2014 at 5:13 AM, Erik Dahlstrom <ed@opera.com>wrote:

>     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.

Yes.

> Naturally I
> don't think this solution is hacky :-).

As often happens, what gets minuted is a summary of what was said.

The general point I was making was that there are a variety of (closed
source) tools on various platforms for making SVG in OT or Microsoft
COLR or Google coloured fonts. In terms of open source there is
little, yours being the only one I am aware of.

Its also the only in-browser manipulation of the SVG in OT format; the
ease of manipulating the old SVG Fonts format in-browser is giving
some people with a fondness for nostalgia and a lack of interest in
I18n some grief.

Having to stuff the binary data into a base64-encoded data url is
hacky. Not your fault, but it is.


>  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 

Behdad mentioned specifically that the assumption is the rendering is
static. There is currently no facility to indicate a glyph rendering
is animated, and to tell an application when the glyph updates or to
give it a callback or other hook.

Maybe he was referring to Pango?


> 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).

Agreed.



-- 
Best regards,
 Chris                            mailto:chris@w3.org

Received on Monday, 10 February 2014 11:40:18 UTC