org.apache.fop.fonts

## Class FontEventAdapter

- java.lang.Object
- - org.apache.fop.fonts.FontEventAdapter

- All Implemented Interfaces:
    FontEventListener

      public class FontEventAdapter
      extends Object
      implements FontEventListener

  Event listener interface for font-related events. This interface extends FontEventListener and EventProducer for integration into FOP's event subsystem.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FontEventAdapter(EventBroadcaster broadcaster)` Creates a new FontEventAdapter.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `fontDirectoryNotFound(Object source, String dir)` An error occurred trying to find the font directory specified in the config file.
    `void` | `fontFeatureNotSuppprted(Object source, String feature, String onlySupportedIn)`
    `void` | `fontLoadingErrorAtAutoDetection(Object source, String fontURL, Exception e)` An error occurred while loading a font for auto-detection.
    `void` | `fontSubstituted(Object source, FontTriplet requested, FontTriplet effective)` Notifies about a font being substituted as the requested one isn't available.
    `void` | `glyphNotAvailable(Object source, char ch, String fontName)` A glyph has been requested that is not available in the font.
    `void` | `svgTextStrokedAsShapes(Object source, String fontFamily)` The SVG text will be stroked as shapes.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FontEventAdapter

          public FontEventAdapter(EventBroadcaster broadcaster)

      Creates a new FontEventAdapter.
      Parameters:
        `broadcaster` - the event broadcaster to send the generated events to

  - ### Method Detail

    - #### fontSubstituted

          public void fontSubstituted(Object source,
                                      FontTriplet requested,
                                      FontTriplet effective)

      Notifies about a font being substituted as the requested one isn't available.
      Specified by:
        `fontSubstituted` in interface `FontEventListener`
      Parameters:
        `source` - the event source
        `requested` - the requested font triplet
        `effective` - the effective font triplet

    - #### fontLoadingErrorAtAutoDetection

          public void fontLoadingErrorAtAutoDetection(Object source,
                                                      String fontURL,
                                                      Exception e)

      An error occurred while loading a font for auto-detection.
      Specified by:
        `fontLoadingErrorAtAutoDetection` in interface `FontEventListener`
      Parameters:
        `source` - the event source
        `fontURL` - the font URL
        `e` - the original exception

    - #### glyphNotAvailable

          public void glyphNotAvailable(Object source,
                                        char ch,
                                        String fontName)

      A glyph has been requested that is not available in the font.
      Specified by:
        `glyphNotAvailable` in interface `FontEventListener`
      Parameters:
        `source` - the event source
        `ch` - the character for which the glyph isn't available
        `fontName` - the name of the font

    - #### fontDirectoryNotFound

          public void fontDirectoryNotFound(Object source,
                                            String dir)

      An error occurred trying to find the font directory specified in the config file.
      Specified by:
        `fontDirectoryNotFound` in interface `FontEventListener`
      Parameters:
        `source` - the event source
        `dir` - the directory in the config file

    - #### svgTextStrokedAsShapes

          public void svgTextStrokedAsShapes(Object source,
                                             String fontFamily)

      The SVG text will be stroked as shapes.
      Specified by:
        `svgTextStrokedAsShapes` in interface `FontEventListener`
      Parameters:
        `source` - the event source
        `fontFamily` - the family name of the font that is being stroked

    - #### fontFeatureNotSuppprted

          public void fontFeatureNotSuppprted(Object source,
                                              String feature,
                                              String onlySupportedIn)

Copyright © 2025 Apache Software Foundation. All rights reserved.