Package org.apache.fontbox.ttf
Class GlyphData
- java.lang.Object
-
- org.apache.fontbox.ttf.GlyphData
-
public class GlyphData extends java.lang.ObjectA glyph data record in the glyf table.
-
-
Field Summary
Fields Modifier and Type Field Description private BoundingBoxboundingBoxprivate GlyfDescriptglyphDescriptionprivate shortnumberOfContoursprivate shortxMaxprivate shortxMinprivate shortyMaxprivate shortyMin
-
Constructor Summary
Constructors Constructor Description GlyphData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BoundingBoxgetBoundingBox()GlyphDescriptiongetDescription()Returns the description of the glyph.shortgetNumberOfContours()java.awt.geom.GeneralPathgetPath()Returns the path of the glyph.shortgetXMaximum()Returns the xMax value.shortgetXMinimum()Returns the xMin value.shortgetYMaximum()Returns the yMax value.shortgetYMinimum()Returns the yMin value.(package private) voidinitData(GlyphTable glyphTable, TTFDataStream data, int leftSideBearing)This will read the required data from the stream.(package private) voidinitEmptyData()Initialize an empty glyph record.voidsetBoundingBox(BoundingBox boundingBoxValue)voidsetNumberOfContours(short numberOfContoursValue)
-
-
-
Field Detail
-
xMin
private short xMin
-
yMin
private short yMin
-
xMax
private short xMax
-
yMax
private short yMax
-
boundingBox
private BoundingBox boundingBox
-
numberOfContours
private short numberOfContours
-
glyphDescription
private GlyfDescript glyphDescription
-
-
Method Detail
-
initData
void initData(GlyphTable glyphTable, TTFDataStream data, int leftSideBearing) throws java.io.IOException
This will read the required data from the stream.- Parameters:
glyphTable- The glyph table this glyph belongs to.data- The stream to read the data from.leftSideBearing- The left side bearing for this glyph.- Throws:
java.io.IOException- If there is an error reading the data.
-
initEmptyData
void initEmptyData() throws java.io.IOExceptionInitialize an empty glyph record.- Throws:
java.io.IOException
-
getBoundingBox
public BoundingBox getBoundingBox()
- Returns:
- Returns the boundingBox.
-
setBoundingBox
public void setBoundingBox(BoundingBox boundingBoxValue)
- Parameters:
boundingBoxValue- The boundingBox to set.
-
getNumberOfContours
public short getNumberOfContours()
- Returns:
- Returns the numberOfContours.
-
setNumberOfContours
public void setNumberOfContours(short numberOfContoursValue)
- Parameters:
numberOfContoursValue- The numberOfContours to set.
-
getDescription
public GlyphDescription getDescription()
Returns the description of the glyph.- Returns:
- the glyph description
-
getPath
public java.awt.geom.GeneralPath getPath()
Returns the path of the glyph.- Returns:
- the path
-
getXMaximum
public short getXMaximum()
Returns the xMax value.- Returns:
- the XMax value
-
getXMinimum
public short getXMinimum()
Returns the xMin value.- Returns:
- the xMin value
-
getYMaximum
public short getYMaximum()
Returns the yMax value.- Returns:
- the yMax value
-
getYMinimum
public short getYMinimum()
Returns the yMin value.- Returns:
- the yMin value
-
-