Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
• GFX_TextStringHeightGet() - Use this to get the height of the given font. All characters in a given font resource will have
a constant height.
• GFX_FontSet() - Use this to set the font resource to use.
• GFX_FontGet() - Use this to check the currently used font resource.
1.4.2.1.3.2 Anti-alised Fonts
This section describes the anti-aliasing feature of the library.
Description
The Graphics Library supports rendering of anti-aliased font resource. Anti-aliasing is a technique used to make the edges of
text appear smooth. This is useful especially with characters like 'A', 'O', etc which has slant or curved lines. Since the pixels
of the display are arranged in rectangular fashion, slant edges can't be represented smoothly. To make them appear
smooth, a pixel adjacent to the pixels is painted with an average of the foreground and background colors as depicted in
figure below.
When anti-aliasing is turned off, the pixels abruptly changes from background color to foreground color shown in the figure
below. To implement anti-aliasing, adjacent pixels transitions from background to foreground color using 25% or 75%
mid-color values from background to foreground colors. This feature in fonts will require roughly twice the size of memory
storage required for font glyphs with no anti-aliasing.
Since the average of foreground and background colors needs to be calculated at runtime, the rendering of anti-aliased fonts
take more time than rendering normal fonts.
Anti-aliasing transparency can be set to one of the following using GFX_FontAntiAliasSet() (see
GFX_FONT_ANTIALIAS_TYPE):
• GFX_FONT_ANTIALIAS_OPAQUE - Mid colors are calculated once while rendering each character which is ideal for
rendering text over a constant background. This is the default setting of the library.
• GFX_FONT_ANTIALIAS_TRANSLUCENT - The mid values are calculated for every pixel and this feature is useful while
rendering text over an image or on a non-constant color background.
As a result, rendering anti-aliased text takes longer with translucent type than compared to opaque type.
To use anti-aliasing, the font resource must contain glyphs that are anti-aliased enabled. The Graphics Resource Converter
(GRC) tool that comes with the installation of the Graphics Library can generate such font resources.
Remarks
• Application may use anti-aliased and non-anti-aliased fonts at the same time.
1.4.2.1.3.3 Extended Glyphs
This section describes the extended glyphs feature of the library.
1.4 Using The Library MLA - Graphics Library Help How the Library Works
55
Protego_Release_01_05-Related-OEM-Documentation-MLA_v2013_12_20-help_mla_gfx.pdf