| Customize Help
| Save Settings

MocrRestoreFont



Function Map
Synopsis
Restore an OCR font context, font constraint data, or control data from file.
Syntax
MIL_ID MocrRestoreFont(
MIL_CONST_TEXT_PTR FileName, //in
MIL_INT64 Operation, //in
MIL_ID SystemId, //in
MIL_ID *FontContextOcrIdPtr //in-out
)
Description

This function restores an OCR font context that was previously saved to a file using MocrSaveFont().

This function can also restore a font context from a predefined font context file distributed with MIL (such as, C:\Program Files\Matrox Imaging\contexts\ Semi_M12-92.mfo). Alternatively, this function can load only font constraint or control data from the file into the specified OCR font context.

When an OCR font context is no longer required, it should be freed with MocrFree().

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
FileName

Specifies the path and name of the file from which to restore the MIL OCR font context (for example, "C:\mydirectory\myfile"). The function handles (internally) the opening and closing of the file.

The predefined font files, distributed with MIL, are in the "C:\Program Files\Matrox Imaging\contexts\" folder.

To open the file on the remote computer (under Distributed MIL), prefix the specified file name string with "remote:///" (for example, "remote:///C:\mydirectory\myfile").

This parameter can be set to one of the following:

function map For specifying the file name and path
Click to summarizeValue Description
Click to summarize M_INTERACTIVE
[This is only applicable to Windows]

Opens the File Open dialog box from which you can interactively specify the drive, directory, and name of the file.

Click to summarize MIL_TEXT("Filename.mfo") 1

Specifies to restore an OCR user-defined font.

Click to summarize MIL_TEXT("MICR_CMC_7.mfo") 1

Specifies to restore an OCR font context typically used with the MICR CMC7 standard.

Click to summarize MIL_TEXT("MICR_E_13B.mfo") 1

Specifies to restore an OCR font context typically used with the MICR E-13b standard.

Click to summarize MIL_TEXT("OCR_A_BT.mfo") 1

Specifies to restore an OCR font context that uses the OCR-A BT font.

Click to summarize MIL_TEXT("OCR_B_BT.mfo") 1

Specifies to restore an OCR font context that uses the OCR-B BT font.

Click to summarize MIL_TEXT("SEMI_M12-92.mfo") 1

Specifies to restore an OCR font context following the SEMI M12 standard.

Click to summarize MIL_TEXT("SEMI_M13-88.mfo") 1

Specifies to restore an OCR font context following the SEMI M13 standard.

Click to summarize MIL_TEXT("SEMI.mfo") 1

Specifies to restore an OCR font context typically used with the SEMI conductor standard.

1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().

Operation

Specifies which type of OCR font context data to restore. It can be set to one of the following values:

function map For specifying the type of data to restore
Click to summarizeValue Description
Click to summarize M_DEFAULT

Same as M_RESTORE.

Click to summarize M_LOAD_CONSTRAINT

Loads only font constraint data into the specified OCR font context.

Click to summarize M_LOAD_CONTROL

Loads only font control data into the specified OCR font context.

Click to summarize M_RESTORE

Allocates a new OCR font context on the specified system, and initializes it with the font, control, and constraint data, restored from file.

SystemId

Specifies the system on which the OCR font context is allocated.

This parameter should be set to one of the following values:

function map For specifying the system identifier
Click to summarizeValue Description
Click to summarize M_DEFAULT_HOST

Specifies the default Host system of the current MIL application.

Click to summarize MIL system identifier

Specifies a valid system identifier, previously allocated using MsysAlloc().

FontContextOcrIdPtr

Specifies the address of the variable to/from which the font identifier is to be written/read.

Since after performing a restore operation, MocrRestoreFont() also returns the OCR font context identifier, this parameter can be set to M_NULL. If the restore operation fails, M_NULL is returned as the identifier.

Return value
Returns the identifier of the existing or newly allocated OCR font context. If allocation fails, M_NULL is returned as the identifier.
Compilation information
Header Include mil.h.
Library Use mil.lib; milocr.lib.
DLL Requires mil.dll; milocr.dll.
INTERACTIVE DEFAULT LOAD CONSTRAINT LOAD CONTROL RESTORE DEFAULT HOST LOAD CONTROL LOAD CONSTRAINT RESTORE DEFAULT