setFontSize

open fun setFontSize(fontSize: Float)

Sets the font size for this widget annotation in PDF points. If set to FONT_SIZE_AUTO, PSPDFKit will automatically adjust the font size of the widget annotation so that its content fills the annotation's bounding box.


// Set a font size of 14 points to a widget annotation.
widgetAnnotation.setFontSize(14.0f);

// Enable auto-sizing of the annotation's content.
widgetAnnotation.setFontSize(WidgetAnnotation.FONT_SIZE_AUTO);

Parameters

fontSize

The font size to set for this annotation. If set to FONT_SIZE_AUTO, PSPDFKit will enable automatic sizing of the content, to fill the bounding box of this annotation.

See also