function Add(const aCharSet : TApxKeyString;
aFromCh : AnsiChar; aToCh : AnsiChar;
aFont : TApxKeyString; aGlyph : AnsiChar) : Boolean;
TApxKeyString = string[63];
Adds a new character set mapping to the instance.
The aCharSet parameter is the name of the character set. This name is defined by the emulator if there is no standard name for it. The character set name must be unique. In other words, different character sets will have different names. aFromCh and aToCh define an inclusive range of characters for the mapping (if aToCh equals aFromCh, the mapping is for a single character). aFont is the name of the font from which the glyph or glyphs are taken. aGlyph is the glyph from which the mapping starts. aFromCh is mapped to aGlyph, the character after aFromCh is mapped to the glyph after aGlyph, and so on until aToCh.
The result value is True if the character set mapping was added, False otherwise. The latter result would mean that the combination of aCharSet and the supplied range clashed with a mapping already present.
To help in designing portable character set mappings, one special value can be used for the font name. If the name is "<Default>", the emulator will use the currently defined font for the terminal component to display text.
To add a character set mapping for the standard ASCII characters using terminal (dec) as the font, see the following code example:
var
MyMap : TApxCharSetMapping;
begin
...
if not MyMap.Add(
'MyCharSet', ' ', '~', 'terminal (dec)', ' ') then
..mapping not added..
This tries to add a mapping for all of the characters between space and '~' in the MyCharSet character set to that same characters (i.e., glyphs) from the Courier New font.