Table: | For specifying the direction of the copy operation |
+ combination: | For the Operations parameter |
+ combination: | For M_COPY_FROM_FONT |
Table: | For specifying the string |
MIL_ID ImageBufId, | //in |
MIL_ID FontContextOcrId, | //in |
MIL_INT64 Operation, | //in |
MIL_CONST_TEXT_PTR CharListString | //in |
This function copies a character representation of one, or many, font characters to/from the specified image buffer. This buffer can then be used to initialize, change or obtain a visual representation of the font's characters.
If character representations from the image buffer are being copied to the OCR font context, the OCR font context must be large enough to hold the representations of all the specified characters. You can use MocrInquire() to determine the maximum number of characters that can be stored in the font and the size of each character.
The characters are stored in contiguous cells in the image buffer.
The character representations are read from either a font or an image buffer, assuming that the source image is a grid of character representations matching the specified font size. The character representations are read from left to right, and the characters in CharListString must exist in the font.
If the character representation being added already exists in the font, it will be replaced by the new character representation. If the character representation does not already exist in the font, it is appended to the end of the font. If the maximum string length, as set using MocrAllocFont(), is equal to or greater than the number of characters in the font (use MocrInquire() with M_CHAR_NUMBER_IN_FONT), an error will occur and the copy operation will fail.
Note that it is crucial that the character representation respects the foreground value as set in MocrAllocFont(). If the foreground value of the character representation does not match, the font will be unusable.
Specifies the identifier of the image buffer to/from which characters are copied.
This image buffer must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.
Specifies the identifier of the OCR font context to/from which the characters are copied.
Specifies the direction of the copy operation. This parameter can be set to one of the following values:
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Copies character(s) from a font context to an image buffer. Note that the maximum number of characters that can be copied from a font context to an image buffer is limited to the number of characters in the font. Note that The buffer height must be at least the character Cell size Y multiplied by the number of lines necessary to hold all the characters. For more details see MocrInquire() with M_CHAR_CELL_SIZE_Y. (summarize)Copies character(s) from a font context to an image buffer. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Copies character(s) from an image buffer to a font context. |
You can add the following value to the above-mentioned values to specify that all font characters are copied.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Copies all font characters to/from the image buffer, stacked from left to right. Note that when M_ALL_CHAR is added, the CharListString parameter should be set to M_NULL and is ignored. (summarize)Copies all font characters to/from the image buffer, stacked from left to right. (more details...) |
You can add the following value to the above-mentioned value to specify that fonts are sorted by their ASCII character values.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sorts font by its ASCII character values. |
Specifies a string containing the list of characters to be copied.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to ignore this parameter. This is the only possible setting when copying all characters with M_ALL_CHAR. (summarize)Specifies to ignore this parameter. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the string containing the list of characters to be copied. This string must be null-terminated. Character representations copied to the font are associated with the characters, and their ASCII code, in the string. If a character exists in both the list and the font, the character representation will be overwritten with the new character representation. New characters will be added to the font provided that there is sufficient space in the OCR font context. If M_ALL_CHAR is added to the Operation parameter, this setting cannot be used. (summarize)Specifies the string containing the list of characters to be copied. (more details...) |
1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().
Header | Include mil.h. |
Library | Use mil.lib; milocr.lib. |
DLL | Requires mil.dll; milocr.dll. |