W3C home > Mailing lists > Public > www-svg@w3.org > September 1999

Re: altglyph

From: Chris Lilley <chris@w3.org>
Date: Thu, 23 Sep 1999 21:31:03 +0200
Message-ID: <37EA7FF7.3B183149@w3.org>
To: Paul Topping <PaulT@mathtype.com>
CC: "'Jon Ferraiolo'" <jferraio@Adobe.COM>, "'www-svg@w3.org'" <www-svg@w3.org>, "w3c-math-wg@w3. org (E-mail)" <w3c-math-wg@w3.org>


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 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:17 GMT