Top Description Fields Constructors Methods
org.apache.fontbox.ttf

public Class GlyfCompositeDescript

extends GlyfDescript
Class Inheritance
Imports
java.io.IOException, java.util.ArrayList, .Collections, .HashMap, .List, .Map, org.apache.commons.logging.Log, .LogFactory

Glyph description for composite glyphs. Composite glyphs are made up of one or more simple glyphs, usually with some sort of transformation applied to each. This class is based on code from Apache Batik a subproject of Apache XMLGraphics. see http://xmlgraphics.apache.org/batik/ for further details.

Field Summary

Modifier and TypeField and Description
private boolean
private final List<GlyfCompositeComp>
private int
private final Map<Integer, GlyphDescription>
private GlyphTable
private static final Log
LOG

Log instance.

private int
private boolean
Inherited from org.apache.fontbox.ttf.GlyfDescript:
ON_CURVEREPEATX_DUALX_SHORT_VECTORY_DUALY_SHORT_VECTOR

Constructor Summary

AccessConstructor and Description
pack-priv
GlyfCompositeDescript(TTFDataStream
the stream to be read
bais
,
GlyphTable
the Glyphtable containing all glyphs
glyphTable
,
int
current level
level
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the number of components
getComponentCount
()

Get number of components.

public List<GlyfCompositeComp>

Returns:

unmodifiable list of this composite glyph's components
getComponents
()

Gets a view to the composite components.

private GlyfCompositeComp
private GlyfCompositeComp
public int
public int
getEndPtOfContours(int
the number of the contour
i
)

Implements org.apache.fontbox.ttf.GlyphDescription.getEndPtOfContours.

Returns the index of the ending point of the given contour.

public byte
getFlags(int
the given point
i
)

Implements org.apache.fontbox.ttf.GlyphDescription.getFlags.

Returns the flags of the given point.

public int
getPointCount()

Implements org.apache.fontbox.ttf.GlyphDescription.getPointCount.

Returns the number of points.

public short
getXCoordinate(int
the given point
i
)

Implements org.apache.fontbox.ttf.GlyphDescription.getXCoordinate.

Returns the x coordinate of the given point.

public short
getYCoordinate(int
the given point
i
)

Implements org.apache.fontbox.ttf.GlyphDescription.getYCoordinate.

Returns the y coordinate of the given point.

private void
initDescriptions(int level)

public boolean
isComposite()

Implements org.apache.fontbox.ttf.GlyphDescription.isComposite.

Returns whether this point is a composite or not.

public void
resolve()

Overrides org.apache.fontbox.ttf.GlyfDescript.resolve.

Implements org.apache.fontbox.ttf.GlyphDescription.resolve.

Resolve all parts of an composite glyph.

Inherited from org.apache.fontbox.ttf.GlyfDescript:
getInstructionsreadInstructions

Field Detail

beingResolvedback to summary
private boolean beingResolved
componentsback to summary
private final List<GlyfCompositeComp> components
contourCountback to summary
private int contourCount

Hides org.apache.fontbox.ttf.GlyfDescript.contourCount.

descriptionsback to summary
private final Map<Integer, GlyphDescription> descriptions
glyphTableback to summary
private GlyphTable glyphTable
LOGback to summary
private static final Log LOG

Log instance.

pointCountback to summary
private int pointCount
resolvedback to summary
private boolean resolved

Constructor Detail

GlyfCompositeDescriptback to summary
pack-priv GlyfCompositeDescript(TTFDataStream bais, GlyphTable glyphTable, int level) throws IOException

Constructor.

Parameters
bais:TTFDataStream

the stream to be read

glyphTable:GlyphTable

the Glyphtable containing all glyphs

level:int

current level

Exceptions
IOException:
is thrown if something went wrong

Method Detail

getComponentCountback to summary
public int getComponentCount()

Get number of components.

Returns:int

the number of components

getComponentsback to summary
public List<GlyfCompositeComp> getComponents()

Gets a view to the composite components.

Returns:List<GlyfCompositeComp>

unmodifiable list of this composite glyph's components

getCompositeCompback to summary
private GlyfCompositeComp getCompositeComp(int i)
getCompositeCompEndPtback to summary
private GlyfCompositeComp getCompositeCompEndPt(int i)
getContourCountback to summary
public int getContourCount()

Overrides org.apache.fontbox.ttf.GlyfDescript.getContourCount.

Implements org.apache.fontbox.ttf.GlyphDescription.getContourCount.

Doc from org.apache.fontbox.ttf.GlyfDescript.getContourCount.

Returns the number of contours.

Returns:int

Doc from org.apache.fontbox.ttf.GlyphDescription.getContourCount.

the number of contours

Annotations
@Override
getEndPtOfContoursback to summary
public int getEndPtOfContours(int i)

Implements org.apache.fontbox.ttf.GlyphDescription.getEndPtOfContours.

Doc from org.apache.fontbox.ttf.GlyphDescription.getEndPtOfContours.

Returns the index of the ending point of the given contour.

Parameters
i:int

the number of the contour

Returns:int

the index of the ending point of the given contour

Annotations
@Override
getFlagsback to summary
public byte getFlags(int i)

Implements org.apache.fontbox.ttf.GlyphDescription.getFlags.

Doc from org.apache.fontbox.ttf.GlyphDescription.getFlags.

Returns the flags of the given point. To decode these bit flags, use the static elements of GlyfDescript. See also "Outline flags" in The 'glyf' table in the TrueType Reference Manual.

Parameters
i:int

the given point

Returns:byte

the flags value for the given point

Annotations
@Override
getPointCountback to summary
public int getPointCount()

Implements org.apache.fontbox.ttf.GlyphDescription.getPointCount.

Doc from org.apache.fontbox.ttf.GlyphDescription.getPointCount.

Returns the number of points.

Returns:int

the number of points

Annotations
@Override
getXCoordinateback to summary
public short getXCoordinate(int i)

Implements org.apache.fontbox.ttf.GlyphDescription.getXCoordinate.

Doc from org.apache.fontbox.ttf.GlyphDescription.getXCoordinate.

Returns the x coordinate of the given point.

Parameters
i:int

the given point

Returns:short

the x coordinate value for the given point

Annotations
@Override
getYCoordinateback to summary
public short getYCoordinate(int i)

Implements org.apache.fontbox.ttf.GlyphDescription.getYCoordinate.

Doc from org.apache.fontbox.ttf.GlyphDescription.getYCoordinate.

Returns the y coordinate of the given point.

Parameters
i:int

the given point

Returns:short

the y coordinate value for the given point

Annotations
@Override
initDescriptionsback to summary
private void initDescriptions(int level)
isCompositeback to summary
public boolean isComposite()

Implements org.apache.fontbox.ttf.GlyphDescription.isComposite.

Doc from org.apache.fontbox.ttf.GlyphDescription.isComposite.

Returns whether this point is a composite or not.

Returns:boolean

true if this point is a composite

Annotations
@Override
resolveback to summary
public void resolve()

Overrides org.apache.fontbox.ttf.GlyfDescript.resolve.

Implements org.apache.fontbox.ttf.GlyphDescription.resolve.

Doc from org.apache.fontbox.ttf.GlyfDescript.resolve.

Resolve all parts of an composite glyph.

Annotations
@Override