org.apache.fop.render.pcl.fonts

## Class PCLSoftFontManager

- java.lang.Object
- - org.apache.fop.render.pcl.fonts.PCLSoftFontManager

-     public class PCLSoftFontManager
      extends Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `PCLSoftFontManager.PCLTextSegment`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PCLSoftFontManager(Map<Typeface,PCLFontReader> fontReaderMap)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `assignFontID(int fontID)`
    `PCLSoftFont` | `getSoftFont(Typeface font, String text)` Finds a soft font associated with the given typeface.
    `PCLSoftFont` | `getSoftFontFromID(int index)`
    `int` | `getSoftFontID(Typeface tf)`
    `List<PCLSoftFontManager.PCLTextSegment>` | `getTextSegments(String text, Typeface font)`
    `ByteArrayOutputStream` | `makeSoftFont(Typeface font, String text)`

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

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

- - ### Constructor Detail

    - #### PCLSoftFontManager

          public PCLSoftFontManager(Map<Typeface,PCLFontReader> fontReaderMap)

  - ### Method Detail

    - #### makeSoftFont

          public ByteArrayOutputStream makeSoftFont(Typeface font,
                                                    String text)
                                             throws IOException

      Throws:
        `IOException`

    - #### assignFontID

          public byte[] assignFontID(int fontID)
                              throws IOException

      Throws:
        `IOException`

    - #### getSoftFont

          public PCLSoftFont getSoftFont(Typeface font,
                                         String text)

      Finds a soft font associated with the given typeface. If more than one instance of the font exists (as each font is bound and restricted to 255 characters) it will find the last font with available capacity.
      Parameters:
        `font` - The typeface associated with the soft font
      Returns:
        Returns the PCLSoftFont with available capacity

    - #### getSoftFontFromID

          public PCLSoftFont getSoftFontFromID(int index)

    - #### getSoftFontID

          public int getSoftFontID(Typeface tf)
                            throws IOException

      Throws:
        `IOException`

    - #### getTextSegments

          public List<PCLSoftFontManager.PCLTextSegment> getTextSegments(String text,
                                                                         Typeface font)

Copyright © 2023 Apache Software Foundation. All rights reserved.