public final class Type1Font extends Object implements Type1CharStringReader, EncodedFont, FontBoxFont
Modifier and Type | Method and Description |
---|---|
static Type1Font |
createWithPFB(byte[] pfbBytes)
Constructs a new Type1Font object from a .pfb stream.
|
static Type1Font |
createWithPFB(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.
|
List<Number> |
getBlueValues()
Returns the blues values.
|
Map<String,byte[]> |
getCharStringsDict()
Returns the /CharStrings dictionary as raw bytes.
|
Encoding |
getEncoding()
Returns the Encoding, if present.
|
List<Number> |
getFamilyBlues()
Returns the family blues values.
|
String |
getFamilyName()
Returns the family name.
|
List<Number> |
getFamilyOtherBlues()
Returns the other family blues values.
|
BoundingBox |
getFontBBox()
Returns the font bounding box.
|
String |
getFontID()
Returns the font ID.
|
List<Number> |
getFontMatrix()
Returns the font matrix.
|
String |
getFontName()
Returns the font name.
|
int |
getFontType()
Returns the font type.
|
String |
getFullName()
Returns the full name.
|
float |
getItalicAngle()
Returns the italic angle.
|
int |
getLanguageGroup()
Returns the language group.
|
String |
getName()
The PostScript name of the font.
|
String |
getNotice()
Returns the notice.
|
List<Number> |
getOtherBlues()
Returns the other blues values.
|
int |
getPaintType()
Returns the paint type.
|
GeneralPath |
getPath(String name)
Returns the path for the character with the given name.
|
List<Number> |
getStdHW()
Returns the StdHW value.
|
List<Number> |
getStdVW()
Returns the StdVW value.
|
List<Number> |
getStemSnapH()
Returns the StemSnapH value.
|
List<Number> |
getStemSnapV()
Returns the StemSnapV value.
|
float |
getStrokeWidth()
Returns the stroke width.
|
List<byte[]> |
getSubrsArray()
Returns the /Subrs array as raw bytes.
|
Type1CharString |
getType1CharString(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.
|
String |
getVersion()
Returns the version.
|
String |
getWeight()
Returns the weight.
|
float |
getWidth(String name)
Returns the advance width for the character with the given name.
|
boolean |
hasGlyph(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.
|
String |
toString() |
public static Type1Font createWithPFB(InputStream pfbStream) throws IOException
pfbStream
- .pfb input stream, including headersIOException
- if something went wrongpublic static Type1Font createWithPFB(byte[] pfbBytes) throws IOException
pfbBytes
- .pfb data, including headersIOException
- if something went wrongpublic static Type1Font createWithSegments(byte[] segment1, byte[] segment2) throws IOException
segment1
- The first segment, without headersegment2
- The second segment, without headerIOException
- if something went wrongpublic List<byte[]> getSubrsArray()
public Map<String,byte[]> getCharStringsDict()
public String getName()
FontBoxFont
getName
in interface FontBoxFont
public GeneralPath getPath(String name) throws IOException
FontBoxFont
getPath
in interface FontBoxFont
IOException
- if the path could not be readpublic float getWidth(String name) throws IOException
FontBoxFont
getWidth
in interface FontBoxFont
IOException
- if the path could not be readpublic boolean hasGlyph(String name)
FontBoxFont
hasGlyph
in interface FontBoxFont
name
- PostScript glyph namepublic Type1CharString getType1CharString(String name) throws IOException
Type1CharStringReader
getType1CharString
in interface Type1CharStringReader
IOException
- if something went wrongpublic String getFontName()
public Encoding getEncoding()
getEncoding
in interface EncodedFont
public int getPaintType()
public int getFontType()
public List<Number> getFontMatrix()
getFontMatrix
in interface FontBoxFont
public BoundingBox getFontBBox()
getFontBBox
in interface FontBoxFont
public int getUniqueID()
public float getStrokeWidth()
public String getFontID()
public String getVersion()
public String getNotice()
public String getFullName()
public String getFamilyName()
public String getWeight()
public float getItalicAngle()
public boolean isFixedPitch()
public float getUnderlinePosition()
public float getUnderlineThickness()
public List<Number> getBlueValues()
public List<Number> getOtherBlues()
public List<Number> getFamilyBlues()
public List<Number> getFamilyOtherBlues()
public float getBlueScale()
public int getBlueShift()
public int getBlueFuzz()
public List<Number> getStemSnapH()
public List<Number> getStemSnapV()
public boolean isForceBold()
public int getLanguageGroup()
public byte[] getASCIISegment()
public byte[] getBinarySegment()
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.