embedding SVG fonts in HTML?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

embedding SVG fonts in HTML?

Sarreq Teryx
I've been using minefeild for a few days now, I don't know if either I'm doing
something wrong, or it just doesn't work or what, I've googled all over the
place and found nothing. Can SVG fonts be directly embedded in HTML documents,
if so how, if not, why not? I only ask because it seems like an obvious thing to
be able to do.

_______________________________________________
dev-tech-svg mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-svg
Reply | Threaded
Open this post in threaded view
|

Re: embedding SVG fonts in HTML?

Robert Longson
On Jun 15, 5:22 am, "Sarreq Teryx" <[hidden email]> wrote:
> I've been using minefeild for a few days now, I don't know if either I'm doing
> something wrong, or it just doesn't work or what, I've googled all over the
> place and found nothing. Can SVG fonts be directly embedded in HTML documents,
> if so how, if not, why not? I only ask because it seems like an obvious thing to
> be able to do.

The current mozilla trunk does not support svg fonts. See
http://www.mozilla.org/projects/svg/status.html and bug 119490. When
it does you would be able to put svg text which used svg fonts in
xhtml documents. xhtml text would not be able to use svg fonts
directly and you will not be able to do this with HTML documents at
all as you can't put svg in them.

To embed you would do something like this:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title/>
</head>
<body>
  <svg xmlns="xmlns="http://www.w3.org/2000/svg">
    <font id="Font1" horiz-adv-x="1000">
      <font-face font-family="Super Sans" font-weight="bold" font-
style="normal"
          units-per-em="1000" cap-height="600" x-height="400"
          ascent="700" descent="300"
          alphabetic="0" mathematical="350" ideographic="400"
hanging="500">
        <font-face-src>
          <font-face-name name="Super Sans Bold"/>
        </font-face-src>
      </font-face>
      <missing-glyph><path d="M0,0h200v200h-200z"/></missing-glyph>
      <glyph unicode="!" horiz-adv-x="300"><!-- Outline of exclam. pt.
glyph --></glyph>
      <glyph unicode="@"><!-- Outline of @ glyph --></glyph>
      <!-- more glyphs -->
    </font>
  </defs>
  <text x="100" y="100"
           style="font-family: 'Super Sans', Helvetica, sans-serif;
                  font-weight: bold; font-style: normal">Text
    using embedded font</text>
  </svg>
</body>
</html>

_______________________________________________
dev-tech-svg mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-svg
Reply | Threaded
Open this post in threaded view
|

Re: embedding SVG fonts in HTML?

dc.loco
On Saturday, June 16, 2007 at 1:57:46 PM UTC-4, Robert Longson wrote:

> On Jun 15, 5:22 am, "Sarreq Teryx" <[hidden email]> wrote:
> > I've been using minefeild for a few days now, I don't know if either I'm doing
> > something wrong, or it just doesn't work or what, I've googled all over the
> > place and found nothing. Can SVG fonts be directly embedded in HTML documents,
> > if so how, if not, why not? I only ask because it seems like an obvious thing to
> > be able to do.
>
> The current mozilla trunk does not support svg fonts. See
> http://www.mozilla.org/projects/svg/status.html and bug 119490. When
> it does you would be able to put svg text which used svg fonts in
> xhtml documents. xhtml text would not be able to use svg fonts
> directly and you will not be able to do this with HTML documents at
> all as you can't put svg in them.

I see this is still not implemented. Is there any work-around (aside from changing the text to paths)? Any clever combination of CSS with SVG or some such?
_______________________________________________
dev-tech-svg mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-svg
Reply | Threaded
Open this post in threaded view
|

Re: embedding SVG fonts in HTML?

Jeremie Patonnier
Hi!

Theres is absolutly no plan to support SVG font in Firefox and there is a
large consensus to deprecate SVG fonts as a whole. All browsers which had
implemented some of it have drop their support and SVG2 removed SVG fonts
completly.

If you want to use fonts in SVG, simply use CSS Fonts like you would in an
HTML document.


Le dim. 25 nov. 2018 à 23:20, <[hidden email]> a écrit :

> On Saturday, June 16, 2007 at 1:57:46 PM UTC-4, Robert Longson wrote:
> > On Jun 15, 5:22 am, "Sarreq Teryx" <[hidden email]> wrote:
> > > I've been using minefeild for a few days now, I don't know if either
> I'm doing
> > > something wrong, or it just doesn't work or what, I've googled all
> over the
> > > place and found nothing. Can SVG fonts be directly embedded in HTML
> documents,
> > > if so how, if not, why not? I only ask because it seems like an
> obvious thing to
> > > be able to do.
> >
> > The current mozilla trunk does not support svg fonts. See
> > http://www.mozilla.org/projects/svg/status.html and bug 119490. When
> > it does you would be able to put svg text which used svg fonts in
> > xhtml documents. xhtml text would not be able to use svg fonts
> > directly and you will not be able to do this with HTML documents at
> > all as you can't put svg in them.
>
> I see this is still not implemented. Is there any work-around (aside from
> changing the text to paths)? Any clever combination of CSS with SVG or some
> such?
> _______________________________________________
> dev-tech-svg mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-svg
>


--
Jeremie
.............................
Web : http://jeremie.patonnier.net
Twitter : @JeremiePat <http://twitter.com/JeremiePat>
_______________________________________________
dev-tech-svg mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-svg