Class GlyphList
java.lang.Object
org.apache.pdfbox.pdmodel.font.encoding.GlyphList
PostScript glyph list, maps glyph names to sequences of Unicode characters.
Instances of GlyphList are immutable.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGlyphList(InputStream input, int numberOfEntries) Creates a new GlyphList from a glyph list file.GlyphList(GlyphList glyphList, InputStream input) Creates a new GlyphList from multiple glyph list files. -
Method Summary
Modifier and TypeMethodDescriptioncodePointToName(int codePoint) Returns the name for the given Unicode code point.static GlyphListReturns the Adobe Glyph List (AGL).static GlyphListReturns the Zapf Dingbats glyph list.private static GlyphListLoads a glyph list from disk.private voidloadList(InputStream input) sequenceToName(String unicodeSequence) Returns the name for a given sequence of Unicode characters.Returns the Unicode character sequence for the given glyph name, or null if there isn't any.
-
Field Details
-
LOG
private static final org.apache.commons.logging.Log LOG -
DEFAULT
-
ZAPF_DINGBATS
-
nameToUnicode
-
unicodeToName
-
uniNameToUnicodeCache
-
-
Constructor Details
-
GlyphList
Creates a new GlyphList from a glyph list file.- Parameters:
numberOfEntries- number of expected values used to preallocate the correct amount of memoryinput- glyph list in Adobe format- Throws:
IOException- if the glyph list could not be read
-
GlyphList
Creates a new GlyphList from multiple glyph list files.- Parameters:
glyphList- an existing glyph list to be copiedinput- glyph list in Adobe format- Throws:
IOException- if the glyph list could not be read
-
-
Method Details
-
load
Loads a glyph list from disk. -
getAdobeGlyphList
Returns the Adobe Glyph List (AGL). -
getZapfDingbats
Returns the Zapf Dingbats glyph list. -
loadList
- Throws:
IOException
-
codePointToName
Returns the name for the given Unicode code point.- Parameters:
codePoint- Unicode code point- Returns:
- PostScript glyph name, or ".notdef"
-
sequenceToName
Returns the name for a given sequence of Unicode characters.- Parameters:
unicodeSequence- sequence of Unicode characters- Returns:
- PostScript glyph name, or ".notdef"
-
toUnicode
Returns the Unicode character sequence for the given glyph name, or null if there isn't any.- Parameters:
name- PostScript glyph name- Returns:
- Unicode character(s), or null.
-