Class JavaDSSFontMetrics
java.lang.Object
eu.europa.esig.dss.pdf.visible.AbstractDSSFontMetrics
eu.europa.esig.dss.pdf.pdfbox.visible.defaultdrawer.JavaDSSFontMetrics
- All Implemented Interfaces:
DSSFontMetrics
Contains font metrics for a Java font
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfloat
Computes a height for a string of a given sizefloat
getMaxAscent
(float size) Returns the max ascent for the given fontsize
float
Computes a width for a string of a given sizeMethods inherited from class eu.europa.esig.dss.pdf.visible.AbstractDSSFontMetrics
computeTextBoundaryBox, getLines
-
Constructor Details
-
JavaDSSFontMetrics
Default constructor- Parameters:
javaFont
-Font
-
-
Method Details
-
getWidth
Description copied from interface:DSSFontMetrics
Computes a width for a string of a given size- Parameters:
str
-String
to get width ofsize
- of a string- Returns:
- string width
-
getHeight
Description copied from interface:DSSFontMetrics
Computes a height for a string of a given size- Parameters:
str
-String
to get height ofsize
- of a string- Returns:
- string width
-
getMaxAscent
public float getMaxAscent(float size) Returns the max ascent for the given fontsize
- Parameters:
size
- font size- Returns:
- max ascent
-