Class FontMetrics

java.lang.Object
com.itextpdf.io.font.FontMetrics

public class FontMetrics extends Object
  • Field Details

    • normalizationCoef

      protected float normalizationCoef
  • Constructor Details

    • FontMetrics

      public FontMetrics()
  • Method Details

    • 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)