Class OpenTypeScript

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private OpenTypeScript()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static void ensureValidCodePoint​(int codePoint)  
      static java.lang.String[] getScriptTags​(int codePoint)
      Obtain the OpenType script tags associated with the given Unicode codepoint.
      private static java.lang.String getUnicodeScript​(int codePoint)
      Obtain the Unicode script associated with the given Unicode codepoint.
      private static void parseScriptsFile​(java.io.InputStream inputStream)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LOG

        private static final org.apache.commons.logging.Log LOG
      • UNICODE_SCRIPT_TO_OPENTYPE_TAG_MAP

        private static final java.util.Map<java.lang.String,​java.lang.String[]> UNICODE_SCRIPT_TO_OPENTYPE_TAG_MAP
        A map associating Unicode scripts with one or more OpenType script tags. Script tags are not necessarily the same as Unicode scripts. A single Unicode script may correspond to multiple tags, especially when there has been a revision to the latter (e.g. Bengali -> [bng2, beng]). When there are multiple tags, they are ordered from newest to oldest.
        See Also:
        Microsoft Typography: Script Tags
      • unicodeRangeStarts

        private static int[] unicodeRangeStarts
      • unicodeRangeScripts

        private static java.lang.String[] unicodeRangeScripts
    • Constructor Detail

      • OpenTypeScript

        private OpenTypeScript()
    • Method Detail

      • parseScriptsFile

        private static void parseScriptsFile​(java.io.InputStream inputStream)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • getUnicodeScript

        private static java.lang.String getUnicodeScript​(int codePoint)
        Obtain the Unicode script associated with the given Unicode codepoint.
        Parameters:
        codePoint -
        Returns:
        A Unicode script string, or #UNKNOWN if unknown
      • getScriptTags

        public static java.lang.String[] getScriptTags​(int codePoint)
        Obtain the OpenType script tags associated with the given Unicode codepoint. The result may contain the special value #INHERITED, which indicates that the codepoint's script can only be determined by its context. Unknown codepoints are mapped to #TAG_DEFAULT.
        Parameters:
        codePoint -
        Returns:
        An array of four-char script tags
      • ensureValidCodePoint

        private static void ensureValidCodePoint​(int codePoint)