MIL_ID ContextDmrId, | //in |
MIL_INT64 FontLabelOrIndex, | //in |
MIL_INT64 CharIndex, | //in |
MIL_CONST_TEXT_PTR CharNamePtr, | //in |
MIL_INT64 InquireType, | //in |
void *UserVarPtr | //out |
This function inquires about a global setting of a font in a SureDotOCR context, or inquires about a character in a font. Font settings can be specified with MdmrControlFont().
Characters you are inquiring about are typically imported into a font with MdmrImportFont(). You can also inquire about characters added to a font with MdmrControlFont().
If the inquired setting is set to M_DEFAULT (for example, in MdmrControlFont()), MdmrInquireFont() will return M_DEFAULT. To inquire the actual default value, add M_DEFAULT to the InquireType parameter.
Specifies the identifier of the SureDotOCR context that contains the font about which to inquire. The context must have been previously allocated on the system using MdmrAlloc().
Specifies the font about which to inquire. Set this parameter to one of the values below:
For specifying the font
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
Specifies to inquire about the font by indicating its index. (summarize)Specifies to inquire about the font by indicating its index. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies the index of the font. |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
Specifies to inquire about the font by indicating its label. (summarize)Specifies to inquire about the font by indicating its label. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies the label of the font. |
|||||||||||||||||||||||||||||||||||||||
|
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 this parameter is not required. |
||||||||||||||||||||||||||||||||||||||
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 this parameter is not required. |
||||||||||||||||||||||||||||||||||||||
MIL_TEXT("CharName") 1 |
Specifies the character name. For example, 'A' is the name that identifies the first uppercase letter of the English alphabet. When using the CharNamePtr parameter to specify a character, the CharIndex parameter must be set to M_DEFAULT. (summarize)Specifies the character name. (more details...) |
1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().
Specifies the type of inquire to perform.
See the Parameter associations section for possible values that can be specified.
Specifies the address in which to write the requested information. Since the MdmrInquireFont() function also returns the requested information, you can set this parameter to M_NULL.
See the Parameter associations section for possible values that can be returned.
The tables below list possible values for the InquireType parameter and possible values returned to the UserVarPtr parameter.
To inquire about a global setting of a font, set the InquireType parameter to one of the values below. Unless otherwise specified, set the FontLabelOrIndex parameter to the label or index of a font, the CharIndex parameter to M_DEFAULT, and the CharNamePtr parameter to M_NULL.
For inquiring about a global setting of a
font
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
UserVarPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_FONT_INDEX_VALUE + |
Inquires the index value of a font. Set the FontLabelOrIndex parameter to the font's label. (summarize)Inquires the index value of a font. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr extra info |
Data type info: Data
type: address of a MIL_DOUBLE
MORE
Data type info: Data
type: address of a MIL_DOUBLE
MORE
|
||||||||||||||||||||||||||||||||||||||
M_INVALID |
Specifies that the font to which you are referring does not exist in the context. |
||||||||||||||||||||||||||||||||||||||
0 <= Value <= 255 |
Specifies the index of the font. |
||||||||||||||||||||||||||||||||||||||
M_FONT_LABEL_VALUE + |
Inquires the label value of the font. Set the FontLabelOrIndex parameter to the font's index. (summarize)Inquires the label value of the font. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr extra info |
Data type info: Data
type: address of a MIL_DOUBLE
MORE
Data type info: Data
type: address of a MIL_DOUBLE
MORE
|
||||||||||||||||||||||||||||||||||||||
0 < Value < 2097152 |
Specifies the font's label value. If SureDotOCR cannot return the requested information (no such font exists in the context), you will get an error. (summarize)Specifies the font's label value. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_FONT_SIZE_COLUMNS + |
Inquires the number of columns in the font's dot-matrix template. SET (summarize)Inquires the number of columns in the font's dot-matrix template. SET (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr extra info |
Data type info: Data
type: address of a MIL_DOUBLE
MORE
Data type info: Data
type: address of a MIL_DOUBLE
MORE
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default value; the default value is 5 columns. |
||||||||||||||||||||||||||||||||||||||
Value > 0 |
Specifies the number of columns, as an integer. |
||||||||||||||||||||||||||||||||||||||
M_FONT_SIZE_ROWS + |
Inquires the number of rows in the font's dot-matrix template. SET (summarize)Inquires the number of rows in the font's dot-matrix template. SET (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr extra info |
Data type info: Data
type: address of a MIL_DOUBLE
MORE
Data type info: Data
type: address of a MIL_DOUBLE
MORE
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default value; the default value is 7 rows. |
||||||||||||||||||||||||||||||||||||||
Value > 0 |
Specifies the number of rows, as an integer. |
||||||||||||||||||||||||||||||||||||||
M_FONT_SIZE_TEMPLATE + |
Inquires the total number of dots possible in the font's dot-matrix template. The returned value corresponds to M_FONT_SIZE_COLUMNS * M_FONT_SIZE_ROWS. (summarize)Inquires the total number of dots possible in the font's dot-matrix template. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr extra info |
Data type info: Data
type: address of a MIL_DOUBLE
MORE
Data type info: Data
type: address of a MIL_DOUBLE
MORE
|
||||||||||||||||||||||||||||||||||||||
Value >= 0 |
Specifies the number of dots. |
||||||||||||||||||||||||||||||||||||||
M_NUMBER_OF_CHARS + |
Inquires the number of characters in the font. Characters are added with MdmrImportFont() or MdmrControlStringModel(). (summarize)Inquires the number of characters in the font. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr extra info |
Data type info: Data
type: address of a MIL_DOUBLE
MORE
Data type info: Data
type: address of a MIL_DOUBLE
MORE
|
||||||||||||||||||||||||||||||||||||||
Value >= 0 |
Specifies the number of characters. |
You can add the following value to the above-mentioned values to get the default value of an inquire type (if supported), regardless of the current value of the inquire type.
For inquiring the default value
|
|||||||||||||||||||||||||||||||||||||||
InquireType | Description | ||||||||||||||||||||||||||||||||||||||
UserVarPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Inquires the default value of the specified inquire type. (summarize)Inquires the default value of the specified inquire type. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr extra info |
Data type info: Data
type: address of a
MIL_DOUBLE
Data type info: Data
type: address of a
MIL_DOUBLE
|
To inquire about a font's characters, set the InquireType parameter to one of the values below. Unless otherwise specified, the FontLabelOrIndex parameter must be set to the label or index of a font, and either the CharIndex or CharNamePtr parameter must specify a character.
For inquiring about a font's characters
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
UserVarPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_CHAR_INDEX_VALUE + |
Inquires the index value of the character, based on its name. Set the CharIndex parameter to M_DEFAULT and the CharNamePtr parameter to the name of the character in the font. (summarize)Inquires the index value of the character, based on its name. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr extra info |
Data type info: Data
type: address of a MIL_DOUBLE
MORE
Data type info: Data
type: address of a MIL_DOUBLE
MORE
|
||||||||||||||||||||||||||||||||||||||
M_INVALID |
Specifies that the character to which you are referring does not exist in the font. |
||||||||||||||||||||||||||||||||||||||
Value >= 0 |
Specifies the index of the character. |
||||||||||||||||||||||||||||||||||||||
M_CHAR_NAME + |
Inquires the name of the character, based on its index. Set the CharIndex parameter to the index of a character in the font and the CharNamePtr parameter to M_NULL. M_CHAR_NAME is returned as a regular string. It consists of all characters including the terminating null character. (summarize)Inquires the name of the character, based on its index. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr extra info |
|
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the name. |
||||||||||||||||||||||||||||||||||||||
M_CHAR_TEMPLATE + |
Inquires the dot-matrix that represents the character in the font. The dot-matrix is returned as array data, organized one row contiguously after the other, where 255 (0xFF) represents a dot and 0 represents a blank. SET (summarize)Inquires the dot-matrix that represents the character in the font. SET (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr extra info |
Data type info: Data
type: array of type MIL_UINT8 [optionally, in C++:
a reference to a std::vector<MIL_UINT8>
] MORE
Data type info: Data
type: array of type MIL_UINT8 [optionally, in C++:
a reference to a std::vector<MIL_UINT8>
] MORE
|
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the character's dot-matrix. |
You can add the following value to the above-mentioned value to determine the required array size (number of elements) to store the returned values.
For determining the required array size (number of
elements) to store the returned values
|
|||||||||||||||||||||||||||||||||||||||
InquireType combination value | Description | ||||||||||||||||||||||||||||||||||||||
UserVarPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_NB_ELEMENTS |
Retrieves the required array size (number of elements) to store the returned values. (summarize)Retrieves the required array size (number of elements) to store the returned values. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr extra info |
Data type info: Data
type: address of a MIL_DOUBLE
MORE
Data type info: Data
type: address of a MIL_DOUBLE
MORE
|
You can add the following value to the above-mentioned value to get the size of a string.
For inquiring the size of a string
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
UserVarPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_STRING_SIZE + |
Inquires the number of characters in the string. This number accounts for every character, including the terminating null character. All strings have the terminating null character, even though you need not explicitly list it when specifying the string. (summarize)Inquires the number of characters in the string. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr extra info |
Data type info: Data
type: address of a MIL_DOUBLE
MORE
Data type info: Data
type: address of a MIL_DOUBLE
MORE
|
You can add one of the following values to the above-mentioned values to determine the UTF-16 (Unicode) character name information, which can be useful when working in an ASCII environment.
If you are in an ASCII environment and you are inquiring about character names (for example, with M_CHAR_NAME) that are within the Basic Latin range, SureDotOCR does not consider the Unicode name, by default. For example, if SureDotOCR reads the character 'A', which is a Basic Latin character, and you use M_CHAR_NAME to get the name of that character, SureDotOCR returns 'A', even if you explicitly named it "\x0041" in the font. To return information about the character's UTF-16 (Unicode) name (that is, "\x0041"), use the combination value M_HEX_UTF16_FOR_ALL.
If you are in an ASCII environment and you are inquiring about character names beyond the Basic Latin range, you can only retrieve information about the character name in hexadecimal format. For example, Basic Latin does not include the smiley face character; it is named in hexadecimal format ("\x263A") in the font.
Note that the string size information can change when these combination values are added. For example, in an ASCII environment, if the first four characters in the font are "abc☺", using M_CHAR_NAME + M_HEX_UTF16_FOR_NON_BASIC_LATIN returns "b" for the character at index 1, and "\x263A" for the character at index 3. Consequently, the string sizes are 2 and 7, respectively (inquired with M_CHAR_NAME + M_STRING_SIZE + M_HEX_UTF16_FOR_NON_BASIC_LATIN). If M_HEX_UTF16_FOR_ALL is specified, the preceding example returns "\x0062" and "\x263A" for the respective character names, and 7 for each string size. Recall that the null-terminating character is included in the string size.
In a Unicode environment, the character representations are returned (for example, the smiley face), unless you explicitly specify a combination value (for example, to obtain "\x263A" instead of the actual smiley face).
For explicitly inquiring about Unicode character name
information (can be useful when working in ASCII)
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
M_HEX_UTF16_FOR_ALL |
Retrieves results with the name of all characters in hexadecimal 16-bit Unicode (UTF-16) format. |
||||||||||||||||||||||||||||||||||||||
M_HEX_UTF16_FOR_NON_BASIC_LATIN |
Retrieves results with the names of characters that fall out of the Basic Latin range, in hexadecimal 16-bit Unicode (UTF-16) format. INFO |
You can add the following value to the above-mentioned values to determine whether an inquire type is supported for the font currently being inquired.
For inquiring if an inquire type is
supported
|
|||||||||||||||||||||||||||||||||||||||
InquireType | Description | ||||||||||||||||||||||||||||||||||||||
UserVarPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_SUPPORTED |
Inquires whether the specified inquire type is supported. (summarize)Inquires whether the specified inquire type is supported. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr extra info |
Data type info: Data
type: address of a MIL_DOUBLE
MORE
Data type info: Data
type: address of a MIL_DOUBLE
MORE
|
||||||||||||||||||||||||||||||||||||||
M_FALSE |
Specifies that the inquire type is not supported. |
||||||||||||||||||||||||||||||||||||||
M_TRUE |
Specifies that the inquire type is supported. |
You can add one of the following values to the above-mentioned values to cast the requested information to the required data type.
For casting the requested information to the required
data type
|
|||||||||||||||||||||||||||||||||||||||
InquireType | Description | ||||||||||||||||||||||||||||||||||||||
UserVarPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_DOUBLE |
Casts the requested information to a MIL_DOUBLE. (summarize)Casts the requested information to a MIL_DOUBLE. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr extra info |
Data type info: Data
type: address of a
MIL_DOUBLE
Data type info: Data
type: address of a
MIL_DOUBLE
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_INT |
Casts the requested information to a MIL_INT. (summarize)Casts the requested information to a MIL_INT. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr extra info |
Data type info: Data
type: address of a MIL_INT
Data type info: Data
type: address of a MIL_INT
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_INT32 |
Casts the requested information to a MIL_INT32. (summarize)Casts the requested information to a MIL_INT32. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr extra info |
Data type info: Data
type: address of a
MIL_INT32
Data type info: Data
type: address of a
MIL_INT32
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_INT64 |
Casts the requested information to a MIL_INT64. (summarize)Casts the requested information to a MIL_INT64. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr extra info |
Data type info: Data
type: address of a
MIL_INT64
Data type info: Data
type: address of a
MIL_INT64
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_UINT8 |
Casts the requested information to a MIL_UINT8. (summarize)Casts the requested information to a MIL_UINT8. (more details...) |
||||||||||||||||||||||||||||||||||||||
UserVarPtr extra info |
Data type info: Data
type: address of a
MIL_UINT8
Data type info: Data
type: address of a
MIL_UINT8
|
Header | Include mil.h. |
Library | Use mil.lib; mildmr.lib. |
DLL | Requires mil.dll; mildmr.dll. |