Font Awesome icon font class
Follow the steps below to install a Font Awesome icon font
- Download a version of Font Awesome from this location: https://fontawesome.com/download
- Extract the zip file and note the major and minor version ([MAJOR_VERSION], [MINOR_VERSION])
- Copy the font from /otfs/Font Awesome x Free-Solid-900.otf to /core/HDPS/res/iconfonts and rename the file to: FontAwesome-[MAJOR_VERSION].[MINOR_VERSION].otf
- Copy the meta data file from /metadata/icons.json to core/HDPS/res/iconfonts and rename the file to: FontAwesome-[MAJOR_VERSION].[MINOR_VERSION].json
- Open /core/HDPS/res/ResourcesCore.qrc in a text editor and add two entries:
- <qresource prefix="/IconFonts"> ... <file alias="FontAwesome-[MAJOR_VERSION].[MINOR_VERSION].otf">iconfonts/FontAwesome-[MAJOR_VERSION].[MINOR_VERSION].otf</file> <file alias="FontAwesome-[MAJOR_VERSION].[MINOR_VERSION].json">iconfonts/FontAwesome-[MAJOR_VERSION].[MINOR_VERSION].json</file> </qresource>
- Add the font in the hdsp::Application constructor: _iconFonts.add(QSharedPointer<IconFont>(new FontAwesome([MAJOR_VERSION], [MINOR_VERSION])));
- Author
- Thomas Kroes