mdtDefineChar (Function) |
Top Previous Next |
This function is used to define a character in the MDT font. This feature is not available on the MDT-100.
The font in the MDT-200 uses characters 11 pixels wide by 20 pixels high. To help visualize and calculate the character map, use a table with 12 * 20 cells with each representing a pixel.
(Figure 1. Empty character pixel map)
The 12th column (with gray background in Figure 1) is not used in the character and is only included to ease the calculations. This must be filled with 0's (zeros). The 3 last rows (with green background in Figure 1) is below the writing line and should only be used if characters similar to "p", "g", or "q" are defined.
Draw the character in the table using 1's (ones, shows pixel) and 0's (zeros, hides pixel) as shown in Figure 2.
(Figure 2. Sample character: copyleft)
Once the table is filled, calculate the 3 hex digits for each line. The map string in the function contains the hex digits from the top-left and down. For the sample character in Figure 2., the map string would look like this: "0000000003F03F0618CCCD2CC2CD2CCCC6183F03F0000000000000000000".
Note: only uppercase characters can be used and no spacing characters can be included.
Input: index : INT (0..255) The index of the character to define.
map : STRING The calculated map of the character.
Returns: INT
Declaration: FUNCTION mdtDefineChar : INT;
Example: INCLUDE rtcu.inc |