org.apache.fop.complexscripts.fonts

## Class GlyphPositioningTable.Value

- java.lang.Object
- - org.apache.fop.complexscripts.fonts.GlyphPositioningTable.Value

- Enclosing class:
    GlyphPositioningTable

      public static class GlyphPositioningTable.Value
      extends Object

  The `Value` class implements a positioning value record, comprising placement and advancement information in X and Y axes, and optionally including device data used to perform device (grid-fitted) specific fine grain adjustments.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `IDX_X_ADVANCE` X_ADVANCE value index (within adjustments arrays)
    `static int` | `IDX_X_PLACEMENT` X_PLACEMENT value index (within adjustments arrays)
    `static int` | `IDX_Y_ADVANCE` Y_ADVANCE value index (within adjustments arrays)
    `static int` | `IDX_Y_PLACEMENT` Y_PLACEMENT value index (within adjustments arrays)
    `static int` | `X_ADVANCE` X_ADVANCE value format flag
    `static int` | `X_ADVANCE_DEVICE` X_ADVANCE_DEVICE value format flag
    `static int` | `X_PLACEMENT` X_PLACEMENT value format flag
    `static int` | `X_PLACEMENT_DEVICE` X_PLACEMENT_DEVICE value format flag
    `static int` | `Y_ADVANCE` Y_ADVANCE value format flag
    `static int` | `Y_ADVANCE_DEVICE` Y_ADVANCE_DEVICE value format flag
    `static int` | `Y_PLACEMENT` Y_PLACEMENT value format flag
    `static int` | `Y_PLACEMENT_DEVICE` Y_PLACEMENT_DEVICE value format flag

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Value(int xPlacement, int yPlacement, int xAdvance, int yAdvance, GlyphPositioningTable.DeviceTable xPlaDevice, GlyphPositioningTable.DeviceTable yPlaDevice, GlyphPositioningTable.DeviceTable xAdvDevice, GlyphPositioningTable.DeviceTable yAdvDevice)` Instantiate a Value.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `adjust(int[] adjustments, int fontSize)` Apply value to adjustments using font size for device table adjustments.
    `void` | `adjust(int xPlacement, int yPlacement, int xAdvance, int yAdvance)` Apply value to specific adjustments to without use of device table adjustments.
    `int` | `getXAdvance()`
    `GlyphPositioningTable.DeviceTable` | `getXAdvDevice()`
    `int` | `getXPlacement()`
    `GlyphPositioningTable.DeviceTable` | `getXPlaDevice()`
    `int` | `getYAdvance()`
    `GlyphPositioningTable.DeviceTable` | `getYAdvDevice()`
    `int` | `getYPlacement()`
    `GlyphPositioningTable.DeviceTable` | `getYPlaDevice()`
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### X_PLACEMENT

          public static final int X_PLACEMENT

      X_PLACEMENT value format flag
      See Also:
        Constant Field Values

    - #### Y_PLACEMENT

          public static final int Y_PLACEMENT

      Y_PLACEMENT value format flag
      See Also:
        Constant Field Values

    - #### X_ADVANCE

          public static final int X_ADVANCE

      X_ADVANCE value format flag
      See Also:
        Constant Field Values

    - #### Y_ADVANCE

          public static final int Y_ADVANCE

      Y_ADVANCE value format flag
      See Also:
        Constant Field Values

    - #### X_PLACEMENT_DEVICE

          public static final int X_PLACEMENT_DEVICE

      X_PLACEMENT_DEVICE value format flag
      See Also:
        Constant Field Values

    - #### Y_PLACEMENT_DEVICE

          public static final int Y_PLACEMENT_DEVICE

      Y_PLACEMENT_DEVICE value format flag
      See Also:
        Constant Field Values

    - #### X_ADVANCE_DEVICE

          public static final int X_ADVANCE_DEVICE

      X_ADVANCE_DEVICE value format flag
      See Also:
        Constant Field Values

    - #### Y_ADVANCE_DEVICE

          public static final int Y_ADVANCE_DEVICE

      Y_ADVANCE_DEVICE value format flag
      See Also:
        Constant Field Values

    - #### IDX_X_PLACEMENT

          public static final int IDX_X_PLACEMENT

      X_PLACEMENT value index (within adjustments arrays)
      See Also:
        Constant Field Values

    - #### IDX_Y_PLACEMENT

          public static final int IDX_Y_PLACEMENT

      Y_PLACEMENT value index (within adjustments arrays)
      See Also:
        Constant Field Values

    - #### IDX_X_ADVANCE

          public static final int IDX_X_ADVANCE

      X_ADVANCE value index (within adjustments arrays)
      See Also:
        Constant Field Values

    - #### IDX_Y_ADVANCE

          public static final int IDX_Y_ADVANCE

      Y_ADVANCE value index (within adjustments arrays)
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Value

          public Value(int xPlacement,
                       int yPlacement,
                       int xAdvance,
                       int yAdvance,
                       GlyphPositioningTable.DeviceTable xPlaDevice,
                       GlyphPositioningTable.DeviceTable yPlaDevice,
                       GlyphPositioningTable.DeviceTable xAdvDevice,
                       GlyphPositioningTable.DeviceTable yAdvDevice)

      Instantiate a Value.
      Parameters:
        `xPlacement` - the x placement or zero
        `yPlacement` - the y placement or zero
        `xAdvance` - the x advance or zero
        `yAdvance` - the y advance or zero
        `xPlaDevice` - the x placement device table or null
        `yPlaDevice` - the y placement device table or null
        `xAdvDevice` - the x advance device table or null
        `yAdvDevice` - the y advance device table or null

  - ### Method Detail

    - #### getXPlacement

          public int getXPlacement()

      Returns:
        the x placement

    - #### getYPlacement

          public int getYPlacement()

      Returns:
        the y placement

    - #### getXAdvance

          public int getXAdvance()

      Returns:
        the x advance

    - #### getYAdvance

          public int getYAdvance()

      Returns:
        the y advance

    - #### getXPlaDevice

          public GlyphPositioningTable.DeviceTable getXPlaDevice()

      Returns:
        the x placement device table

    - #### getYPlaDevice

          public GlyphPositioningTable.DeviceTable getYPlaDevice()

      Returns:
        the y placement device table

    - #### getXAdvDevice

          public GlyphPositioningTable.DeviceTable getXAdvDevice()

      Returns:
        the x advance device table

    - #### getYAdvDevice

          public GlyphPositioningTable.DeviceTable getYAdvDevice()

      Returns:
        the y advance device table

    - #### adjust

          public void adjust(int xPlacement,
                             int yPlacement,
                             int xAdvance,
                             int yAdvance)

      Apply value to specific adjustments to without use of device table adjustments.
      Parameters:
        `xPlacement` - the x placement or zero
        `yPlacement` - the y placement or zero
        `xAdvance` - the x advance or zero
        `yAdvance` - the y advance or zero

    - #### adjust

          public boolean adjust(int[] adjustments,
                                int fontSize)

      Apply value to adjustments using font size for device table adjustments.
      Parameters:
        `adjustments` - array of four integers containing X,Y placement and X,Y advance adjustments
        `fontSize` - font size for device table adjustments
      Returns:
        true if some adjustment was made

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2023 Apache Software Foundation. All rights reserved.