<glyph>

Veraltet: Diese Funktion wird nicht mehr empfohlen. Obwohl einige Browser sie möglicherweise noch unterstützen, könnte sie bereits aus den relevanten Webstandards entfernt worden sein, in Kürze entfernt werden oder nur noch aus Kompatibilitätsgründen bestehen. Vermeiden Sie die Verwendung und aktualisieren Sie vorhandenen Code, falls möglich; siehe die Kompatibilitätstabelle am Ende dieser Seite, um Ihre Entscheidung zu unterstützen. Beachten Sie, dass diese Funktion jederzeit aufhören könnte zu funktionieren.

Das <glyph> SVG-Element definiert ein einzelnes Glyph in einer SVG-Schriftart.

Verwendungskontext

KategorienElement mit Textinhalt
Erlaubter InhaltBeliebige Anzahl folgender Elemente, in beliebiger Reihenfolge:
Animationselemente
Beschreibende Elemente
Formelemente
Strukturelemente
Gradient-Elemente
<a>, <clipPath>, <cursor>, <filter>, <font>, <font-face>, <foreignObject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view>

Attribute

DOM-Schnittstelle

Dieses Element implementiert die SVGGlyphElement-Schnittstelle.

Beispiel

SVG

html
<svg
  width="400px"
  height="300px"
  version="1.1"
  xmlns="http://www.w3.org/2000/svg">
  <!-- Example copied from https://www.w3.org/TR/SVG/fonts.html#GlyphElement -->
  <defs>
    <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="80" d="M0,0h200v200h-200z"></glyph>
      <glyph unicode="@" d="M0,50l100,300l400,100z"></glyph>
    </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>

Ergebnis

Spezifikationen

Specification
Scalable Vector Graphics (SVG) 1.1 (Second Edition)
# GlyphElement

Browser-Kompatibilität

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
glyph
Deprecated
arabic-form
Deprecated
d
Deprecated
glyph-name
Deprecated
horiz-adv-x
Deprecated
lang
Deprecated
orientation
Deprecated
unicode
Deprecated
vert-adv-y
Deprecated
vert-origin-x
Deprecated
vert-origin-y
Deprecated

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Deprecated. Not for use in new websites.

Siehe auch