Package com.itextpdf.forms.util
Class FontSizeUtil
java.lang.Object
com.itextpdf.forms.util.FontSizeUtil
Utility class for font size calculations.
-
Method Summary
Modifier and TypeMethodDescriptionstatic float
approximateFontSizeToFitSingleLine
(PdfFont localFont, Rectangle bBox, String value, float minValue, float borderWidth) Calculates the font size that will fit the text in the given rectangle.
-
Method Details
-
approximateFontSizeToFitSingleLine
public static float approximateFontSizeToFitSingleLine(PdfFont localFont, Rectangle bBox, String value, float minValue, float borderWidth) Calculates the font size that will fit the text in the given rectangle.- Parameters:
-
localFont
- the font to be used -
bBox
- the bounding box of the field -
value
- the value of the field -
minValue
- the minimum font size -
borderWidth
- the border width of the field - Returns:
- the font size that will fit the text in the given rectangle
-