FaceStyle Property

MiFONT_FACE_STYLE

FaceStyle can be one of the following MiFONT_FACE_STYLE constants.
miFFace_ROMAN (1)
miFFace_ITALIC (2)
miFFace_BOLD (3)
miFFace_BOLD_ITALIC (4)

expression.FaceStyle

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

Example

The following example performs optical character recognition (OCR) on the first page of a document, and then reports the font properties, including the font face style, 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.
  miDoc.Images(0).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