Class Glyf
java.lang.Object
org.loboevolution.pdfview.font.ttf.Glyf
- Direct Known Subclasses:
GlyfCompound
,GlyfSimple
A single glyph in a pdf font. May be simple or compound via subclasses
-
Constructor Summary
ModifierConstructorDescriptionprotected
Glyf()
Creates a new instance of glyf Don't use this directly, useGlyf.getGlyf()
-
Method Summary
Modifier and TypeMethodDescriptiongetData()
Get the data in this glyf as a byte buffer.static Glyf
getGlyf
(ByteBuffer data) Get a map from the given datashort
Get the length of this glyf.void
setData
(ByteBuffer data) Set the data for this glyf.
-
Constructor Details
-
Glyf
protected Glyf()Creates a new instance of glyf Don't use this directly, useGlyf.getGlyf()
-
-
Method Details
-
getGlyf
Get a map from the given dataThis method reads the format, data and length variables of the map.
- Parameters:
data
- aByteBuffer
object.- Returns:
- a
Glyf
object.
-
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.- Returns:
- a
ByteBuffer
object.
-
setData
Set the data for this glyf. Do nothing, since a glyf with no contours has no glyf data.- Parameters:
data
- aByteBuffer
object.
-
getLength
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)- Returns:
- a short.
-