Unified Typesetting API M1-20040817

de.inghuimische.uta.typeset
Interface Glyph

All Superinterfaces:
Box
All Known Implementing Classes:
AbstractGlyph

public interface Glyph
extends Box

A glyph is the graphical representation of a character.

Typesetters generate a list of empty (i.e. not initialized) glyphs from a list of characters (i.e. a string). Scripts have to fill required values in (primary the glyph index), substitute several glyphs if necessary and place them.

Author:
Christian Ziesemer

Field Summary
static int NO_CHARACTER
          0xFFFF is guaranteed to be no Unicode code point.
 
Method Summary
 int getCharacter()
          Returns the character represented by this glyph, if there are more than one characters this method returns the first one.
 int[] getCharacters()
          Returns a array of characters represented by this glyph.
 int getGlyphIndex()
          Returns the glyph index.
 List getSubstitutedGlyphs()
          Returns a list of glyphs substituted by this one, or null if there are no substituted glyphs.
 boolean isSubstituting()
          Tells whether this glyph is substituting several others.
 void setGlyphIndex(int i)
          Sets the index of this glyph.
 
Methods inherited from interface de.inghuimische.uta.typeset.Box
getAnchors, getAnchorsByClass, getAttributes, getBoundingBox, getShape, getTransformation, setTransformation
 

Field Detail

NO_CHARACTER

public static final int NO_CHARACTER
0xFFFF is guaranteed to be no Unicode code point.

See Also:
Constant Field Values
Method Detail

getGlyphIndex

public int getGlyphIndex()
Returns the glyph index. This value may differ from font to font for the same character.

Returns:
The glyph index. This value may differ from font to font for the same character.

setGlyphIndex

public void setGlyphIndex(int i)
Sets the index of this glyph. This is done by a Script. The value depends on the font used.

Parameters:
i - The index of the glyph.

getCharacter

public int getCharacter()
Returns the character represented by this glyph, if there are more than one characters this method returns the first one. If no character is set thie method returns NO_CHARACTER.

Returns:
The character represented by this glyph, if there are more than one characters this method returns the first one.

getCharacters

public int[] getCharacters()
Returns a array of characters represented by this glyph.

Returns:
a array of characters represented by this glyph.

getSubstitutedGlyphs

public List getSubstitutedGlyphs()
Returns a list of glyphs substituted by this one, or null if there are no substituted glyphs.

Returns:
A list of glyphs substituted by this one, or null if there are no substituted glyphs.

isSubstituting

public boolean isSubstituting()
Tells whether this glyph is substituting several others.

Returns:
true if this glyph substitutes other one, false if it is a single glyph.

Unified Typesetting API M1-20040817


An inghuimische.de project.
Copyright (C) 2004 Christian Ziesemer; See the Mozilla Public License for more details.