Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
1.6.1.1.6.3 GFX_FontGet Function
This function returns the current font used when rendering strings and characters.
File
gfx_primitive.h
Syntax
GFX_RESOURCE_HDR* GFX_FontGet();
Returns
The pointer to the current font used in rendering strings and characters.
Description
This function returns the current font used to render strings and characters.
Preconditions
GFX_FontSet() must be called prior to any call to this function. If this function is called first, the returned value is undefined.
Example
None.
Function
GFX_RESOURCE_HDR GFX_FontGet(void)
1.6.1.1.6.4 GFX_FontSet Function
This function sets the current font used when rendering strings and characters.
File
gfx_primitive.h
Syntax
GFX_STATUS GFX_FontSet(GFX_RESOURCE_HDR * pFont);
Returns
The status of the set font action.
Description
This function sets the current font used to render strings and characters.
Preconditions
None.
Example
extern const GFX_RESOURCE_HDR Font25;
uint16_t width, height;
GFX_XCHAR myString[] = "Microchip Technology Inc.";
GFX_FontSet((GFX_RESOURCE_HDR*) &Font25);
GFX_ColorSet(GFX_X11_GREEN);
width = GFX_TextStringWidthGet(myString, (GFX_RESOURCE_HDR*) &Font25);
height = GFX_TextStringHeightGet((GFX_RESOURCE_HDR*) &Font25);
GFX_TextStringDraw( (GFX_MaxXGet() - width) >> 1,
(GFX_MaxYGet() - height) >> 1,
myString,
0);
1.6 Library Interface MLA - Graphics Library Help Graphics Primitive Layer
100
Protego_Release_01_05-Related-OEM-Documentation-MLA_v2013_12_20-help_mla_gfx.pdf