MIL_ID ContextDmrId, | //in |
MIL_INT64 FontLabelOrIndex, | //in |
MIL_INT64 CharIndex, | //in |
MIL_CONST_TEXT_PTR CharNamePtr, | //in |
MIL_INT64 ControlType, | //in |
MIL_DOUBLE ControlValue, | //in |
const void *ControlValuePtr | //in |
This function allows you to control a global setting of a font in a SureDotOCR context, or to control a character in a font. This includes adding characters to, and deleting characters from, a font. To add a font to a SureDotOCR context, use MdmrControl() with M_FONT_ADD (this adds an empty font). For a successful read operation, the context must have at least one font with one character. The characters held by a font are represented by a dot-matrix. String models use the dot-matrix character representations in the font to define the text to read.
Adding or modifying characters with this function requires specifying their dot-matrix representation in an array. You can also add or modify characters by calling MdmrImportFont() with a SureDotOCR font file (more commonly done). To inquire about fonts, use MdmrInquireFont().
You must preprocess the SureDotOCR context after modifying its fonts and before calling MdmrRead(). To know if a context needs to be preprocessed, call MdmrInquire() with M_PREPROCESSED.
Specifies the identifier of the SureDotOCR context that contains the fonts to control. The context must have been previously allocated on the system using MdmrAlloc().
Specifies the font (one or all) to control. Set this parameter to one of the values below:
For specifying the font
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
Specifies to control the font by indicating its index. (summarize)Specifies to control the font by indicating its index. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies the index of the font. |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
Specifies to control the font by indicating its label. (summarize)Specifies to control the font by indicating its label. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies the label of the font. |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
M_ALL |
Specifies to control all fonts. |
Specifies the index of a character in the font, if required. Set this parameter to one of the values below:
For specifying the index of a character
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies that the index of a character is not required. |
||||||||||||||||||||||||||||||||||||||
M_ALL |
Specifies all characters. Only specify this value for M_CHAR_DELETE. (summarize)Specifies all characters. (more details...) |
||||||||||||||||||||||||||||||||||||||
Value >= 0 |
Specifies the index of a character. |
Specifies the name of a character in the font, if required. Set this parameter to one of the values below:
For specifying the name of the character
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_NULL |
Specifies that the name of the character is not required. |
||||||||||||||||||||||||||||||||||||||
MIL_TEXT("CharName") 1 |
Specifies the name of the character. For example, 'A' would be the name that identifies the first uppercase letter of the English alphabet. When using the CharNamePtr parameter to specify the name of a character, the CharIndex parameter must be set to M_DEFAULT. When working in an ASCII environment, you can specify Unicode character names; these names must be in hexadecimal format and begin with "\x". This is required for specifying character names beyond the Basic Latin range. For example, Basic Latin does not include the smiley face character; to specify it, use "\x263A". When working in a Unicode environment, you can directly specify the smiley face as the name of the character. Character names must be unique among all character names in the font. Specifying the name of a character that already exists causes an error. To avoid unpredictable results, character names should match the dot-matrix that they represent. (summarize)Specifies the name of the character. (more details...) |
1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().
Specifies the type of control to set.
See the Parameter associations section for possible values that can be specified.
Specifies the required value for the control.
Set this parameter to M_DEFAULT if not used.
See the Parameter associations section for possible values that can be specified.
Specifies the address which contains more information about the setting's new value.
Set this parameter to M_NULL if not used. If you use this parameter, the ControlValue parameter must be M_DEFAULT.
See the Parameter associations section for possible values that can be specified.
The tables below list possible values for the ControlType, ControlValue, and ControlValuePtr parameters.
The following ControlType and corresponding ControlValue and ControlValuePtr parameter settings are used to control a global setting of a font. Unless otherwise specified, set the FontLabelOrIndex parameter to the label or index of a font (one or all), set the CharIndex parameter to M_DEFAULT, and set the CharNamePtr parameter to M_NULL.
For controlling a global setting of a
font
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
ControlValuePtr | |||||||||||||||||||||||||||||||||||||||
M_FONT_LABEL_VALUE |
Modifies the label value of the font. Set the FontLabelOrIndex parameter to a specific font. Specifying all fonts causes an error. (summarize)Modifies the label value of the font. (more details...) |
||||||||||||||||||||||||||||||||||||||
ControlValue |
Specifies the following. (summarize)Specifies the following. (more details...) |
||||||||||||||||||||||||||||||||||||||
0 < Value < 2097152 |
Specifies the font's new label value, as an integer. The label must be unique among all font labels in the context. (summarize)Specifies the font's new label value, as an integer. (more details...) |
||||||||||||||||||||||||||||||||||||||
ControlValuePtr |
Data type info: Data
type: Set this parameter to
M_NULL
Data type info: Data
type: Set this parameter to
M_NULL
|
||||||||||||||||||||||||||||||||||||||
M_FONT_SIZE_COLUMNS |
Sets the number of columns in the font's dot-matrix template. Only specify this value for an empty font (no characters). The dot-matrix template defines the grid within which to represent every character in the font. Fonts are typically added with MdmrImportFont(). In this case, the dimensions of the characters' dot-matrix in the font file (MDMRF) represent the dimensions of the dot-matrix template of the font. INQ (summarize)Sets the number of columns in the font's dot-matrix template. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
ControlValue |
Specifies one of the following. (summarize)Specifies one of the following. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default value; the default value is 5 columns. |
||||||||||||||||||||||||||||||||||||||
Value > 0 |
Specifies the number of columns, as an integer. |
||||||||||||||||||||||||||||||||||||||
ControlValuePtr |
Data type info: Data
type: Set this parameter to
M_NULL
Data type info: Data
type: Set this parameter to
M_NULL
|
||||||||||||||||||||||||||||||||||||||
M_FONT_SIZE_ROWS |
Sets the number of rows in the font's dot-matrix template. Only specify this value for an empty font (no characters). The dot-matrix template defines the grid within which to represent every character in the font. Fonts are typically added with MdmrImportFont(). In this case, the dimensions of the characters' dot-matrix in the font file (MDMRF) represent the dimensions of the dot-matrix template of the font. INQ (summarize)Sets the number of rows in the font's dot-matrix template. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
ControlValue |
Specifies one of the following. (summarize)Specifies one of the following. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default value; the default value is 7 rows. |
||||||||||||||||||||||||||||||||||||||
Value > 0 |
Specifies the number of rows, as an integer. |
||||||||||||||||||||||||||||||||||||||
ControlValuePtr |
Data type info: Data
type: Set this parameter to
M_NULL
Data type info: Data
type: Set this parameter to
M_NULL
|
The following ControlType and corresponding ControlValue and ControlValuePtr parameter settings are used to control a font's characters. Unless otherwise specified, set the FontLabelOrIndex parameter to the label or index of a font (one or all), and set either the CharIndex parameter to a character index or the CharNamePtr parameter to the name of a character.
For controlling a font's characters
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
ControlValuePtr | |||||||||||||||||||||||||||||||||||||||
M_CHAR_ADD |
Adds a character to the font. To add multiple characters, call this function multiple times. SureDotOCR assigns an index to each character, starting with 0. Use the CharNamePtr parameter to specify the name of the character and set the CharIndex parameter to M_DEFAULT. Fonts should only contain characters you want to read. (summarize)Adds a character to the font. (more details...) |
||||||||||||||||||||||||||||||||||||||
ControlValue |
Specifies the following. (summarize)Specifies the following. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Implements the default behavior. |
||||||||||||||||||||||||||||||||||||||
ControlValuePtr |
Data type info: Data
type: array of type MIL_UINT8 [optionally, in C++:
a reference to a constant std::vector<MIL_UINT8>
] MORE
Specifies the address of an array containing the dot-matrix of the character to add to the font. You must define the dot-matrix in the array, one row contiguously after the other; use "FF" for dots that represent the character; otherwise use "00". The dot-matrix of the font's characters should be identical to the dot-matrix of the characters in the strings to read. You must organize the character data in the specified array according to the dimensions of the font's dot-matrix template. To inquire the dimensions, call MdmrInquireFont() with M_FONT_SIZE_COLUMNS and M_FONT_SIZE_ROWS. The dot-matrix of all characters in a font must have these dimensions. The dots that make up the dot-matrix are specific to each character. (summarize)Data type info: Data
type: array of type MIL_UINT8 [optionally, in C++:
a reference to a constant std::vector<MIL_UINT8>
] MORE
Specifies the address of an array containing the dot-matrix of the character to add to the font. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHAR_DELETE |
Deletes characters in a font. To delete a specific character in a font, set the CharIndex parameter to the index of the character to delete, or set the CharNamePtr parameter to the name of the character to delete. To delete all characters in a font, set the CharIndex parameter to M_ALL and the CharNamePtr parameter to M_NULL. (summarize)Deletes characters in a font. (more details...) |
||||||||||||||||||||||||||||||||||||||
ControlValue |
Specifies the following. (summarize)Specifies the following. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Implements the default behavior. |
||||||||||||||||||||||||||||||||||||||
ControlValuePtr |
Data type info: Data
type: Set this parameter to
M_NULL
Data type info: Data
type: Set this parameter to
M_NULL
|
||||||||||||||||||||||||||||||||||||||
M_CHAR_NAME |
Renames a character in a font. (summarize)Renames a character in a font. (more details...) |
||||||||||||||||||||||||||||||||||||||
ControlValue |
Specifies the following. (summarize)Specifies the following. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Implements the default behavior. |
||||||||||||||||||||||||||||||||||||||
ControlValuePtr |
Data type info: Data
type: address of a MIL_CONST_TEXT_PTR [optionally,
in C++: MIL_STRING
]
Specifies the following. (summarize)Data type info: Data
type: address of a MIL_CONST_TEXT_PTR [optionally,
in C++: MIL_STRING
]
Specifies the following. (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL_TEXT("CharName") 1 |
Specifies the character's new name. To indicate the character to rename, use either the CharIndex parameter or the CharNamePtr parameter. Character names must be unique among all character names in the font. To avoid unpredictable results, character names should match the dot-matrix that represents them. (summarize)Specifies the character's new name. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHAR_TEMPLATE |
Redefines the dot-matrix of a character in a font. INQ (summarize)Redefines the dot-matrix of a character in a font. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
ControlValue |
Specifies the following. (summarize)Specifies the following. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Implements the default behavior. |
||||||||||||||||||||||||||||||||||||||
ControlValuePtr |
Data type info: Data
type: array of type MIL_UINT8 [optionally, in C++:
a reference to a constant std::vector<MIL_UINT8>
] MORE
Specifies the address of an array containing the character's new dot matrix. This character data must adhere to the same specifications as M_CHAR_ADD. To indicate the character to redefine, use either the CharIndex parameter or the CharNamePtr parameter. (summarize)Data type info: Data
type: array of type MIL_UINT8 [optionally, in C++:
a reference to a constant std::vector<MIL_UINT8>
] MORE
Specifies the address of an array containing the character's new dot matrix. (more details...) |
1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().
void MdmrControlFontInt64
(MIL_ID ContextDmrId,
MIL_INT64 FontLabelOrIndex,
MIL_INT64 CharIndex,
MIL_CONST_TEXT_PTR CharNamePtr,
MIL_INT64 ControlType,
MIL_INT64 ControlValue,
const void *ControlValuePtr)
Parameters
ContextDmrId See ContextDmrId of the main function for a description. FontLabelOrIndex See FontLabelOrIndex of the main function for a description. CharIndex See CharIndex of the main function for a description. CharNamePtr See CharNamePtr of the main function for a description. ControlType See ControlType of the main function for a description. ControlValue See ControlValue of the main function for a description. ControlValuePtr See ControlValuePtr of the main function for a description. |
void MdmrControlFontDouble (MIL_ID ContextDmrId,
MIL_INT64 FontLabelOrIndex,
MIL_INT64 CharIndex,
MIL_CONST_TEXT_PTR CharNamePtr,
MIL_INT64 ControlType,
MIL_DOUBLE ControlValue,
const void *ControlValuePtr)
Parameters
ContextDmrId See ContextDmrId of the main function for a description. FontLabelOrIndex See FontLabelOrIndex of the main function for a description. CharIndex See CharIndex of the main function for a description. CharNamePtr See CharNamePtr of the main function for a description. ControlType See ControlType of the main function for a description. ControlValue See ControlValue of the main function for a description. ControlValuePtr See ControlValuePtr of the main function for a description. |
Header | Include mil.h. |
Library | Use mil.lib; mildmr.lib. |
DLL | Requires mil.dll; mildmr.dll. |