Class Glyphs
java.lang.Object
org.apache.xmlgraphics.fonts.Glyphs
This class provides a number of constants for glyph management.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final char[]The characters in AdobeStandardCyrillicEncodingprivate static final Mapprivate static final Mapprivate static final String[]static final String[]Deprecated.That array was supposed to represent the standard Macintosh ordering of glyphs in a TrueType font (it does NOT correspond to the MacRoman encoding).static final StringGlyph name for the "notdef" glyphstatic final String[]Glyph names for tex8r encodingprivate static final String[]List of unicode glyphsstatic final char[]The characters in WinAnsiEncoding -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddAlternatives(Map map, String[] alternatives) static StringcharToGlyphName(char ch) Return the glyphname from a character, eg, charToGlyphName('\\') returns "backslash"static String[]getCharNameAlternativesFor(String charName) Returns an array of char names which can serve as alternatives for the given one.static StringgetUnicodeSequenceForGlyphName(String glyphName) Returns a String containing the Unicode sequence the given glyph name represents.static StringglyphToString(String name) Deprecated.User getUnicodeCodePointsForGlyphName instead.private static charprivate static String[]loadGlyphList(String filename, Map charNameToUnicodeMap) static StringstringToGlyph(String name) Return the string representation of a glyphname, eg stringToGlyph("backslash") returns "\\"
-
Field Details
-
NOTDEF
-
MAC_GLYPH_NAMES
Deprecated.That array was supposed to represent the standard Macintosh ordering of glyphs in a TrueType font (it does NOT correspond to the MacRoman encoding). In addition some entries are incorrect.Glyph names for Mac encoding -
TEX8R_GLYPH_NAMES
Glyph names for tex8r encoding -
WINANSI_ENCODING
public static final char[] WINANSI_ENCODINGThe characters in WinAnsiEncoding -
ADOBECYRILLIC_ENCODING
public static final char[] ADOBECYRILLIC_ENCODINGThe characters in AdobeStandardCyrillicEncoding -
UNICODE_GLYPHS
List of unicode glyphs -
DINGBATS_GLYPHS
-
CHARNAME_ALTERNATIVES
-
CHARNAMES_TO_UNICODE
-
-
Constructor Details
-
Glyphs
private Glyphs()
-
-
Method Details
-
addAlternatives
-
loadGlyphList
-
hexToChar
-
charToGlyphName
Return the glyphname from a character, eg, charToGlyphName('\\') returns "backslash"- Parameters:
ch- glyph to evaluate- Returns:
- the name of the glyph
-
getUnicodeSequenceForGlyphName
-
glyphToString
Deprecated.User getUnicodeCodePointsForGlyphName instead. This method only returns the first Unicode code point it finds.Return the glyphname from a string, eg, glyphToString("\\") returns "backslash"- Parameters:
name- glyph to evaluate- Returns:
- the name of the glyph TODO: javadocs for glyphToString and stringToGlyph are confused
-
stringToGlyph
-
getCharNameAlternativesFor
-