Class AdobeGlyphList


  • public class AdobeGlyphList
    extends java.lang.Object
    Build an object which provides access to all the Adobe glyph names, using a unicode value, and which can translate a glyph name to one or more unicode values. # ################################################################################### # Copyright (c) 1997,1998,2002,2007 Adobe Systems Incorporated # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this documentation file to use, copy, publish, distribute, # sublicense, and/or sell copies of the documentation, and to permit # others to do the same, provided that: # - No modification, editing or other alteration of this document is # allowed; and # - The above copyright notice and this permission notice shall be # included in all copies of the documentation. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this documentation file, to create their own derivative works # from the content of this document to use, copy, publish, distribute, # sublicense, and/or sell the derivative works, and to permit others to do # the same, provided that the derived work is not represented as being a # copy or version of this document. # # Adobe shall not be liable to any party for any loss of revenue or profit # or for indirect, incidental, special, consequential, or other similar # damages, whether based on tort (including without limitation negligence # or strict liability), contract or other legal or equitable grounds even # if Adobe has been advised or had reason to know of the possibility of # such damages. The Adobe materials are provided on an "AS IS" basis. # Adobe specifically disclaims all express, statutory, or implied # warranties relating to the Adobe materials, including but not limited to # those concerning merchantability or fitness for a particular purpose or # non-infringement of any third party rights regarding the Adobe # materials. # ################################################################################### # Name: Adobe Glyph List # Table version: 2.0 # Date: September 20, 2002 # # See http://partners.adobe.com/asn/developer/typeforum/unicodegn.html # # Format: Semicolon-delimited fields: # (1) glyph name # (2) Unicode scalar value
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static java.lang.Thread glyphLoaderThread
      the loader thread we are reading through.
      private static java.util.HashMap<java.lang.String,​int[]> glyphToUnicodes
      provide a translation from a glyph name to the possible unicode values.
      private static java.util.HashMap<java.lang.Integer,​java.lang.String> unicodeToGlyph
      provide a translation from a unicode value to a glyph name.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private AdobeGlyphList()
      private constructor to restrict creation to a singleton.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getGlyphName​(int unicode)
      translate a unicode value into a glyph name.
      static java.lang.Integer getGlyphNameIndex​(java.lang.String glyphName)
      return a single index for a glyph, though there may be multiples.
      static int[] getUnicodeValues​(java.lang.String glyphName)
      translate a glyph name into the possible unicode values that it might represent.
      • Methods inherited from class java.lang.Object

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

      • glyphToUnicodes

        private static java.util.HashMap<java.lang.String,​int[]> glyphToUnicodes
        provide a translation from a glyph name to the possible unicode values.
      • unicodeToGlyph

        private static java.util.HashMap<java.lang.Integer,​java.lang.String> unicodeToGlyph
        provide a translation from a unicode value to a glyph name.
      • glyphLoaderThread

        static java.lang.Thread glyphLoaderThread
        the loader thread we are reading through.
    • Constructor Detail

      • AdobeGlyphList

        private AdobeGlyphList()

        private constructor to restrict creation to a singleton.

        We initialize by creating the storage and parsing the glyphlist into the tables.

    • Method Detail

      • getUnicodeValues

        public static int[] getUnicodeValues​(java.lang.String glyphName)
        translate a glyph name into the possible unicode values that it might represent. It is possible to have more than one unicode value for a single glyph name.
        Parameters:
        glyphName -
        Returns:
        int[]
      • getGlyphNameIndex

        public static java.lang.Integer getGlyphNameIndex​(java.lang.String glyphName)
        return a single index for a glyph, though there may be multiples.
        Parameters:
        glyphName -
        Returns:
        Integer
      • getGlyphName

        public static java.lang.String getGlyphName​(int unicode)
        translate a unicode value into a glyph name. It is possible for different unicode values to translate into the same glyph name.
        Parameters:
        unicode -
        Returns:
        String