Class GlyphPositioningTable.Value
java.lang.Object
org.apache.fop.complexscripts.fonts.GlyphPositioningTable.Value
- Enclosing class:
- GlyphPositioningTable
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
Modifier and TypeFieldDescriptionstatic final int
X_ADVANCE value index (within adjustments arrays)static final int
X_PLACEMENT value index (within adjustments arrays)static final int
Y_ADVANCE value index (within adjustments arrays)static final int
Y_PLACEMENT value index (within adjustments arrays)static final int
X_ADVANCE value format flagstatic final int
X_ADVANCE_DEVICE value format flagstatic final int
X_PLACEMENT value format flagstatic final int
X_PLACEMENT_DEVICE value format flagstatic final int
Y_ADVANCE value format flagstatic final int
Y_ADVANCE_DEVICE value format flagstatic final int
Y_PLACEMENT value format flagstatic final int
Y_PLACEMENT_DEVICE value format flag -
Constructor Summary
ConstructorDescriptionValue
(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
Modifier and TypeMethodDescriptionboolean
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
int
int
int
toString()
-
Field Details
-
X_PLACEMENT
public static final int X_PLACEMENTX_PLACEMENT value format flag- See Also:
-
Y_PLACEMENT
public static final int Y_PLACEMENTY_PLACEMENT value format flag- See Also:
-
X_ADVANCE
public static final int X_ADVANCEX_ADVANCE value format flag- See Also:
-
Y_ADVANCE
public static final int Y_ADVANCEY_ADVANCE value format flag- See Also:
-
X_PLACEMENT_DEVICE
public static final int X_PLACEMENT_DEVICEX_PLACEMENT_DEVICE value format flag- See Also:
-
Y_PLACEMENT_DEVICE
public static final int Y_PLACEMENT_DEVICEY_PLACEMENT_DEVICE value format flag- See Also:
-
X_ADVANCE_DEVICE
public static final int X_ADVANCE_DEVICEX_ADVANCE_DEVICE value format flag- See Also:
-
Y_ADVANCE_DEVICE
public static final int Y_ADVANCE_DEVICEY_ADVANCE_DEVICE value format flag- See Also:
-
IDX_X_PLACEMENT
public static final int IDX_X_PLACEMENTX_PLACEMENT value index (within adjustments arrays)- See Also:
-
IDX_Y_PLACEMENT
public static final int IDX_Y_PLACEMENTY_PLACEMENT value index (within adjustments arrays)- See Also:
-
IDX_X_ADVANCE
public static final int IDX_X_ADVANCEX_ADVANCE value index (within adjustments arrays)- See Also:
-
IDX_Y_ADVANCE
public static final int IDX_Y_ADVANCEY_ADVANCE value index (within adjustments arrays)- See Also:
-
-
Constructor Details
-
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 Details
-
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
- Returns:
- the x placement device table
-
getYPlaDevice
- Returns:
- the y placement device table
-
getXAdvDevice
- Returns:
- the x advance device table
-
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
-