Class GlyphList
- java.lang.Object
-
- com.tom_roush.pdfbox.pdmodel.font.encoding.GlyphList
-
public final class GlyphList extends Object
PostScript glyph list, maps glyph names to sequences of Unicode characters. Instances of GlyphList are immutable.
-
-
Constructor Summary
Constructors Constructor Description GlyphList(GlyphList glyphList, InputStream input)Creates a new GlyphList from multiple glyph list files.GlyphList(InputStream input, int numberOfEntries)Creates a new GlyphList from a glyph list file.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcodePointToName(int codePoint)Returns the name for the given Unicode code point.static GlyphListgetAdobeGlyphList()Returns the Adobe Glyph List (AGL).static GlyphListgetZapfDingbats()Returns the Zapf Dingbats glyph list.StringsequenceToName(String unicodeSequence)Returns the name for a given sequence of Unicode characters.StringtoUnicode(String name)Returns the Unicode character sequence for the given glyph name, or null if there isn't any.
-
-
-
Constructor Detail
-
GlyphList
public GlyphList(InputStream input, int numberOfEntries) throws IOException
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
public GlyphList(GlyphList glyphList, InputStream input) throws IOException
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 Detail
-
getAdobeGlyphList
public static GlyphList getAdobeGlyphList()
Returns the Adobe Glyph List (AGL).
-
getZapfDingbats
public static GlyphList getZapfDingbats()
Returns the Zapf Dingbats glyph list.
-
codePointToName
public String codePointToName(int codePoint)
Returns the name for the given Unicode code point.- Parameters:
codePoint- Unicode code point- Returns:
- PostScript glyph name, or ".notdef"
-
sequenceToName
public String sequenceToName(String unicodeSequence)
Returns the name for a given sequence of Unicode characters.- Parameters:
unicodeSequence- sequence of Unicode characters- Returns:
- PostScript glyph name, or ".notdef"
-
-