W3C home > Mailing lists > Public > www-font@w3.org > April to June 2011

Re: SVG Fonts inside of OpenType fonts? [Cross-post from www-font@w3.org]

From: Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>
Date: Wed, 29 Jun 2011 17:08:24 +0200
To: www-font@w3.org, tal@typesupply.com
Message-Id: <201106291708.24378.Dr.O.Hoffmann@gmx.de>
Tal Leming:

>This is something that I've been wondering about. An example: I make a SFNT 
>wrapped SVG font that has three layers in each glyph: shadow, fill and 
>highlight. A web author decides to use this font in HTML but doesn't like 
>the colors that I've defined in the font. As I understand it, the web author 
>would not be able to modify the colors defined in the glyph layers via CSS 
>or any other means (apart from modifying the SVG in the SFNT). Is that 
>correct?

It is at least difficult, depending how the author provides the colour 
information.
The author of the font can for example use a paint-server as attribute value
for fill or stroke (in SVG 1.1 typically a pattern or gradient). If the other 
author wanting to use this has access to the paint-sever definition, it is 
possible to change this.
If the author of the font provides simply a colour value for the presentation
attributes fill or stroke, one has to go along the complete CSS cascade 
down to the related gylph (or whereever the author noted the presentation 
attribute) to overwrite this - but this applies to other applications of 
styling as well - these are the general CSS rules, nothing specific for SVG.
If the author notes this, this complication is intentionally. 
If the author notes a fill or stroke property within a style attribute
of a glyph, it becomes obviously even more difficult to overwrite this.
Again one can assume, that this is the intention of the author, else
there would be no style attribute at all.

If the SVG font is embedded somehow in another format without any
capabilities to apply CSS, it is of course a further limitation on the
option to change properties. Typically one should use only XML formats
to embed SVG fonts to avoid such complications, that something is
not accessible anymore due to cryptic format limitations.

By the way:
Are you sure, an SVG font  with fill, stroke, gradients, animation etc
has any use for text output for HTML?
Maybe only for artistic headings or something like this, but not
for normal text ;o)


Olaf
Received on Wednesday, 29 June 2011 15:11:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 29 June 2011 15:11:13 GMT