Class CharacterMapping
- java.lang.Object
-
- net.sourceforge.jeuclid.elements.support.text.CharacterMapping
-
- All Implemented Interfaces:
java.io.Serializable
public final class CharacterMapping extends java.lang.Object implements java.io.Serializable- Version:
- $Revision: a96da3a7efbd $
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CodePointAndVariantcomposeUnicodeChar(CodePointAndVariant split, boolean forbidHighplane)Compose a new SERIF Unicode char.CodePointAndVariantextractUnicodeAttr(CodePointAndVariant test)Extract the given char into variant and codepoint.java.util.List<CodePointAndVariant>getAllAlternatives(CodePointAndVariant cpav)Get all alternatives codePoints for this codePoint.static CharacterMappinggetInstance()Get the singleton instance of this class.
-
-
-
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
CodePointAndVariantrepresenting the same character with explicit variant.
-
getAllAlternatives
public java.util.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.
-
-