com.aspose.font

Interfaces

Classes

Enums

Exceptions

com.aspose.font

Class FontMetrics

    • Method Detail

      • getAscender

        public double getAscender()

        Gets Ascender value.

        Specified by:
        getAscender in interface IFontMetrics
        Returns:
        Ascender value.
      • setAscender

        public void setAscender(double value)

        Sets Ascender value.

        Specified by:
        setAscender in interface IFontMetrics
        Parameters:
        value - Ascender value.
      • getDescender

        public double getDescender()

        Gets Descender value.

        Specified by:
        getDescender in interface IFontMetrics
        Returns:
        Descender value.
      • setDescender

        public void setDescender(double value)

        Sets Descender value.

        Specified by:
        setDescender in interface IFontMetrics
        Parameters:
        value - Descender value.
      • getTypoDescender

        public double getTypoDescender()

        Gets TypoDescender value.

        Specified by:
        getTypoDescender in interface IFontMetrics
        Returns:
        TypoDescender value.
      • setTypoDescender

        public void setTypoDescender(double value)

        Sets TypoDescender value.

        Specified by:
        setTypoDescender in interface IFontMetrics
        Parameters:
        value - TypoDescender value.
      • getTypoAscender

        public double getTypoAscender()

        Gets TypoAscender value.

        Specified by:
        getTypoAscender in interface IFontMetrics
        Returns:
        TypoAscender value.
      • setTypoAscender

        public void setTypoAscender(double value)

        Sets TypoAscender value.

        Specified by:
        setTypoAscender in interface IFontMetrics
        Parameters:
        value - TypoAscender value.
      • getLineGap

        public double getLineGap()

        Gets LineGap value.

        Specified by:
        getLineGap in interface IFontMetrics
        Returns:
        LineGap value.
      • getTypoLineGap

        public double getTypoLineGap()

        Gets TypoLineGap value.

        Specified by:
        getTypoLineGap in interface IFontMetrics
        Returns:
        TypoLineGap value.
      • isFixedPitch

        public boolean isFixedPitch()

        Gets IsFixedPitch value.

        Specified by:
        isFixedPitch in interface IFontMetrics
        Returns:
        IsFixedPitch value.
      • getUnitsPerEM

        public long getUnitsPerEM()

        Gets UnitsPerEM value.

        Specified by:
        getUnitsPerEM in interface IFontMetrics
        Returns:
        UnitsPerEM value.
      • setUnitsPerEM

        public void setUnitsPerEM(long value)

        Sets UnitsPerEM value.

        Specified by:
        setUnitsPerEM in interface IFontMetrics
        Parameters:
        value - UnitsPerEM value.
      • getKerningValue

        public double getKerningValue(GlyphId prevGlyphId,
                                      GlyphId nextGlyphId)

        Returns kerning value for the glyph pair.

        Specified by:
        getKerningValue in interface IFontMetrics
        Parameters:
        prevGlyphId - First glyph in pair.
        nextGlyphId - Font size.
        Returns:
        Kerning value.
      • getAscender

        public double getAscender(double fontSize)

        Returns ascender for specific Font size.

        Specified by:
        getAscender in interface IFontMetrics
        Parameters:
        fontSize - Font size.
        Returns:
        Ascender value.
      • getDescender

        public double getDescender(double fontSize)

        Returns descender for specific Font size.

        Specified by:
        getDescender in interface IFontMetrics
        Parameters:
        fontSize - Font size.
        Returns:
        Descender value.
      • getTypoDescender

        public double getTypoDescender(double fontSize)

        Returns typographic descender for specific font size

        param fontSize Font size.
        Specified by:
        getTypoDescender in interface IFontMetrics
        Parameters:
        fontSize - Font size.
        Returns:
        Typographic descender value.
      • getTypoAscender

        public double getTypoAscender(double fontSize)

        Returns typographic ascender for specific Font size.

        Specified by:
        getTypoAscender in interface IFontMetrics
        Parameters:
        fontSize - Font size.
        Returns:
        Typographic ascender value.
      • getTypoLineGap

        public double getTypoLineGap(double fontSize)

        Returns line gap for specific Font size.

        Specified by:
        getTypoLineGap in interface IFontMetrics
        Parameters:
        fontSize - Font size.
        Returns:
        Line gap value.
      • getGlyphWidth

        public double getGlyphWidth(GlyphId glyphId)

        Returns glyph width. May be overridden by specific font encoding inheritors.

        Specified by:
        getGlyphWidth in interface IFontMetrics
        Parameters:
        glyphId - Glyph identifier.
        Returns:
        Glyph width.
      • getGlyphBBox

        public FontBBox getGlyphBBox(GlyphId glyphId)

        Returns glyph Bbox. Returns FontBBox if BBox was not defined for the glyph. May be overridden by specific font encoding inheritors.

        Specified by:
        getGlyphBBox in interface IFontMetrics
        Parameters:
        glyphId - Glyph identifier.
        Returns:
        Glyph BBox.
      • measureString

        public abstract double measureString(String unicode,
                                             double fontSize)

        Measures string and returns string width.

        Specified by:
        measureString in interface IFontMetrics
        Parameters:
        unicode - Unicode string.
        fontSize - Font size.
        Returns:
        String width.