public final class GlyphList
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static GlyphList |
DEFAULT |
private static org.apache.commons.logging.Log |
LOG |
private java.util.Map<java.lang.String,java.lang.String> |
nameToUnicode |
private java.util.Map<java.lang.String,java.lang.String> |
unicodeToName |
private java.util.Map<java.lang.String,java.lang.String> |
uniNameToUnicodeCache |
private static GlyphList |
ZAPF_DINGBATS |
Constructor and Description |
---|
GlyphList(GlyphList glyphList,
java.io.InputStream input)
Creates a new GlyphList from multiple glyph list files.
|
GlyphList(java.io.InputStream input,
int numberOfEntries)
Creates a new GlyphList from a glyph list file.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
codePointToName(int codePoint)
Returns the name for the given Unicode code point.
|
static GlyphList |
getAdobeGlyphList()
Returns the Adobe Glyph List (AGL).
|
static GlyphList |
getZapfDingbats()
Returns the Zapf Dingbats glyph list.
|
private static GlyphList |
load(java.lang.String filename,
int numberOfEntries)
Loads a glyph list from disk.
|
private void |
loadList(java.io.InputStream input) |
java.lang.String |
sequenceToName(java.lang.String unicodeSequence)
Returns the name for a given sequence of Unicode characters.
|
java.lang.String |
toUnicode(java.lang.String name)
Returns the Unicode character sequence for the given glyph name, or null if there isn't any.
|
private static final org.apache.commons.logging.Log LOG
private static final GlyphList DEFAULT
private static final GlyphList ZAPF_DINGBATS
private final java.util.Map<java.lang.String,java.lang.String> nameToUnicode
private final java.util.Map<java.lang.String,java.lang.String> unicodeToName
private final java.util.Map<java.lang.String,java.lang.String> uniNameToUnicodeCache
public GlyphList(java.io.InputStream input, int numberOfEntries) throws java.io.IOException
numberOfEntries
- number of expected values used to preallocate the correct amount of memoryinput
- glyph list in Adobe formatjava.io.IOException
- if the glyph list could not be readpublic GlyphList(GlyphList glyphList, java.io.InputStream input) throws java.io.IOException
glyphList
- an existing glyph list to be copiedinput
- glyph list in Adobe formatjava.io.IOException
- if the glyph list could not be readprivate static GlyphList load(java.lang.String filename, int numberOfEntries)
public static GlyphList getAdobeGlyphList()
public static GlyphList getZapfDingbats()
private void loadList(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public java.lang.String codePointToName(int codePoint)
codePoint
- Unicode code pointpublic java.lang.String sequenceToName(java.lang.String unicodeSequence)
unicodeSequence
- sequence of Unicode characterspublic java.lang.String toUnicode(java.lang.String name)
name
- PostScript glyph name