Package com.itextpdf.forms.util
Class FontSizeUtil
- java.lang.Object
-
- com.itextpdf.forms.util.FontSizeUtil
-
public final class FontSizeUtil extends java.lang.Object
Utility class for font size calculations.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
FontSizeUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static float
approximateFontSizeToFitSingleLine(PdfFont localFont, Rectangle bBox, java.lang.String value, float minValue, float borderWidth)
Calculates the font size that will fit the text in the given rectangle.
-
-
-
Method Detail
-
approximateFontSizeToFitSingleLine
public static float approximateFontSizeToFitSingleLine(PdfFont localFont, Rectangle bBox, java.lang.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
-
-