Family Property
MiFONT_FAMILY
Family can be one of the following MiFONT_FAMILY constants. |
miFFamily_Helvetica (1) |
miFFamily_Times (2) |
miFFamily_Century (3) |
miFFamily_TimesCentury (4) |
miFFamily_HelveticaCentury (5) |
miFFamily_DEFAULT (6) |
expression.Family
*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 family, 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