net.sourceforge.jeuclid.elements.support.text
Class CharacterMapping

java.lang.Object
  extended by net.sourceforge.jeuclid.elements.support.text.CharacterMapping
All Implemented Interfaces:
Serializable

public final class CharacterMapping
extends Object
implements Serializable

Version:
$Revision: 74b8e95997bf $
See Also:
Serialized Form

Method Summary
 CodePointAndVariant composeUnicodeChar(CodePointAndVariant split, boolean forbidHighplane)
          Compose a new SERIF Unicode char.
 CodePointAndVariant extractUnicodeAttr(CodePointAndVariant test)
          Extract the given char into variant and codepoint.
 List<CodePointAndVariant> getAllAlternatives(CodePointAndVariant cpav)
          Get all alternatives codePoints for this codePoint.
static CharacterMapping getInstance()
          Get the singleton instance of this class.
 boolean isMark(int codepoint)
          Checks if the given codepoint is a "marking" codepoint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static CharacterMapping getInstance()
Get the singleton instance of this class.

Returns:
an instance of CharacterMapping.

composeUnicodeChar

public CodePointAndVariant composeUnicodeChar(CodePointAndVariant split,
                                              boolean forbidHighplane)
Compose a new SERIF Unicode char. This function tries to compose the given char into a SERIF char which shows the same characteristics at a particular Unicode codepoint.

Parameters:
split - the char which contains a coidepoint and variant.
forbidHighplane - if the high plane is broken (e.g. on OS X).
Returns:
a CodePointAndVariant representing the same char.

extractUnicodeAttr

public CodePointAndVariant extractUnicodeAttr(CodePointAndVariant test)
Extract the given char into variant and codepoint.

Parameters:
test - the Unicode char to split up.
Returns:
A CodePointAndVariant representing the same character with explicit variant.

getAllAlternatives

public List<CodePointAndVariant> getAllAlternatives(CodePointAndVariant cpav)
Get all alternatives codePoints for this codePoint. They can be used if the original code point and variant is not available.

Parameters:
cpav - original CodePointAndVariant
Returns:
A List of alternative code points to check.

isMark

public boolean isMark(int codepoint)
Checks if the given codepoint is a "marking" codepoint. Marking codepoints do not display by themself, but are usually combined with the previous character.

Parameters:
codepoint - codepoint to check.
Returns:
true if this codepoint reprensents a mark.


Copyright © 2002-2010 The JEuclid project. All Rights Reserved.