Package eu.europa.esig.dss.pdf.visible
Class AbstractFontMetrics
java.lang.Object
eu.europa.esig.dss.pdf.visible.AbstractFontMetrics
- Direct Known Subclasses:
ITextFontMetrics
,JavaFontMetrics
,PdfBoxFontMetrics
public abstract class AbstractFontMetrics extends Object
-
Constructor Summary
Constructors Constructor Description AbstractFontMetrics()
-
Method Summary
Modifier and Type Method Description Dimension
computeDimension(String text, float fontSize, float padding)
Computes a text Dimension boundary boxabstract float
getHeight(String str, float size)
Computes a height for a string of a given sizeString[]
getLines(String text)
Returns an array of strings, divided by a new line characterabstract float
getWidth(String str, float size)
Computes a width for a string of a given size
-
Constructor Details
-
AbstractFontMetrics
public AbstractFontMetrics()
-
-
Method Details
-
getLines
Returns an array of strings, divided by a new line character -
computeDimension
Computes a text Dimension boundary box -
getWidth
Computes a width for a string of a given size- Parameters:
str
-String
to get width ofsize
- of a string- Returns:
- string width
-
getHeight
Computes a height for a string of a given size- Parameters:
str
-String
to get height ofsize
- of a string- Returns:
- string width
-