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
ConstructorsModifierConstructorDescriptionprotectedGlyf()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 GlyfgetGlyf(ByteBuffer data) Get a map from the given datashortGet the length of this glyf.voidsetData(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- aByteBufferobject.- Returns:
- a
Glyfobject.
-
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
ByteBufferobject.
-
setData
Set the data for this glyf. Do nothing, since a glyf with no contours has no glyf data.- Parameters:
data- aByteBufferobject.
-
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.
-