FontSize Property

Returns the height in points of the specified font. Read-only Integer.


*expression   * Required. An expression that returns an MiFont object.


The following example performs optical character recognition (OCR) on the first page of a document, and then reports the font properties, including the font size, of the third recognized word.

Sub TestFont()
  Dim miDoc As MODI.Document
  Dim miFont As MODI.miFont
  Dim strFontInfo As String
  ' Load an existing TIFF file.
  Set miDoc = New MODI.Document
  miDoc.Create "C:\document1.tif"
  ' Perform OCR.
  ' Retrieve and display font information.
  Set miFont = miDoc.Images(0).Layout.Words(2).Font
  strFontInfo = _
    "Font family: " & miFont.Family & vbCrLf & _
    "Font size: " & miFont.FontSize & vbCrLf & _
    "Face style: " & miFont.FaceStyle & vbCrLf & _
    "Serif style: " & miFont.SerifStyle & vbCrLf
  MsgBox strFontInfo, vbInformation + vbOKOnly, _
    "Font Information"
  Set miFont = Nothing
  Set miDoc = Nothing

End Sub

Applies to | MiFont Object