Path: blob/main/files/en-us/web/svg/element/altglyph/index.md
6581 views
------{{SVGRef}}{{deprecated_header}}
The <altGlyph> SVG element allows sophisticated selection of the glyphs used to render its child character data.
Usage context
{{svginfo}}
Attributes
{{SVGAttr("x")}} {{Deprecated_Inline}}
: This attribute defines the corresponding absolute x-coordinates for rendering the element. Value type: <list-of-coordinates> ; Default value: Absolute x-coordinate of ancestor {{SVGElement("text")}} or {{SVGElement("tspan")}}; Animatable: yes
{{SVGAttr("y")}} {{Deprecated_Inline}}
: This attribute defines the corresponding absolute y-coordinates for rendering the element. Value type: <list-of-coordinates> ; Default value: Absolute y-coordinate of ancestor {{SVGElement("text")}} or {{SVGElement("tspan")}}; Animatable: yes
{{SVGAttr("dx")}} {{Deprecated_Inline}}
: 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 {{SVGElement("text")}} or {{SVGElement("tspan")}}; Animatable: yes
{{SVGAttr("dy")}} {{Deprecated_Inline}}
: 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 {{SVGElement("text")}} or {{SVGElement("tspan")}}; Animatable: yes
{{SVGAttr("rotate")}} {{Deprecated_Inline}}
: 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)
{{SVGAttr("glyphRef")}} {{Deprecated_Inline}}
: The glyph identifier, the format of which is dependent on the format defined by the
formatattribute of the given font. Value type: <string> ; Default value: none; Animatable: no
{{SVGAttr("format")}} {{Deprecated_Inline}}
: The format of the given font. Value type: <string> ; Default value: none; Animatable: no
{{SVGAttr("xlink:href")}}
: An <iri> reference either to a {{SVGElement("glyph")}} element in an SVG document or to an {{SVGElement("altGlyphDef")}} element.
If the reference is to a {{SVGElement("glyph")}} element and that glyph is available, then that glyph is rendered instead of the character(s) that are inside of the {{SVGElement("altGlyph")}} element.
If the reference is to an {{SVGElement("altGlyphDef")}} element, then if an appropriate set of alternate glyphs is located from processing the {{SVGElement("altGlyphDef")}} element, then those alternate glyphs are rendered instead of the character(s) that are inside of the {{SVGElement("altGlyph")}} element. Value type: <iri> ; Default value: none; Animatable: no
Global attributes
: Most notably: {{SVGAttr("id")}} {{SVGAttr("lang")}}
: {{SVGAttr("class")}}, {{SVGAttr("style")}}
Conditional Processing Attributes
: Most notably: {{SVGAttr("requiredExtensions")}}, {{SVGAttr("systemLanguage")}}
Event Attributes
: Most notably: {{SVGAttr("clip-path")}}, {{SVGAttr("clip-rule")}}, {{SVGAttr("color")}}, {{SVGAttr("color-interpolation")}}, {{SVGAttr("color-rendering")}}, {{SVGAttr("cursor")}}, {{SVGAttr("display")}}, {{SVGAttr("dominant-baseline")}}, {{SVGAttr("fill")}}, {{SVGAttr("fill-opacity")}}, {{SVGAttr("fill-rule")}}, {{SVGAttr("filter")}}, {{SVGAttr("mask")}}, {{SVGAttr("opacity")}}, {{SVGAttr("pointer-events")}}, {{SVGAttr("shape-rendering")}}, {{SVGAttr("stroke")}}, {{SVGAttr("stroke-dasharray")}}, {{SVGAttr("stroke-dashoffset")}}, {{SVGAttr("stroke-linecap")}}, {{SVGAttr("stroke-linejoin")}}, {{SVGAttr("stroke-miterlimit")}}, {{SVGAttr("stroke-opacity")}}, {{SVGAttr("stroke-width")}}, {{SVGAttr("text-anchor")}}, {{SVGAttr("transform")}}, {{SVGAttr("vector-effect")}}, {{SVGAttr("visibility")}}
XLink Attributes
: {{SVGAttr("xlink:href")}}, {{SVGAttr("xlink:type")}}, {{SVGAttr("xlink:role")}}, {{SVGAttr("xlink:arcrole")}}, {{SVGAttr("xlink:title")}}, {{SVGAttr("xlink:show")}}, {{SVGAttr("xlink:actuate")}}
DOM Interface
This element implements the {{domxref("SVGAltGlyphElement")}} interface.
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
{{SVGElement("tspan")}}
{{SVGElement("glyph")}}
{{SVGElement("altGlyphDef")}}