Package com.itextpdf.io.font
Class FontMetrics
- java.lang.Object
-
- com.itextpdf.io.font.FontMetrics
-
public class FontMetrics extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private int
advanceWidthMax
private int
ascender
private int[]
bbox
private int
capHeight
private int
descender
private int[]
glyphWidths
private boolean
isFixedPitch
private float
italicAngle
private int
lineGap
protected float
normalizationCoef
private int
numOfGlyphs
private int
stemH
private int
stemV
private int
strikeoutPosition
private int
strikeoutSize
private int
subscriptOffset
private int
subscriptSize
private int
superscriptOffset
private int
superscriptSize
private int
typoAscender
private int
typoDescender
private int
underlinePosition
private int
underlineThickness
private int
unitsPerEm
private int
winAscender
private int
winDescender
private int
xHeight
-
Constructor Summary
Constructors Constructor Description FontMetrics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAdvanceWidthMax()
int
getAscender()
int[]
getBbox()
int
getCapHeight()
Gets the capital letters height.int
getDescender()
int[]
getGlyphWidths()
float
getItalicAngle()
int
getLineGap()
int
getNumberOfGlyphs()
int
getStemH()
int
getStemV()
int
getStrikeoutPosition()
int
getStrikeoutSize()
int
getSubscriptOffset()
int
getSubscriptSize()
int
getSuperscriptOffset()
int
getSuperscriptSize()
int
getTypoAscender()
Gets typo (a.k.a.int
getTypoDescender()
Gets typo (a.k.a.int
getUnderlinePosition()
int
getUnderlineThickness()
int
getUnitsPerEm()
int
getWinAscender()
int
getWinDescender()
int
getXHeight()
boolean
isFixedPitch()
protected void
setAdvanceWidthMax(int advanceWidthMax)
protected void
setAscender(int ascender)
void
setBbox(int llx, int lly, int urx, int ury)
protected void
setCapHeight(int capHeight)
Sets the capital letters height.protected void
setDescender(int descender)
protected void
setGlyphWidths(int[] glyphWidths)
protected void
setIsFixedPitch(boolean isFixedPitch)
protected void
setItalicAngle(float italicAngle)
protected void
setLineGap(int lineGap)
protected void
setNumberOfGlyphs(int numOfGlyphs)
protected void
setStemH(int stemH)
void
setStemV(int stemV)
protected void
setStrikeoutPosition(int strikeoutPosition)
protected void
setStrikeoutSize(int strikeoutSize)
protected void
setSubscriptOffset(int subscriptOffset)
protected void
setSubscriptSize(int subscriptSize)
protected void
setSuperscriptOffset(int superscriptOffset)
protected void
setSuperscriptSize(int superscriptSize)
protected void
setTypoAscender(int typoAscender)
Sets typo (a.k.a.protected void
setTypoDescender(int typoDescender)
Sets typo (a.k.a.protected void
setUnderlinePosition(int underlinePosition)
protected void
setUnderlineThickness(int underineThickness)
protected void
setUnitsPerEm(int unitsPerEm)
protected void
setWinAscender(int winAscender)
protected void
setWinDescender(int winDescender)
protected void
setXHeight(int xHeight)
protected void
updateBbox(float llx, float lly, float urx, float ury)
-
-
-
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
-
-
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)
-
-