public class CFFFont extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
CFFFont.DictNumberItem
A dictionary number on the list.
|
protected static class |
CFFFont.DictOffsetItem
An unknown offset in a dictionary for the list.
|
protected class |
CFFFont.Font
Represents font contained by the CFF font in a FontSet.
|
protected static class |
CFFFont.IndexBaseItem |
protected static class |
CFFFont.IndexMarkerItem |
protected static class |
CFFFont.IndexOffsetItem
An index-offset item for the list.
|
protected static class |
CFFFont.Item
List items for the linked list that builds the new CID font.
|
protected static class |
CFFFont.MarkerItem
An offset-marker item for the list.
|
protected static class |
CFFFont.OffsetItem
An offset item, representing a data object.
|
protected static class |
CFFFont.RangeItem
A range item.
|
protected static class |
CFFFont.StringItem
A String item
|
protected static class |
CFFFont.SubrMarkerItem |
protected static class |
CFFFont.UInt16Item
A SID or Card16 item.
|
protected static class |
CFFFont.UInt24Item
Card24 item.
|
protected static class |
CFFFont.UInt32Item
A Card32 item.
|
protected static class |
CFFFont.UInt8Item
A Card8 item.
|
| Modifier and Type | Field and Description |
|---|---|
protected int |
arg_count |
protected Object[] |
args |
protected RandomAccessFileOrArray |
buf
A random Access File or an array
|
protected CFFFont.Font[] |
fonts |
protected int |
gsubrIndexOffset |
protected int[] |
gsubrOffsets |
protected String |
key |
protected int |
nameIndexOffset |
protected int[] |
nameOffsets |
protected int |
stringIndexOffset |
protected int[] |
stringOffsets |
protected int |
topdictIndexOffset |
protected int[] |
topdictOffsets |
| Constructor and Description |
|---|
CFFFont(byte[] cff)
Creates a new CFF font instance from CFF font data.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists(String fontName)
Checks for font existence in FontSet.
|
byte[] |
getCID(String fontName)
Gets a single CID font.
|
protected void |
getDictItem() |
protected CFFFont.RangeItem |
getEntireIndexRange(int indexOffset)
A utility that creates a range item for an entire index
|
String[] |
getNames()
Gets all font names from FontSet table.
|
String |
getString(char sid)
Gets string from INDEX structure which corresponds to provided SID.
|
boolean |
isCID()
Determines whether the first font in FontSet is CID font.
|
boolean |
isCID(String fontName)
Determines whether specified font is CID font.
|
protected String key
protected Object[] args
protected int arg_count
protected RandomAccessFileOrArray buf
protected int nameIndexOffset
protected int topdictIndexOffset
protected int stringIndexOffset
protected int gsubrIndexOffset
protected int[] nameOffsets
protected int[] topdictOffsets
protected int[] stringOffsets
protected int[] gsubrOffsets
protected CFFFont.Font[] fonts
public CFFFont(byte[] cff)
cff - cff font binary datapublic String getString(char sid)
sid - 2-byte string identifierprotected void getDictItem()
protected CFFFont.RangeItem getEntireIndexRange(int indexOffset)
indexOffset - where the index ispublic byte[] getCID(String fontName)
fontName - name of the fontpublic boolean isCID()
true if font is CID, false otherwisepublic boolean isCID(String fontName)
fontName - font name to check in fonts tabletrue if specified font is CID, false otherwisepublic boolean exists(String fontName)
fontName - font name to search fortrue if font exists in FontSet, false otherwisepublic String[] getNames()
Copyright © 1998–2025 Apryse Group NV. All rights reserved.