Re: ligature formation across text chunks

Cameron McCormack:
> Assuming we’re not using the implementation’s text shaping engine, you
> would want to output (assuming we’re using SVG fonts):
> 
>   <font>
>     <glyph id="g1" d="..."/>
>     <glyph id="g2" d="..."/>
>     <glyph id="g3" d="..."/>
>     <glyph id="g4" d="..."/>
>   </font>
>   <altGlyphDef id="a">
>     <glyphRef xlink:href="g1"/>
>     <glyphRef xlink:href="g2"/>
>     <glyphRef xlink:href="g3"/>
>     <glyphRef xlink:href="g4"/>
>   </altGlyphDef>
>   <text glyph-x="10 20 30 40"><altGlyph
>     xlink:href="#a">zzzzzzzzzzzz</altGlyph></text>
> 
> is that right?  The glyph-x="" gives the position of each glyph (or we
> could keep using x="").  We still don’t have the mapping of character
> indexes to glyph indexes, which would be necessary for text selection to
> work properly.  The glyphs would be positioned correctly, though,
> because we just ensure that the <glyphRef>s are in the order glyph-x
> expects.

And here is where I realise that x="" and the current lack of character-
to-glyph map cannot work even for rendering.  If we have glyph-x="",
then we don’t need the character-to-glyph-map for rendering, since we
can rely on the order in the <altGlyphDef>.  If we have the character-
to-glyph map then we could keep using x="" with its dummy values in
between the four important values.

-- 
Cameron McCormack ≝ http://mcc.id.au/

Received on Wednesday, 18 May 2011 00:06:08 UTC