org.apache.fop.fonts

## Class GlyphMapping

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

-     public class GlyphMapping
      extends java.lang.Object

  Stores the mapping of a text fragment to glyphs, along with various information.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `MinOptMax` | `areaIPD`
    `java.util.List` | `associations`
    `boolean` | `breakOppAfter`
    `int` | `endIndex` Exclusive.
    `Font` | `font`
    `int[][]` | `gposAdjustments`
    `boolean` | `isHyphenated`
    `boolean` | `isSpace`
    `int` | `letterSpaceCount`
    `int` | `level`
    `java.lang.String` | `mapping`
    `int` | `startIndex` Inclusive.
    `int` | `wordSpaceCount`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GlyphMapping(int startIndex, int endIndex, int wordSpaceCount, int letterSpaceCount, MinOptMax areaIPD, boolean isHyphenated, boolean isSpace, boolean breakOppAfter, Font font, int level, int[][] gposAdjustments)`
    `GlyphMapping(int startIndex, int endIndex, int wordSpaceCount, int letterSpaceCount, MinOptMax areaIPD, boolean isHyphenated, boolean isSpace, boolean breakOppAfter, Font font, int level, int[][] gposAdjustments, java.lang.String mapping, java.util.List associations)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addToAreaIPD(MinOptMax idp)`
    `static GlyphMapping` | `doGlyphMapping(TextFragment text, int startIndex, int endIndex, Font font, MinOptMax letterSpaceIPD, MinOptMax[] letterSpaceAdjustArray, char precedingChar, char breakOpportunityChar, boolean endsWithHyphen, int level, boolean dontOptimizeForIdentityMapping, boolean retainAssociations, boolean retainControls)`
    `int` | `getWordLength()` Obtain number of 'characters' contained in word.
    `static boolean` | `isSpace(char ch)` Indicates whether a character is a space in terms of this layout manager.
    `java.lang.String` | `toString()`

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

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

- - ### Field Detail

    - #### startIndex

          public final int startIndex

      Inclusive.

    - #### endIndex

          public final int endIndex

      Exclusive.

    - #### wordSpaceCount

          public final int wordSpaceCount

    - #### letterSpaceCount

          public int letterSpaceCount

    - #### areaIPD

          public MinOptMax areaIPD

    - #### isHyphenated

          public final boolean isHyphenated

    - #### isSpace

          public final boolean isSpace

    - #### breakOppAfter

          public boolean breakOppAfter

    - #### font

          public final Font font

    - #### level

          public final int level

    - #### gposAdjustments

          public final int[][] gposAdjustments

    - #### mapping

          public java.lang.String mapping

    - #### associations

          public java.util.List associations

  - ### Constructor Detail

    - #### GlyphMapping

          public GlyphMapping(int startIndex,
                              int endIndex,
                              int wordSpaceCount,
                              int letterSpaceCount,
                              MinOptMax areaIPD,
                              boolean isHyphenated,
                              boolean isSpace,
                              boolean breakOppAfter,
                              Font font,
                              int level,
                              int[][] gposAdjustments)

    - #### GlyphMapping

          public GlyphMapping(int startIndex,
                              int endIndex,
                              int wordSpaceCount,
                              int letterSpaceCount,
                              MinOptMax areaIPD,
                              boolean isHyphenated,
                              boolean isSpace,
                              boolean breakOppAfter,
                              Font font,
                              int level,
                              int[][] gposAdjustments,
                              java.lang.String mapping,
                              java.util.List associations)

  - ### Method Detail

    - #### doGlyphMapping

          public static GlyphMapping doGlyphMapping(TextFragment text,
                                                    int startIndex,
                                                    int endIndex,
                                                    Font font,
                                                    MinOptMax letterSpaceIPD,
                                                    MinOptMax[] letterSpaceAdjustArray,
                                                    char precedingChar,
                                                    char breakOpportunityChar,
                                                    boolean endsWithHyphen,
                                                    int level,
                                                    boolean dontOptimizeForIdentityMapping,
                                                    boolean retainAssociations,
                                                    boolean retainControls)

    - #### isSpace

          public static boolean isSpace(char ch)

      Indicates whether a character is a space in terms of this layout manager.
      Parameters:
        `ch` - the character
      Returns:
        true if it's a space

    - #### getWordLength

          public int getWordLength()

      Obtain number of 'characters' contained in word. If word is mapped, then this number may be less than or greater than the original length (breakIndex - startIndex). We compute and memoize thius length upon first invocation of this method.

    - #### addToAreaIPD

          public void addToAreaIPD(MinOptMax idp)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright 1999-2020 The Apache Software Foundation. All Rights Reserved.