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 Listprotected Rectangle2D[]protected final FOPGVTFontprivate final FontMetricsprivate final intprivate final FontRenderContextprotected int[]protected AffineTransform[]protected boolean[]protected int[][]protected Rectangle2Dprotected GeneralPathprivate static final int[]protected float[]protected final TextFragment -
Constructor Summary
ConstructorsConstructorDescriptionFOPGVTGlyphVector(FOPGVTFont font, CharacterIterator iter, FontRenderContext frc) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidprivate float[]buildGlyphPositions(CharacterIterator glyphAsCharIter, int[][] dp, MinOptMax[] lsa) Build glyph position array.private int[]buildGlyphs(Font font, CharacterIterator glyphAsCharIter) voiddraw(Graphics2D graphics2d, AttributedCharacterIterator aci) private Rectangle2D[]intgetCharacterCount(int startGlyphIndex, int endGlyphIndex) org.apache.batik.gvt.font.GVTFontgetFont()getGlyphCellBounds(int glyphIndex) intgetGlyphCode(int glyphIndex) int[]getGlyphCodes(int beginGlyphIndex, int numEntries, int[] codeReturn) getGlyphJustificationInfo(int glyphIndex) getGlyphLogicalBounds(int glyphIndex) org.apache.batik.gvt.font.GVTGlyphMetricsgetGlyphMetrics(int glyphIndex) getGlyphOutline(int glyphIndex) getGlyphPosition(int glyphIndex) int[][]float[]getGlyphPositions(int beginGlyphIndex, int numEntries, float[] positionReturn) getGlyphTransform(int glyphIndex) getGlyphVisualBounds(int glyphIndex) private floatgetGlyphWidth(int index) intgetOutline(float x, float y) booleanisGlyphVisible(int glyphIndex) booleanvoidmaybeReverse(boolean mirror) voidvoidsetGlyphCode(int glyphIndex, int glyphCode) voidsetGlyphPosition(int glyphIndex, Point2D newPos) voidsetGlyphTransform(int glyphIndex, AffineTransform newTX) voidsetGlyphVisible(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:
performDefaultLayoutin 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:
getFontin interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getFontRenderContext
- Specified by:
getFontRenderContextin interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
setGlyphCode
public void setGlyphCode(int glyphIndex, int glyphCode) -
getGlyphCode
public int getGlyphCode(int glyphIndex) - Specified by:
getGlyphCodein interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getGlyphCodes
public int[] getGlyphCodes(int beginGlyphIndex, int numEntries, int[] codeReturn) - Specified by:
getGlyphCodesin interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getGlyphJustificationInfo
- Specified by:
getGlyphJustificationInfoin interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getGlyphLogicalBounds
- Specified by:
getGlyphLogicalBoundsin interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getGlyphMetrics
public org.apache.batik.gvt.font.GVTGlyphMetrics getGlyphMetrics(int glyphIndex) - Specified by:
getGlyphMetricsin interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getGlyphOutline
- Specified by:
getGlyphOutlinein interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getGlyphCellBounds
- Specified by:
getGlyphCellBoundsin interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getGlyphPositionAdjustments
public int[][] getGlyphPositionAdjustments() -
getGlyphPosition
- Specified by:
getGlyphPositionin interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getGlyphPositions
public float[] getGlyphPositions(int beginGlyphIndex, int numEntries, float[] positionReturn) - Specified by:
getGlyphPositionsin interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getGlyphTransform
- Specified by:
getGlyphTransformin interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getGlyphVisualBounds
- Specified by:
getGlyphVisualBoundsin interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getLogicalBounds
- Specified by:
getLogicalBoundsin interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getNumGlyphs
public int getNumGlyphs()- Specified by:
getNumGlyphsin interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getOutline
- Specified by:
getOutlinein interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getOutline
- Specified by:
getOutlinein interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getGeometricBounds
- Specified by:
getGeometricBoundsin interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getBounds2D
- Specified by:
getBounds2Din interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
setGlyphPosition
- Specified by:
setGlyphPositionin interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
setGlyphTransform
- Specified by:
setGlyphTransformin interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
setGlyphVisible
public void setGlyphVisible(int glyphIndex, boolean visible) - Specified by:
setGlyphVisiblein interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
isGlyphVisible
public boolean isGlyphVisible(int glyphIndex) - Specified by:
isGlyphVisiblein interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getCharacterCount
public int getCharacterCount(int startGlyphIndex, int endGlyphIndex) - Specified by:
getCharacterCountin interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
isReversed
public boolean isReversed()- Specified by:
isReversedin interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
maybeReverse
public void maybeReverse(boolean mirror) - Specified by:
maybeReversein interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
draw
- Specified by:
drawin interfaceorg.apache.batik.gvt.font.GVTGlyphVector
-
getBoundingBoxes
-
buildBoundingBoxes
private void buildBoundingBoxes()
-