Class Encoding

java.lang.Object
org.verapdf.pd.font.Encoding

public class Encoding extends Object
Represents encoding of font as given in font dictionary.
Author:
Sergey Shemyakov
  • Constructor Details

    • Encoding

      public Encoding(ASAtom predefinedEncoding)
      Constructor for encoding of type COSName.
      Parameters:
      predefinedEncoding - is ASAtom value of Encoding.
    • Encoding

      public Encoding(String predefinedEncoding)
    • Encoding

      public Encoding(ASAtom baseEncoding, Map<Integer,String> differences)
      Constructor for encoding of type COSDictionary.
      Parameters:
      baseEncoding - is ASAtom representation of BaseEncoding entry in Encoding.
      differences - is Map representation of Differences entry in Encoding.
  • Method Details

    • empty

      public static Encoding empty()
    • getName

      public String getName(int code)
      Gets name of char for it's code via this encoding.
      Parameters:
      code - is character code.
      Returns:
      glyph name for given character code or null if the internal font encoding should be used.
    • containsCode

      public boolean containsCode(int code)
      Checks if mapping for given code is available.
      Parameters:
      code - is character code to check.
      Returns:
      true if encoding has mapping for this code.