Class FontMetrics


  • public class FontMetrics
    extends java.lang.Object
    • Field Detail

      • normalizationCoef

        protected float normalizationCoef
      • unitsPerEm

        private int unitsPerEm
      • numOfGlyphs

        private int numOfGlyphs
      • glyphWidths

        private int[] glyphWidths
      • typoAscender

        private int typoAscender
      • typoDescender

        private int typoDescender
      • capHeight

        private int capHeight
      • xHeight

        private int xHeight
      • italicAngle

        private float italicAngle
      • bbox

        private int[] bbox
      • ascender

        private int ascender
      • descender

        private int descender
      • lineGap

        private int lineGap
      • winAscender

        private int winAscender
      • winDescender

        private int winDescender
      • advanceWidthMax

        private int advanceWidthMax
      • underlinePosition

        private int underlinePosition
      • underlineThickness

        private int underlineThickness
      • strikeoutPosition

        private int strikeoutPosition
      • strikeoutSize

        private int strikeoutSize
      • subscriptSize

        private int subscriptSize
      • subscriptOffset

        private int subscriptOffset
      • superscriptSize

        private int superscriptSize
      • superscriptOffset

        private int superscriptOffset
      • stemV

        private int stemV
      • stemH

        private int stemH
      • isFixedPitch

        private boolean isFixedPitch
    • Constructor Detail

      • FontMetrics

        public FontMetrics()
    • Method Detail

      • getUnitsPerEm

        public int getUnitsPerEm()
      • getNumberOfGlyphs

        public int getNumberOfGlyphs()
      • getGlyphWidths

        public int[] getGlyphWidths()
      • getTypoAscender

        public int getTypoAscender()
        Gets typo (a.k.a. sTypo or OS/2) vertical metric corresponding to ascender.

        Typo vertical metrics are the primary source for iText ascender/descender calculations.

        Returns:
        typo ascender value in normalized 1000-units
      • getTypoDescender

        public int getTypoDescender()
        Gets typo (a.k.a. sTypo or OS/2) vertical metric corresponding to descender.

        Typo vertical metrics are the primary source for iText ascender/descender calculations.

        Returns:
        typo descender value in normalized 1000-units
      • getCapHeight

        public int getCapHeight()
        Gets the capital letters height.

        This property defines the vertical coordinate of the top of flat capital letters, measured from the baseline.

        Returns:
        cap height in 1000-units
      • getXHeight

        public int getXHeight()
      • getItalicAngle

        public float getItalicAngle()
      • getBbox

        public int[] getBbox()
      • setBbox

        public void setBbox​(int llx,
                            int lly,
                            int urx,
                            int ury)
      • getAscender

        public int getAscender()
      • getDescender

        public int getDescender()
      • getLineGap

        public int getLineGap()
      • getWinAscender

        public int getWinAscender()
      • getWinDescender

        public int getWinDescender()
      • getAdvanceWidthMax

        public int getAdvanceWidthMax()
      • getUnderlinePosition

        public int getUnderlinePosition()
      • getUnderlineThickness

        public int getUnderlineThickness()
      • getStrikeoutPosition

        public int getStrikeoutPosition()
      • getStrikeoutSize

        public int getStrikeoutSize()
      • getSubscriptSize

        public int getSubscriptSize()
      • getSubscriptOffset

        public int getSubscriptOffset()
      • getSuperscriptSize

        public int getSuperscriptSize()
      • getSuperscriptOffset

        public int getSuperscriptOffset()
      • getStemV

        public int getStemV()
      • getStemH

        public int getStemH()
      • isFixedPitch

        public boolean isFixedPitch()
      • setUnitsPerEm

        protected void setUnitsPerEm​(int unitsPerEm)
      • updateBbox

        protected void updateBbox​(float llx,
                                  float lly,
                                  float urx,
                                  float ury)
      • setNumberOfGlyphs

        protected void setNumberOfGlyphs​(int numOfGlyphs)
      • setGlyphWidths

        protected void setGlyphWidths​(int[] glyphWidths)
      • setTypoAscender

        protected void setTypoAscender​(int typoAscender)
        Sets typo (a.k.a. sTypo or OS/2) vertical metric corresponding to ascender.

        Typo vertical metrics are the primary source for iText ascender/descender calculations.

        Parameters:
        typoAscender - typo ascender value in normalized 1000-units
      • setTypoDescender

        protected void setTypoDescender​(int typoDescender)
        Sets typo (a.k.a. sTypo or OS/2) vertical metric corresponding to descender.

        Typo vertical metrics are the primary source for iText ascender/descender calculations.

        Parameters:
        typoDescender - typo descender value in normalized 1000-units
      • setCapHeight

        protected void setCapHeight​(int capHeight)
        Sets the capital letters height.

        This property defines the vertical coordinate of the top of flat capital letters, measured from the baseline.

        Parameters:
        capHeight - cap height in 1000-units
      • setXHeight

        protected void setXHeight​(int xHeight)
      • setItalicAngle

        protected void setItalicAngle​(float italicAngle)
      • setAscender

        protected void setAscender​(int ascender)
      • setDescender

        protected void setDescender​(int descender)
      • setLineGap

        protected void setLineGap​(int lineGap)
      • setWinAscender

        protected void setWinAscender​(int winAscender)
      • setWinDescender

        protected void setWinDescender​(int winDescender)
      • setAdvanceWidthMax

        protected void setAdvanceWidthMax​(int advanceWidthMax)
      • setUnderlinePosition

        protected void setUnderlinePosition​(int underlinePosition)
      • setUnderlineThickness

        protected void setUnderlineThickness​(int underineThickness)
      • setStrikeoutPosition

        protected void setStrikeoutPosition​(int strikeoutPosition)
      • setStrikeoutSize

        protected void setStrikeoutSize​(int strikeoutSize)
      • setSubscriptSize

        protected void setSubscriptSize​(int subscriptSize)
      • setSubscriptOffset

        protected void setSubscriptOffset​(int subscriptOffset)
      • setSuperscriptSize

        protected void setSuperscriptSize​(int superscriptSize)
      • setSuperscriptOffset

        protected void setSuperscriptOffset​(int superscriptOffset)
      • setStemV

        public void setStemV​(int stemV)
      • setStemH

        protected void setStemH​(int stemH)
      • setIsFixedPitch

        protected void setIsFixedPitch​(boolean isFixedPitch)