The Font module contains the C part of the MicroVG implementation, which manages vectorial fonts. This module is composed of two elements:
- an implementation of Low-Level APIs to manipulate font files,
- an implementation of Low-Level APIs for MicroVG drawings.
The Font module implements the MicroVG VectorFont framework. It provides Low-Level APIs that consist of opening and decoding a font file and getting the font’s characteristics.
A font file:
- is either a TTF or an OTF,
- is identified by the resource name,
- can be stored as internal resource or external (see Application Resources).
No data is stored in the Java heap. The implementation is responsible for the font’s cycle life: allocation and release.
A font is used to draw a string with a color or with a linear gradient.
There are two separate Low-Level API header files (see LLVG_FONT: Vector Font):
LLVG_FONT_impl.hspecifies the Low-Level APIs used to open and retrieve the font’s characteristics.
LLVG_FONT_PAINTER_impl.hlists the Low-Level APIs called by VectorGraphicsPainter to draw a string with the font.
- MicroVG library calls the BSP functions through the header files
- The C module MicroVG provides a default implementation of
- The C module Freetype provides an implementation of
LLVG_FONT_PAINTER_impl.hover the Vivante VGLite library. It also redirects the complex layout to a third party C module.
- The drawer also manages the Gradient.
- The C module Harfbuzz provides an implementation of complex layout.
- These files are automatically copied in the BSP project when fetching the C modules during the platform build.