com.sun.pdfview.font.ttf
Class Glyf
public
class
Glyf
extends Object
A single glyph in a pdf font. May be simple or compound via subclasses
Method Summary |
ByteBuffer | getData()
Get the data in this glyf as a byte buffer. |
static Glyf | getGlyf(ByteBuffer data)
Get a map from the given data
This method reads the format, data and length variables of
the map. |
short | getLength()
Get the length of this glyf. |
short | getMaxX()
Get the maximum x in this glyf |
short | getMaxY()
Get the maximum y in this glyf |
short | getMinX()
Get the minimum x in this glyf |
short | getMinY()
Get the minimum y in this glyf |
short | getNumContours()
Get the number of contours in this glyf |
boolean | isCompound()
Get whether this is a simple or compound glyf |
protected void | setCompound(boolean isCompound)
Set whether this is a simple or compound glyf |
void | setData(ByteBuffer data)
Set the data for this glyf. |
protected void | setMaxX(short maxX)
Set the maximum X in this glyf |
protected void | setMaxY(short maxY)
Set the maximum Y in this glyf |
protected void | setMinX(short minX)
Set the minimum X in this glyf |
protected void | setMinY(short minY)
Set the minimum Y in this glyf |
protected void | setNumContours(short numContours)
Set the number of contours in this glyf |
protected Glyf()
Creates a new instance of glyf
Don't use this directly, use Glyf.getGlyf()
public ByteBuffer getData()
Get the data in this glyf as a byte buffer. Return the basic
glyf data only, since there is no specific data. This method returns
the data un-flipped, so subclasses can simply append to the allocated
buffer.
public static
Glyf getGlyf(ByteBuffer data)
Get a map from the given data
This method reads the format, data and length variables of
the map.
public short getLength()
Get the length of this glyf. A glyf with no data has a length
of 10 (2 bytes each for 5 short values)
public short getMaxX()
Get the maximum x in this glyf
public short getMaxY()
Get the maximum y in this glyf
public short getMinX()
Get the minimum x in this glyf
public short getMinY()
Get the minimum y in this glyf
public short getNumContours()
Get the number of contours in this glyf
public boolean isCompound()
Get whether this is a simple or compound glyf
protected void setCompound(boolean isCompound)
Set whether this is a simple or compound glyf
public void setData(ByteBuffer data)
Set the data for this glyf. Do nothing, since a glyf with
no contours has no glyf data.
protected void setMaxX(short maxX)
Set the maximum X in this glyf
protected void setMaxY(short maxY)
Set the maximum Y in this glyf
protected void setMinX(short minX)
Set the minimum X in this glyf
protected void setMinY(short minY)
Set the minimum Y in this glyf
protected void setNumContours(short numContours)
Set the number of contours in this glyf