public class CFFFont extends Object
Modifier and Type | Class and Description |
---|---|
class |
CFFFont.Mapping
This class is used for the font mapping.
|
Constructor and Description |
---|
CFFFont() |
Modifier and Type | Method and Description |
---|---|
void |
addValueToPrivateDict(String name,
Object value)
Adds the given key/value pair to the private dictionary.
|
void |
addValueToTopDict(String name,
Object value)
Adds the given key/value pair to the top dictionary.
|
CharStringConverter |
createConverter()
Creates a CharStringConverter for this font.
|
CharStringRenderer |
createRenderer()
Creates a CharStringRenderer for this font.
|
CFFCharset |
getCharset()
Returns the CFFCharset of the font.
|
Map<String,byte[]> |
getCharStringsDict()
Returns the character strings dictionary.
|
CFFEncoding |
getEncoding()
Returns the CFFEncoding of the font.
|
IndexData |
getGlobalSubrIndex()
Returns the global subroutine index data.
|
IndexData |
getLocalSubrIndex()
Returns the local subroutine index data.
|
Collection<CFFFont.Mapping> |
getMappings()
Get the mapping (code/SID/charname/bytes) for this font.
|
String |
getName()
The name of the font.
|
protected int |
getNotDefWidth(int defaultWidth,
int nominalWidth) |
Map<String,Object> |
getPrivateDict()
Returns the private dictionary.
|
Object |
getProperty(String name)
Returns the value for the given name from the dictionary.
|
Map<String,Object> |
getTopDict()
Returns the top dictionary.
|
int |
getWidth(int SID)
Return the Width value of the given Glyph identifier
|
void |
setCharset(CFFCharset charset)
Sets the CFFCharset of the font.
|
void |
setEncoding(CFFEncoding encoding)
Sets the CFFEncoding of the font.
|
void |
setGlobalSubrIndex(IndexData globalSubrIndex)
Sets the global subroutine index data.
|
void |
setLocalSubrIndex(IndexData localSubrIndex)
Sets the local subroutine index data.
|
void |
setName(String name)
Sets the name of the font.
|
String |
toString() |
public String getName()
public void setName(String name)
name
- the name of the fontpublic Object getProperty(String name)
name
- the name of the valuepublic void addValueToTopDict(String name, Object value)
name
- the given keyvalue
- the given valuepublic Map<String,Object> getTopDict()
public void addValueToPrivateDict(String name, Object value)
name
- the given keyvalue
- the given valuepublic Map<String,Object> getPrivateDict()
public Collection<CFFFont.Mapping> getMappings()
public int getWidth(int SID) throws IOException
SID
- IOException
protected int getNotDefWidth(int defaultWidth, int nominalWidth) throws IOException
IOException
public CFFEncoding getEncoding()
public void setEncoding(CFFEncoding encoding)
encoding
- the given CFFEncodingpublic CFFCharset getCharset()
public void setCharset(CFFCharset charset)
charset
- the given CFFCharsetpublic Map<String,byte[]> getCharStringsDict()
public CharStringConverter createConverter()
public CharStringRenderer createRenderer()
public void setGlobalSubrIndex(IndexData globalSubrIndex)
globalSubrIndex
- the IndexData object containing the global subroutinespublic IndexData getGlobalSubrIndex()
public IndexData getLocalSubrIndex()
public void setLocalSubrIndex(IndexData localSubrIndex)
localSubrIndex
- the IndexData object containing the local subroutinesCopyright © 2008–2018. All rights reserved.