Class Type1FontProgram

    • Field Detail

      • LOGGER

        public static final Logger LOGGER
      • OPERATORS_KEYWORDS

        public static final Set<String> OPERATORS_KEYWORDS
    • Method Detail

      • getWidth

        public float getWidth​(int charCode)
        Description copied from interface: FontProgram
        Returns width of glyph for given character code.
        Specified by:
        getWidth in interface FontProgram
        Parameters:
        charCode - is code for glyph.
        Returns:
        width of corresponding glyph or -1 if glyph is not found.
      • getWidth

        public float getWidth​(String glyphName)
        Description copied from interface: FontProgram
        Returns width of glyph for given glyph name.
        Specified by:
        getWidth in interface FontProgram
        Parameters:
        glyphName - is name for glyph.
        Returns:
        width of corresponding glyph or -1 if glyph is not found.
      • containsCode

        public boolean containsCode​(int code)
        Description copied from interface: FontProgram
        Checks if font contains character with given code.
        Specified by:
        containsCode in interface FontProgram
        Parameters:
        code - is character code.
        Returns:
        true if font contains character with given code.
      • containsGlyph

        public boolean containsGlyph​(String glyphName)
        Description copied from interface: FontProgram
        Checks if this font program has glyph for given glyph name.
        Specified by:
        containsGlyph in interface FontProgram
        Parameters:
        glyphName - is the name of glyph.
        Returns:
        true if this font program has glyph for given name.
      • containsCID

        public boolean containsCID​(int cid)
        Description copied from interface: FontProgram
        Method works only for fonts where cid notation is used.
        Specified by:
        containsCID in interface FontProgram
        Returns:
        true if font a is cid font and contains given cid.
      • isAttemptedParsing

        public boolean isAttemptedParsing()
        Specified by:
        isAttemptedParsing in interface FontProgram
        Returns:
        true if font parsing has been attempted.
      • isSuccessfulParsing

        public boolean isSuccessfulParsing()
        Specified by:
        isSuccessfulParsing in interface FontProgram
        Returns:
        true if font was successfully parsed.
      • getEncoding

        public String[] getEncoding()
        Returns:
        encoding from embedded font program as array of strings. encoding[i] = glyphName <-> i has name glyphName.
      • getCharSet

        public Set<String> getCharSet()
        Returns:
        charset from embedded program, i. e. set of all glyph names defined in the embedded font program.
      • getGlyphName

        public String getGlyphName​(int code)
        Description copied from interface: FontProgram
        Returns glyph name for glyph with given code.
        Specified by:
        getGlyphName in interface FontProgram
        Parameters:
        code - is code of glyph.
        Returns:
        glyph name.