Class FontSizeUtil
java.lang.Object
com.itextpdf.forms.util.FontSizeUtil
Utility class for font size calculations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic floatapproximateFontSizeToFitSingleLine(PdfFont localFont, Rectangle bBox, String value, float minValue, float borderWidth) Calculates the font size that will fit the text in the given rectangle.
-
Constructor Details
-
FontSizeUtil
private FontSizeUtil()
-
-
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 usedbBox- the bounding box of the fieldvalue- the value of the fieldminValue- the minimum font sizeborderWidth- the border width of the field- Returns:
- the font size that will fit the text in the given rectangle
-