org.apache.fop.fonts

Class Glyphs


public class Glyphs
extends java.lang.Object

This class provides a number of constants for glyph management.

Field Summary

static String[]
MAC_GLYPH_NAMES
Glyph names for Mac encoding
static String
NOTDEF
Glyph name for the "notdef" glyph
static String[]
TEX8R_GLYPH_NAMES
Glyph names for tex8r encoding
static String[]
UNICODE_GLYPHS
List of unicode glyphs
static char[]
WINANSI_ENCODING
The characters in WinAnsiEncoding

Method Summary

static String
charToGlyphName(char ch)
Return the glyphname from a character, eg, charToGlyphName('\\') returns "backslash"
static String
glyphToString(String name)
Return the glyphname from a string, eg, glyphToString("\\") returns "backslash"
static String
stringToGlyph(String name)
Return the string representation of a glyphname, eg stringToGlyph("backslash") returns "\\"

Field Details

MAC_GLYPH_NAMES

public static final String[] MAC_GLYPH_NAMES
Glyph names for Mac encoding

NOTDEF

public static final String NOTDEF
Glyph name for the "notdef" glyph

TEX8R_GLYPH_NAMES

public static final String[] TEX8R_GLYPH_NAMES
Glyph names for tex8r encoding

UNICODE_GLYPHS

public static final String[] UNICODE_GLYPHS
List of unicode glyphs

WINANSI_ENCODING

public static final char[] WINANSI_ENCODING
The characters in WinAnsiEncoding

Method Details

charToGlyphName

public static final String charToGlyphName(char ch)
Return the glyphname from a character, eg, charToGlyphName('\\') returns "backslash"
Parameters:
ch - glyph to evaluate
Returns:
the name of the glyph

glyphToString

public static final String glyphToString(String name)
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 TODO: Improve method names

stringToGlyph

public static String stringToGlyph(String name)
Return the string representation of a glyphname, eg stringToGlyph("backslash") returns "\\"
Parameters:
name - name of the glyph
Returns:
the string representation

Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.