Class CharacterMapping

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

public final class CharacterMapping extends Object implements Serializable
Version:
$Revision: a96da3a7efbd $
See Also:
  • Method Details

    • 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.