Class GlyphPositioningTable.Value

  • Enclosing class:
    GlyphPositioningTable

    public static class GlyphPositioningTable.Value
    extends java.lang.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 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
    • 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
      • 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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object