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 DimensioncomputeDimension(String text, float fontSize, float padding)Computes a text Dimension boundary boxabstract floatgetHeight(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 floatgetWidth(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-Stringto get width ofsize- of a string- Returns:
- string width
-
getHeight
Computes a height for a string of a given size- Parameters:
str-Stringto get height ofsize- of a string- Returns:
- string width
-