Package org.apache.fontbox.cff
Class Type1CharString
java.lang.Object
org.apache.fontbox.cff.Type1CharString
- Direct Known Subclasses:
Type2CharString
This class represents and renders a Type 1 CharString.
- Author:
- Villu Ruusmann, John Hewson
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedType1CharString(Type1CharStringReader font, String fontName, String glyphName) Constructor for use in subclasses.Type1CharString(Type1CharStringReader font, String fontName, String glyphName, List<Object> sequence) Constructs a new Type1CharString object. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddCommand(List<Number> numbers, CharStringCommand command) Add a command to the type1 sequence.Returns the bounds of the renderer path.protected ObjectReturns the last entry of the underlying type1 sequence.getName()getPath()Returns the path of the character.intgetWidth()Returns the advance width of the glyph.protected booleanIndicates if the underlying type1 sequence is empty.toString()
-
Constructor Details
-
Type1CharString
public Type1CharString(Type1CharStringReader font, String fontName, String glyphName, List<Object> sequence) Constructs a new Type1CharString object.- Parameters:
font- Parent Type 1 CharString font.fontName- Name of the font.glyphName- Name of the glyph.sequence- Type 1 char string sequence
-
Type1CharString
Constructor for use in subclasses.- Parameters:
font- Parent Type 1 CharString font.fontName- Name of the font.glyphName- Name of the glyph.
-
-
Method Details
-
getName
-
getBounds
Returns the bounds of the renderer path.- Returns:
- the bounds as Rectangle2D
-
getWidth
public int getWidth()Returns the advance width of the glyph.- Returns:
- the width
-
getPath
Returns the path of the character.- Returns:
- the path
-
addCommand
Add a command to the type1 sequence.- Parameters:
numbers- the parameters of the command to be addedcommand- the command to be added
-
isSequenceEmpty
protected boolean isSequenceEmpty()Indicates if the underlying type1 sequence is empty.- Returns:
- true if the sequence is empty
-
getLastSequenceEntry
Returns the last entry of the underlying type1 sequence.- Returns:
- the last entry of the type 1 sequence or null if empty
-
toString
-