org.apache.fontbox.cff

Class CFFFont

public class CFFFont extends Object

This class represents a CFF/Type2 Font.

Version: $Revision$

Author: Villu Russmann

Nested Class Summary
classCFFFont.Mapping
This class is used for the font mapping.
Method Summary
voidaddValueToPrivateDict(String name, Object value)
Adds the given key/value pair to the private dictionary.
voidaddValueToTopDict(String name, Object value)
Adds the given key/value pair to the top dictionary.
CharStringConvertercreateConverter()
Creates a CharStringConverter for this font.
CharStringRenderercreateRenderer()
Creates a CharStringRenderer for this font.
CFFCharsetgetCharset()
Returns the CFFCharset of the font.
Map<String,byte[]>getCharStringsDict()
Returns the character strings dictionary.
CFFEncodinggetEncoding()
Returns the CFFEncoding of the font.
Collection<CFFFont.Mapping>getMappings()
Get the mapping (code/SID/charname/bytes) for this font.
StringgetName()
The name of the font.
Map<String,Object>getPrivateDict()
Returns the private dictionary.
ObjectgetProperty(String name)
Returns the value for the given name from the dictionary.
Map<String,Object>getTopDict()
Returns the top dictionary.
voidsetCharset(CFFCharset charset)
Sets the CFFCharset of the font.
voidsetEncoding(CFFEncoding encoding)
Sets the CFFEncoding of the font.
voidsetName(String name)
Sets the name of the font.
StringtoString()

Method Detail

addValueToPrivateDict

public void addValueToPrivateDict(String name, Object value)
Adds the given key/value pair to the private dictionary.

Parameters: name the given key value the given value

addValueToTopDict

public void addValueToTopDict(String name, Object value)
Adds the given key/value pair to the top dictionary.

Parameters: name the given key value the given value

createConverter

public CharStringConverter createConverter()
Creates a CharStringConverter for this font.

Returns: the new CharStringConverter

createRenderer

public CharStringRenderer createRenderer()
Creates a CharStringRenderer for this font.

Returns: the new CharStringRenderer

getCharset

public CFFCharset getCharset()
Returns the CFFCharset of the font.

Returns: the charset

getCharStringsDict

public Map<String,byte[]> getCharStringsDict()
Returns the character strings dictionary.

Returns: the dictionary

getEncoding

public CFFEncoding getEncoding()
Returns the CFFEncoding of the font.

Returns: the encoding

getMappings

public Collection<CFFFont.Mapping> getMappings()
Get the mapping (code/SID/charname/bytes) for this font.

Returns: mappings for codes < 256 and for codes > = 256

getName

public String getName()
The name of the font.

Returns: the name of the font

getPrivateDict

public Map<String,Object> getPrivateDict()
Returns the private dictionary.

Returns: the dictionary

getProperty

public Object getProperty(String name)
Returns the value for the given name from the dictionary.

Parameters: name the name of the value

Returns: the value of the name if available

getTopDict

public Map<String,Object> getTopDict()
Returns the top dictionary.

Returns: the dictionary

setCharset

public void setCharset(CFFCharset charset)
Sets the CFFCharset of the font.

Parameters: charset the given CFFCharset

setEncoding

public void setEncoding(CFFEncoding encoding)
Sets the CFFEncoding of the font.

Parameters: encoding the given CFFEncoding

setName

public void setName(String name)
Sets the name of the font.

Parameters: name the name of the font

toString

public String toString()
{@inheritDoc }
Copyright © 2008-2010 Apache Software Foundation. All Rights Reserved.