org.apache.fontbox.cff.encoding
abstract public class: CFFEncoding [javadoc |
source]
java.lang.Object
org.apache.fontbox.cff.encoding.CFFEncoding
Direct Known Subclasses:
EmbeddedEncoding, Format1Encoding, PDFEncoding, CFFExpertEncoding, CFFStandardEncoding, Format0Encoding
This is the superclass for all CFFFont encodings.
- author:
Villu
- Ruusmann
- version:
$
- Revision$
Nested Class Summary: |
---|
public static class | CFFEncoding.Entry | This class represents a single code/SID mapping of the encoding. |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from org.apache.fontbox.cff.encoding.CFFEncoding Detail: |
public int getCode(int sid) {
for(Entry entry : entries)
{
if(entry.entrySID == sid)
{
return entry.entryCode;
}
}
return -1;
}
Returns the code corresponding to the given SID. |
public List<Entry> getEntries() {
return entries;
}
A list of all entries within this encoding. |
public int getSID(int code) {
for(Entry entry : entries)
{
if(entry.entryCode == code)
{
return entry.entrySID;
}
}
return -1;
}
Returns the SID corresponding to the given code. |
public boolean isFontSpecific() {
return false;
}
Determines if the encoding is font specific or not. |
public void register(int code,
int sid) {
entries.add(new Entry(code, sid));
}
Adds a new code/SID combination to the encoding. |