Package org.apache.fontbox.cff.encoding
Class CFFEncoding
java.lang.Object
org.apache.fontbox.cff.encoding.CFFEncoding
- Direct Known Subclasses:
CFFExpertEncoding,CFFStandardEncoding
This is the superclass for all CFFFont encodings.
- Version:
- $Revision$
- Author:
- Villu Ruusmann
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis class represents a single code/SID mapping of the encoding. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEntry(CFFEncoding.Entry entry) Add a single entry.intgetCode(int sid) Returns the code corresponding to the given SID.A list of all entries within this encoding.intgetSID(int code) Returns the SID corresponding to the given code.booleanDetermines if the encoding is font specific or not.voidregister(int code, int sid) Adds a new code/SID combination to the encoding.
-
Constructor Details
-
CFFEncoding
public CFFEncoding()
-
-
Method Details
-
isFontSpecific
public boolean isFontSpecific()Determines if the encoding is font specific or not.- Returns:
- if the encoding is font specific
-
getCode
public int getCode(int sid) Returns the code corresponding to the given SID.- Parameters:
sid- the given SID- Returns:
- the corresponding code
-
getSID
public int getSID(int code) Returns the SID corresponding to the given code.- Parameters:
code- the given code- Returns:
- the corresponding SID
-
register
public void register(int code, int sid) Adds a new code/SID combination to the encoding.- Parameters:
code- the given codesid- the given SID
-
addEntry
Add a single entry.- Parameters:
entry- the entry to be added
-
getEntries
A list of all entries within this encoding.- Returns:
- a list of all entries
-