public final class Type1Font extends java.lang.Object implements Type1CharStringReader, EncodedFont, FontBoxFont
Modifier and Type | Field and Description |
---|---|
(package private) int |
blueFuzz |
(package private) float |
blueScale |
(package private) int |
blueShift |
(package private) java.util.List<java.lang.Number> |
blueValues |
private java.util.Map<java.lang.String,Type1CharString> |
charStringCache |
(package private) java.util.Map<java.lang.String,byte[]> |
charstrings |
(package private) Encoding |
encoding |
(package private) java.util.List<java.lang.Number> |
familyBlues |
(package private) java.lang.String |
familyName |
(package private) java.util.List<java.lang.Number> |
familyOtherBlues |
(package private) java.util.List<java.lang.Number> |
fontBBox |
(package private) java.lang.String |
fontID |
(package private) java.util.List<java.lang.Number> |
fontMatrix |
(package private) java.lang.String |
fontName |
(package private) int |
fontType |
(package private) boolean |
forceBold |
(package private) java.lang.String |
fullName |
(package private) boolean |
isFixedPitch |
(package private) float |
italicAngle |
(package private) int |
languageGroup |
(package private) java.lang.String |
notice |
(package private) java.util.List<java.lang.Number> |
otherBlues |
(package private) int |
paintType |
private byte[] |
segment1 |
private byte[] |
segment2 |
(package private) java.util.List<java.lang.Number> |
stdHW |
(package private) java.util.List<java.lang.Number> |
stdVW |
(package private) java.util.List<java.lang.Number> |
stemSnapH |
(package private) java.util.List<java.lang.Number> |
stemSnapV |
(package private) float |
strokeWidth |
(package private) java.util.List<byte[]> |
subrs |
(package private) float |
underlinePosition |
(package private) float |
underlineThickness |
(package private) int |
uniqueID |
(package private) java.lang.String |
version |
(package private) java.lang.String |
weight |
Constructor and Description |
---|
Type1Font(byte[] segment1,
byte[] segment2)
Constructs a new Type1Font, called by Type1Parser.
|
Modifier and Type | Method and Description |
---|---|
static Type1Font |
createWithPFB(byte[] pfbBytes)
Constructs a new Type1Font object from a .pfb stream.
|
static Type1Font |
createWithPFB(java.io.InputStream pfbStream)
Constructs a new Type1Font object from a .pfb stream.
|
static Type1Font |
createWithSegments(byte[] segment1,
byte[] segment2)
Constructs a new Type1Font object from two header-less .pfb segments.
|
byte[] |
getASCIISegment()
Returns the ASCII segment.
|
byte[] |
getBinarySegment()
Returns the binary segment.
|
int |
getBlueFuzz()
Returns the blue fuzz.
|
float |
getBlueScale()
Returns the blue scale.
|
int |
getBlueShift()
Returns the blue shift.
|
java.util.List<java.lang.Number> |
getBlueValues()
Returns the blues values.
|
java.util.Map<java.lang.String,byte[]> |
getCharStringsDict()
Returns the /CharStrings dictionary as raw bytes.
|
Encoding |
getEncoding()
Returns the Encoding, if present.
|
java.util.List<java.lang.Number> |
getFamilyBlues()
Returns the family blues values.
|
java.lang.String |
getFamilyName()
Returns the family name.
|
java.util.List<java.lang.Number> |
getFamilyOtherBlues()
Returns the other family blues values.
|
BoundingBox |
getFontBBox()
Returns the font bounding box.
|
java.lang.String |
getFontID()
Returns the font ID.
|
java.util.List<java.lang.Number> |
getFontMatrix()
Returns the font matrix.
|
java.lang.String |
getFontName()
Returns the font name.
|
int |
getFontType()
Returns the font type.
|
java.lang.String |
getFullName()
Returns the full name.
|
float |
getItalicAngle()
Returns the italic angle.
|
int |
getLanguageGroup()
Returns the language group.
|
java.lang.String |
getName()
The PostScript name of the font.
|
java.lang.String |
getNotice()
Returns the notice.
|
java.util.List<java.lang.Number> |
getOtherBlues()
Returns the other blues values.
|
int |
getPaintType()
Returns the paint type.
|
java.awt.geom.GeneralPath |
getPath(java.lang.String name)
Returns the path for the character with the given name.
|
java.util.List<java.lang.Number> |
getStdHW()
Returns the StdHW value.
|
java.util.List<java.lang.Number> |
getStdVW()
Returns the StdVW value.
|
java.util.List<java.lang.Number> |
getStemSnapH()
Returns the StemSnapH value.
|
java.util.List<java.lang.Number> |
getStemSnapV()
Returns the StemSnapV value.
|
float |
getStrokeWidth()
Returns the stroke width.
|
java.util.List<byte[]> |
getSubrsArray()
Returns the /Subrs array as raw bytes.
|
Type1CharString |
getType1CharString(java.lang.String name)
Returns the Type 1 CharString for the character with the given name.
|
float |
getUnderlinePosition()
Returns the underline position
|
float |
getUnderlineThickness()
Returns the underline thickness.
|
int |
getUniqueID()
Returns unique ID.
|
java.lang.String |
getVersion()
Returns the version.
|
java.lang.String |
getWeight()
Returns the weight.
|
float |
getWidth(java.lang.String name)
Returns the advance width for the character with the given name.
|
boolean |
hasGlyph(java.lang.String name)
Returns true if the font contains the given glyph.
|
boolean |
isFixedPitch()
Determines if the font has a fixed pitch.
|
boolean |
isForceBold()
Determines if the font is bold.
|
java.lang.String |
toString() |
java.lang.String fontName
Encoding encoding
int paintType
int fontType
java.util.List<java.lang.Number> fontMatrix
java.util.List<java.lang.Number> fontBBox
int uniqueID
float strokeWidth
java.lang.String fontID
java.lang.String version
java.lang.String notice
java.lang.String fullName
java.lang.String familyName
java.lang.String weight
float italicAngle
boolean isFixedPitch
float underlinePosition
float underlineThickness
java.util.List<java.lang.Number> blueValues
java.util.List<java.lang.Number> otherBlues
java.util.List<java.lang.Number> familyBlues
java.util.List<java.lang.Number> familyOtherBlues
float blueScale
int blueShift
int blueFuzz
java.util.List<java.lang.Number> stdHW
java.util.List<java.lang.Number> stdVW
java.util.List<java.lang.Number> stemSnapH
java.util.List<java.lang.Number> stemSnapV
boolean forceBold
int languageGroup
final java.util.List<byte[]> subrs
final java.util.Map<java.lang.String,byte[]> charstrings
private final java.util.Map<java.lang.String,Type1CharString> charStringCache
private final byte[] segment1
private final byte[] segment2
Type1Font(byte[] segment1, byte[] segment2)
public static Type1Font createWithPFB(java.io.InputStream pfbStream) throws java.io.IOException
pfbStream
- .pfb input stream, including headersjava.io.IOException
- if something went wrongpublic static Type1Font createWithPFB(byte[] pfbBytes) throws java.io.IOException
pfbBytes
- .pfb data, including headersjava.io.IOException
- if something went wrongpublic static Type1Font createWithSegments(byte[] segment1, byte[] segment2) throws java.io.IOException
segment1
- The first segment, without headersegment2
- The second segment, without headerjava.io.IOException
- if something went wrongpublic java.util.List<byte[]> getSubrsArray()
public java.util.Map<java.lang.String,byte[]> getCharStringsDict()
public java.lang.String getName()
FontBoxFont
getName
in interface FontBoxFont
public java.awt.geom.GeneralPath getPath(java.lang.String name) throws java.io.IOException
FontBoxFont
getPath
in interface FontBoxFont
java.io.IOException
- if the path could not be readpublic float getWidth(java.lang.String name) throws java.io.IOException
FontBoxFont
getWidth
in interface FontBoxFont
java.io.IOException
- if the path could not be readpublic boolean hasGlyph(java.lang.String name)
FontBoxFont
hasGlyph
in interface FontBoxFont
name
- PostScript glyph namepublic Type1CharString getType1CharString(java.lang.String name) throws java.io.IOException
Type1CharStringReader
getType1CharString
in interface Type1CharStringReader
java.io.IOException
- if something went wrongpublic java.lang.String getFontName()
public Encoding getEncoding()
getEncoding
in interface EncodedFont
public int getPaintType()
public int getFontType()
public java.util.List<java.lang.Number> getFontMatrix()
getFontMatrix
in interface FontBoxFont
public BoundingBox getFontBBox()
getFontBBox
in interface FontBoxFont
public int getUniqueID()
public float getStrokeWidth()
public java.lang.String getFontID()
public java.lang.String getVersion()
public java.lang.String getNotice()
public java.lang.String getFullName()
public java.lang.String getFamilyName()
public java.lang.String getWeight()
public float getItalicAngle()
public boolean isFixedPitch()
public float getUnderlinePosition()
public float getUnderlineThickness()
public java.util.List<java.lang.Number> getBlueValues()
public java.util.List<java.lang.Number> getOtherBlues()
public java.util.List<java.lang.Number> getFamilyBlues()
public java.util.List<java.lang.Number> getFamilyOtherBlues()
public float getBlueScale()
public int getBlueShift()
public int getBlueFuzz()
public java.util.List<java.lang.Number> getStdHW()
public java.util.List<java.lang.Number> getStdVW()
public java.util.List<java.lang.Number> getStemSnapH()
public java.util.List<java.lang.Number> getStemSnapV()
public boolean isForceBold()
public int getLanguageGroup()
public byte[] getASCIISegment()
public byte[] getBinarySegment()
public java.lang.String toString()
toString
in class java.lang.Object