Package org.apache.fop.svg.font
Class FOPGVTGlyphVector
java.lang.Object
org.apache.fop.svg.font.FOPGVTGlyphVector
- All Implemented Interfaces:
org.apache.batik.gvt.font.GVTGlyphVector
- Direct Known Subclasses:
ComplexGlyphVector
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List
protected Rectangle2D[]
protected final FOPGVTFont
private final FontMetrics
private final int
private final FontRenderContext
protected int[]
protected AffineTransform[]
protected boolean[]
protected int[][]
protected Rectangle2D
protected GeneralPath
private static final int[]
protected float[]
protected final TextFragment
-
Constructor Summary
ConstructorsConstructorDescriptionFOPGVTGlyphVector
(FOPGVTFont font, CharacterIterator iter, FontRenderContext frc) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private float[]
buildGlyphPositions
(CharacterIterator glyphAsCharIter, int[][] dp, MinOptMax[] lsa) Build glyph position array.private int[]
buildGlyphs
(Font font, CharacterIterator glyphAsCharIter) void
draw
(Graphics2D graphics2d, AttributedCharacterIterator aci) private Rectangle2D[]
int
getCharacterCount
(int startGlyphIndex, int endGlyphIndex) org.apache.batik.gvt.font.GVTFont
getFont()
getGlyphCellBounds
(int glyphIndex) int
getGlyphCode
(int glyphIndex) int[]
getGlyphCodes
(int beginGlyphIndex, int numEntries, int[] codeReturn) getGlyphJustificationInfo
(int glyphIndex) getGlyphLogicalBounds
(int glyphIndex) org.apache.batik.gvt.font.GVTGlyphMetrics
getGlyphMetrics
(int glyphIndex) getGlyphOutline
(int glyphIndex) getGlyphPosition
(int glyphIndex) int[][]
float[]
getGlyphPositions
(int beginGlyphIndex, int numEntries, float[] positionReturn) getGlyphTransform
(int glyphIndex) getGlyphVisualBounds
(int glyphIndex) private float
getGlyphWidth
(int index) int
getOutline
(float x, float y) boolean
isGlyphVisible
(int glyphIndex) boolean
void
maybeReverse
(boolean mirror) void
void
setGlyphCode
(int glyphIndex, int glyphCode) void
setGlyphPosition
(int glyphIndex, Point2D newPos) void
setGlyphTransform
(int glyphIndex, AffineTransform newTX) void
setGlyphVisible
(int glyphIndex, boolean visible)
-
Field Details
-
text
-
font
-
fontSize
private final int fontSize -
fontMetrics
-
frc
-
glyphs
protected int[] glyphs -
associations
-
gposAdjustments
protected int[][] gposAdjustments -
positions
protected float[] positions -
boundingBoxes
-
outline
-
glyphTransforms
-
glyphVisibilities
protected boolean[] glyphVisibilities -
logicalBounds
-
PA_ZERO
private static final int[] PA_ZERO
-
-
Constructor Details
-
FOPGVTGlyphVector
FOPGVTGlyphVector(FOPGVTFont font, CharacterIterator iter, FontRenderContext frc)
-
-
Method Details
-
performDefaultLayout
public void performDefaultLayout()- Specified by:
performDefaultLayout
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
buildGlyphs
-
buildGlyphPositions
Build glyph position array.- Parameters:
glyphAsCharIter
- iterator for mapped glyphs as char codes (not glyph codes)dp
- optionally null glyph position adjustments arraylsa
- optionally null letter space adjustments array- Returns:
- array of floats that denote [X,Y] position pairs for each glyph including including an implied subsequent glyph; i.e., returned array contains one more pair than the numbers of glyphs, where the position denoted by this last pair represents the position after the last glyph has incurred advancement
-
getGlyphWidth
private float getGlyphWidth(int index) -
getFont
public org.apache.batik.gvt.font.GVTFont getFont()- Specified by:
getFont
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getFontRenderContext
- Specified by:
getFontRenderContext
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
setGlyphCode
public void setGlyphCode(int glyphIndex, int glyphCode) -
getGlyphCode
public int getGlyphCode(int glyphIndex) - Specified by:
getGlyphCode
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getGlyphCodes
public int[] getGlyphCodes(int beginGlyphIndex, int numEntries, int[] codeReturn) - Specified by:
getGlyphCodes
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getGlyphJustificationInfo
- Specified by:
getGlyphJustificationInfo
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getGlyphLogicalBounds
- Specified by:
getGlyphLogicalBounds
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getGlyphMetrics
public org.apache.batik.gvt.font.GVTGlyphMetrics getGlyphMetrics(int glyphIndex) - Specified by:
getGlyphMetrics
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getGlyphOutline
- Specified by:
getGlyphOutline
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getGlyphCellBounds
- Specified by:
getGlyphCellBounds
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getGlyphPositionAdjustments
public int[][] getGlyphPositionAdjustments() -
getGlyphPosition
- Specified by:
getGlyphPosition
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getGlyphPositions
public float[] getGlyphPositions(int beginGlyphIndex, int numEntries, float[] positionReturn) - Specified by:
getGlyphPositions
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getGlyphTransform
- Specified by:
getGlyphTransform
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getGlyphVisualBounds
- Specified by:
getGlyphVisualBounds
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getLogicalBounds
- Specified by:
getLogicalBounds
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getNumGlyphs
public int getNumGlyphs()- Specified by:
getNumGlyphs
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getOutline
- Specified by:
getOutline
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getOutline
- Specified by:
getOutline
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getGeometricBounds
- Specified by:
getGeometricBounds
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getBounds2D
- Specified by:
getBounds2D
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
setGlyphPosition
- Specified by:
setGlyphPosition
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
setGlyphTransform
- Specified by:
setGlyphTransform
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
setGlyphVisible
public void setGlyphVisible(int glyphIndex, boolean visible) - Specified by:
setGlyphVisible
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
isGlyphVisible
public boolean isGlyphVisible(int glyphIndex) - Specified by:
isGlyphVisible
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getCharacterCount
public int getCharacterCount(int startGlyphIndex, int endGlyphIndex) - Specified by:
getCharacterCount
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
isReversed
public boolean isReversed()- Specified by:
isReversed
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
maybeReverse
public void maybeReverse(boolean mirror) - Specified by:
maybeReverse
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
draw
- Specified by:
draw
in interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getBoundingBoxes
-
buildBoundingBoxes
private void buildBoundingBoxes()
-