# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# MLA -- Graphics Resource Converter

1 January, 2014

- 1
- 2
…
- 26
- 27
- 28
- 29
- 30
…
- 67
- 68

buttons
XCHAR GroupBoxStr[] = {0x009F, 0x00BA, 0x00BE, 0x00B0, 0x00B2, 0x00A9, 0x009E, 0x00A5,
0x0000}; //GroupBox
XCHAR StaticTextStr[] = {0x00EC, 0x00DB, 0x00AA, 0x009D, 0x00A5, 0x00AB, 0x0000};
//StaticText
XCHAR SliderStr[] = {0x00A5, 0x00B8, 0x0099, 0x00A7, 0x00BE, 0x0000}; //Slider
XCHAR ProgressBarStr[] = {0x00B0, 0x00BC, 0x009F, 0x00BB, 0x00A5, 0x00AD, 0x00BE, 0x0000};
//Progress bar
XCHAR ListBoxStr[] = {0x00B9, 0x00A5, 0x00AB, 0x00B2, 0x00A9, 0x009E, 0x00A5, 0x0000};
//List box
XCHAR EditBoxStr[] = {0x00E3, 0x00EB, 0x00B2, 0x00A9, 0x009E, 0x00A5, 0x0000}; //Edit box
XCHAR MeterStr[] = {0x00B5, 0x00BE, 0x00A6, 0x00BE, 0x0000}; //Meter
XCHAR DialStr[] = {0x00A7, 0x0099, 0x00B6, 0x00BA, 0x0000}; //Dial
XCHAR PictureStr[] = {0x00DE, 0x00C7, 0x0000}; //Picture
XCHAR StaticTextLstStr[] = {0x00B3, 0x0099, 0x009E, 0x00BC, 0x00A8, 0x00A9, 0x00B0, 0x0090,
0x000A,
0x009F, 0x00B8, 0x00AE, 0x0098, 0x00A9, 0x009E, 0x000A,
0x00B8, 0x0099, 0x00AF, 0x00B8, 0x00B9, 0x000A,
0x00EC, 0x00DB, 0x00AA, 0x009D, 0x00A5, 0x00AB, 0x0087, 0x0093,
0x0092, 0x000A,
0x009F, 0x00BA, 0x00BE, 0x00B0, 0x00B2, 0x00A9, 0x009E, 0x00A5,
0x000A,
0x0090, 0x00AA, 0x00A5, 0x00AB, 0x0083, 0x0000}; //Microchip
Graphics Library Static Text and Group Box Test.
The character IDs listed in the arrays are not the same as the original IDs. This is due to the fact that the utility will be
generating a font table with contiguous and no unused character ID. Unused character IDs in the original font table are
removed resulting in memory saving.
6.2.2.3 Generating Reduced Font Tables
When using a font filter, the generated font table will only include characters in the strings section of the filter file (see Font
Filter File Format ( see page 24) for details). To maintain the character ID's of the standard ASCII character table use the
special string label "include" and include all the characters in the string from character ID 32 to 127.
include: " !#$%&'()*+`-.,/:;<=>?@[\]^_{|}~" //
include: 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ //
include: abcdefghijklmnopqrstuvwxyz // the standard ASCII character set from ID's 32 -
127
This will generate the font table with the ASCII characters with ID from 32 to 127. Doing this enables the user to refer to each
character in the application code in a normal fashion as shown in the example code below:
static char StringName[] = "Hello World";
However, if the characters included are not the complete set of the 32 to 127 character IDs, the generated font table may
change the character ID's of some or all the characters. For example:
include: 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ //
include: abcdefghijklmnopqrstuvwxyz // not the complete standard ASCII character set
from ID's 32 - 127
The generated font table will assign a character ID of 33 to '0' (character zero) and not 48 as seen from the ASCII table. The
reason is that the range of characters from '!' to '/' was not included. The utility will remove the unused characters and move
the next character to the location of the first removed character. The scheme will be performed on all characters thus the
generated font table will have a completely new character IDs. When this happens, the code above will not work since the
compiler assumes that the string "Hello World" will use the standard character IDs of all the characters. The code must be
modified to this form:
XCHAR HelloStr[] = {0x0032,0x0049,0x0050,0x0050,0x0053,0x0020,
0x0041,0x0053,0x0056,0x0050,0x0048, 0x0000}; //"Hello World";
If no other characters in the ASCII set will be used other than the characters that comprises the "Hello World" string it will be
best to use a string label to define the string "Hello World" in the font filter file.
HelloWorldStr: Hello World // generate only these characters in the font table
The generated reference file (
see page 24) will contain this declaration:
6.2 Font Graphics Resource Converter Font Filter
25
6

- 1
- 2
…
- 26
- 27
- 28
- 29
- 30
…
- 67
- 68