Class GlyphPositioningTable.Value
- java.lang.Object
-
- org.apache.fop.complexscripts.fonts.GlyphPositioningTable.Value
-
- Enclosing class:
- GlyphPositioningTable
public static class GlyphPositioningTable.Value extends java.lang.Object
TheValue
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 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 flagstatic int
X_ADVANCE_DEVICE
X_ADVANCE_DEVICE value format flagstatic int
X_PLACEMENT
X_PLACEMENT value format flagstatic int
X_PLACEMENT_DEVICE
X_PLACEMENT_DEVICE value format flagstatic int
Y_ADVANCE
Y_ADVANCE value format flagstatic int
Y_ADVANCE_DEVICE
Y_ADVANCE_DEVICE value format flagstatic int
Y_PLACEMENT
Y_PLACEMENT value format flagstatic int
Y_PLACEMENT_DEVICE
Y_PLACEMENT_DEVICE value format flag
-
Constructor Summary
Constructors Constructor 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 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()
java.lang.String
toString()
-
-
-
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 zeroyPlacement
- the y placement or zeroxAdvance
- the x advance or zeroyAdvance
- the y advance or zeroxPlaDevice
- the x placement device table or nullyPlaDevice
- the y placement device table or nullxAdvDevice
- the x advance device table or nullyAdvDevice
- 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 zeroyPlacement
- the y placement or zeroxAdvance
- the x advance or zeroyAdvance
- 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 adjustmentsfontSize
- font size for device table adjustments- Returns:
- true if some adjustment was made
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-