W3C home > Mailing lists > Public > www-svg@w3.org > December 2012

SVG <glyph> element spec

From: Stephen Chenney <schenney@chromium.org>
Date: Wed, 19 Dec 2012 09:59:41 -0500
Message-ID: <CAObCcUoqNeuZjkiDy79SDCuNCV40wiu4wfO_OGtcnwzJPkc_qw@mail.gmail.com>
To: "www-svg@w3.org" <www-svg@w3.org>
It seems that no browser supports arbitrary geometry inside a <glyph>
element. Only path data in the "d" attribute of the glyph is supported, and
then only on Opera and WebKit (as far as I can tell). There are no W3C
tests for non-path glyphs that I could find.

I propose we drop the container aspect of glyph and insist on path data
only. The complexity of implementing arbitrary geometry inside <glyph>
makes it unlikely to be supported.

I also discovered that it is essential that a horiz-adv-x and related sizes
be given for the font, otherwise the width is undefined. I think the
spec should be explicit about this somewhere in the <glyph> discussion.
Maybe we could also define it such that the advances, if undefined, come
from the bounding box of the path.

Example below.


<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xlink="
  <svg xmlns="http://www.w3.org/2000/svg" x="100" y="100" width="400"
        <font-face font-family="xyzzy" units-per-em="8" />
        <glyph unicode="1" id="rect1" horiz-adv-x="12" d="M0,0 l10,0 l0,10
l-10,0 z" />
        <glyph unicode="2" id="rect2" horiz-adv-x="12">
          <rect width="10" height="10" x="0" y="0" />
    <text x="25" y="25" font-family="xyzzy" stroke-width="1">
      12<altGlyph xlink:href="#rect1">A</altGlyph><altGlyph
Received on Wednesday, 19 December 2012 15:00:12 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:30 UTC