Re: altglyph

Paul Topping wrote:

> I was unable to find any mention of "altglyph" in any of the CSS docs. Could
> you point me at some documentation on it?

http://www.w3.org/TR/SVG/text.html#LigaturesAndAlternateGlyphs

To allow for control over the glyphs used to render particular
character data, the 'altglyph' property is available. 

'altglyph' 
      Value:   
                   unicode(<value>) | 
                   glyphname(<string>) | 
                   glyphid(<value>) | 
                   ROS(<value>) cid(<value>) | 
                   inherit 
      Initial:   
                   none 
      Applies to:  
                   <text> elements 
      Inherited:  
                   yes 
      Percentages:  
                   N/A 
      Media:  
                   visual 

[ CL: incidentally the value "none" is not listed as a possible value
for this property, yet it is the initial value. ]

unicode(<value>)) 
     where <value> indicates a string of Unicode characters that
     should replace the text within the <text> element 
glyphname(<string>)) 
     where <string> provides a string of which is the name of
     the glyph that should be used to replace the text within the
     <text> element 
glyphid(<value>)) 
     where <value> a string of which is numeric ID/index of the
     glyph that should be used to replace the text within the
     <text> or <t> element 
ROS and cid 
     are required for Web fonts in OpenType/CFF format and
     operate similar to glyphid 

> I think "altglyph" has applicability to math rendering as well. If we render
> MathML by converting it into CSS (possibly with new math-related CSS
> elements) and HTML, we will rely on plain text for rendering individual math
> characters. 

Yes, it might prove useful for that.

> I know this isn't your responsibility, but do you know if any of the SVG
> prototype renderers deal with "altglyph" right now?

I tried with these test files, and none of the implementations I had
handy did anything visible with altglyph:

<?xml version="1.0" standalone="yes"?>
<svg width="4in" height="3in"
     xmlns = 'http://www.w3.org/Graphics/SVG/SVG-19990812.dtd'>
 <desc>Test without altglyph</desc>
 <g>
  <text style="font-family: 'Arial'; font-size: 90; 
   color: green" 
   x="20" y="100" id="foo">Hello</text>
 </g>
</svg>

<?xml version="1.0" standalone="yes"?>
<svg width="4in" height="3in"
     xmlns = 'http://www.w3.org/Graphics/SVG/SVG-19990812.dtd'>
 <desc>Test of altglyph </desc>
 <g>
    <text style="font-family: 'Arial'; font-size: 90; 
     color: red; altglyph: unicode ('World')" 
     x="20" y="100" id="foo">Hello</text>
 </g>
</svg>

I should also have tried looking in their DOM to see if the property had
been parsed and showed up, but I did not.

> > >- The description under the "Unicode" value leads one to
> > believe that it
> > >describes a string of characters, whereas that of the
> > "gyphid" value sounds
> > >like it describes a single character.

I agree that these are different, and in my example above I used a
string of characters.

--
Chris

Received on Thursday, 23 September 1999 15:31:27 UTC