Re: SVG fonts embeddable in XHTML-documents?

On Monday, 11 March, 2002, 21:33:16, Jochen wrote:

JS> Hi list,

JS> I'm currently discussing in a mozilla news group whether it was possible [in
JS> the meaning of SVG fonts], to use a SVG font as a @font-face-src outside a
JS> svg-document.


JS> there is an example using an external svg font definition IN an svg
JS>  <style type="text/css">
JS>       <![CDATA[
JS>         @font-face {
JS>           font-family: 'Super Sans';
JS>           font-weight: normal;
JS>           font-style: italic;
JS>           src: url("myfont.svg#Font2") format(svg)
JS>         }
JS>       ]]>

JS> but it is not defined if it can be recommended using it e.g. in a HTML-file

There is nothing specific to SVG in there, and HTML does not require
anything specific either. This is all generic CSS2.

JS> (supposing the browser supports svg fonts, i know of none - does amaya?)

No, Amaya doesn't - the SVG support in Amaya is fairly new, and far
from complete. But yes, if a peiece of code a) supports SVG fonts b)
supports CSS2 then it can indeed read stylesheets and apply fonts in
SVG format to whatever it is rendering - XHTML, XUL, whatever just
like you can apply any other font format.

CSS2 gives a mechanism to refer to fonts, but does not mandate the
support of any particular format. This, clearly, gives
interoperability problems. For SVG processors, since they have to be
able to render Bezier shapes anyway, the SVG spec makes support of SVG
fonts mandatory for SVG processors,and support of any other format

The corollary, as you point out, is that SVG fonts can be used with non
SVG content.

JS> the actual question: are svg fonts as defined in
JS> chapter 20 completely confirmant with
JS> css @font-face src attributes as defined in
JS> chapter 15, in every means,

Yes. They use the exact same mechanism.

JS> say:
JS> can one [theoretically] use SVG fonts in HTML documents?

Yes, such usage would be entirely conformant to the CSS2 and SVG 1.0
specifications. As you say, it is only a question of whether the
implementor chooses to add such support.


Received on Monday, 11 March 2002 16:40:36 UTC