Class SVGAltGlyphHandler

java.lang.Object
org.apache.batik.bridge.SVGAltGlyphHandler
All Implemented Interfaces:
XMLConstants, AltGlyphHandler, CSSConstants, SVGConstants

public class SVGAltGlyphHandler extends Object implements AltGlyphHandler, SVGConstants
SVG font altGlyph handler. This class handles the creation of an alternate GVTGlyphVector for the altGlyph element.
  • Constructor Details

    • SVGAltGlyphHandler

      public SVGAltGlyphHandler(BridgeContext ctx, Element textElement)
      Constructs an SVGAltGlyphHandler.
      Parameters:
      ctx - The bridge context, this is needed during rendering to find any referenced glyph elements.
      textElement - The element that contains text to be replaced by the alternate glyphs. This should be an altGlyph element.
  • Method Details

    • createGlyphVector

      public GVTGlyphVector createGlyphVector(FontRenderContext frc, float fontSize, AttributedCharacterIterator aci)
      Creates a glyph vector containing the alternate glyphs.
      Specified by:
      createGlyphVector in interface AltGlyphHandler
      Parameters:
      frc - The current font render context.
      fontSize - The required font size.
      Returns:
      The GVTGlyphVector containing the alternate glyphs, or null if the alternate glyphs could not be found.