W3cubDocs

/SVG

<altGlyph>

Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

The <altGlyph> SVG element allows sophisticated selection of the glyphs used to render its child character data.

Usage context

Categories Text content element, Text content child element
Permitted content Any elements or character data

Attributes

x Deprecated

This attribute defines the corresponding absolute x-coordinates for rendering the element. Value type: <list-of-coordinates> ; Default value: Absolute x-coordinate of ancestor <text> or <tspan>; Animatable: yes

y Deprecated

This attribute defines the corresponding absolute y-coordinates for rendering the element. Value type: <list-of-coordinates> ; Default value: Absolute y-coordinate of ancestor <text> or <tspan>; Animatable: yes

dx Deprecated

This attribute indicates a shift along the x-axis on the position of the element. Value type: <list-of-coordinates> ; Default value: Relative x-coordinate of ancestor <text> or <tspan>; Animatable: yes

dy Deprecated

This attribute indicates a shift along the x-axis on the position of the element. Value type: <list-of-coordinates> ; Default value: Relative y-coordinate of ancestor <text> or <tspan>; Animatable: yes

rotate Deprecated

This attribute defines the supplemental rotation that will be applied to the element. Value type: <list-of-numbers> ; Default value: none; Animatable: yes (non-additive)

glyphRef Deprecated

The glyph identifier, the format of which is dependent on the format defined by the format attribute of the given font. Value type: <string> ; Default value: none; Animatable: no

format Deprecated

The format of the given font. Value type: <string> ; Default value: none; Animatable: no

xlink:href

An <iri> reference either to a <glyph> element in an SVG document or to an <altGlyphDef> element.

If the reference is to a <glyph> element and that glyph is available, then that glyph is rendered instead of the character(s) that are inside of the <altGlyph> element.

If the reference is to an <altGlyphDef> element, then if an appropriate set of alternate glyphs is located from processing the <altGlyphDef> element, then those alternate glyphs are rendered instead of the character(s) that are inside of the <altGlyph> element. Value type: <iri> ; Default value: none; Animatable: no

Global attributes

DOM Interface

This element implements the SVGAltGlyphElement interface.

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
altGlyph 1–40 ≤18 4–49 No 15–27 4 4 18–40 4–49 14–27 4 1.0–4.0
dx No No No No No No No No No No No No
dy No No No No No No No No No No No No
format No No No No No No No No No No No No
glyphRef No No No No No No No No No No No No
rotate No No No No No No No No No No No No
x No No No No No No No No No No No No
xlink_href No No No No No No No No No No No No
y No No No No No No No No No No No No

See also

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/altGlyph