VintaSoft Imaging .NET SDK 15.1: Documentation for .NET developer
Vintasoft.Imaging.Pdf.Drawing Namespace / PdfGraphics Class / MeasureFontSize Methods / MeasureFontSize(String,PdfFont,Single,Single,Single) Method
Syntax Requirements SeeAlso
In This Topic
MeasureFontSize(String,PdfFont,Single,Single,Single) Method (PdfGraphics)
In This Topic
Measures the text font size for specified text width and height.
Syntax
'Declaration

Public Overloads Function MeasureFontSize( _
ByVal text
String to measure.
As System.String, _
ByVal font
PdfFont that defines the text format of the string.
As Vintasoft.Imaging.Pdf.Tree.Fonts.PdfFont, _
ByVal textWidth
Maximum width of the string in user units (1 / 72 inch).
As Single, _
ByVal textHeight
Maximum height, in user units (1 / 72 inch), of the layout area for the text.
As Single, _
ByVal lineSpacing
The line spacing.
As Single _
) As Single

Parameters

text
String to measure.
font
PdfFont that defines the text format of the string.
textWidth
Maximum width of the string in user units (1 / 72 inch).
textHeight
Maximum height, in user units (1 / 72 inch), of the layout area for the text.
lineSpacing
The line spacing.

Return Value

Measured font size.
Requirements

Target Platforms: .NET 10; .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

See Also