fix #67, Update to Font Awesome 7, added Pro+ icon support

This commit is contained in:
Rick Blommers
2025-08-28 15:59:34 +02:00
parent c197c2a272
commit e8230650d5
25 changed files with 8649 additions and 4980 deletions

View File

@@ -1,5 +1,6 @@
# Changes # Changes
- (2025-08-28) #67, Update to Font Awesome 7, added Pro+ icon support
- (2025-07-15) #66, Style name parsing (stringToStyleEnum) not working properly (contribution by @samapico) - (2025-07-15) #66, Style name parsing (stringToStyleEnum) not working properly (contribution by @samapico)
- (2025-05-08) #65, Support for Qt 6.9. Fix the CMakelist example - (2025-05-08) #65, Support for Qt 6.9. Fix the CMakelist example
- (2025-04-07) Update to 6.7.2 (Updated OTF files) - (2025-04-07) Update to 6.7.2 (Updated OTF files)

View File

@@ -1,7 +1,6 @@
MIT License # MIT License
===========
Copyright 2013-2025 [Blommers IT](https://blommersit.nl). All Rights Reserved. Copyright 2013-2025 [Ribit Software by Blommers IT](https://blommersit.nl). All Rights Reserved.
Author [Rick Blommers](mailto:rick@blommersit.nl) Author [Rick Blommers](mailto:rick@blommersit.nl)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
@@ -16,9 +15,7 @@ THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRI
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
## Font Awesome License
Font Awesome License
====================
[https://github.com/FortAwesome/Font-Awesome](https://github.com/FortAwesome/Font-Awesome) [https://github.com/FortAwesome/Font-Awesome](https://github.com/FortAwesome/Font-Awesome)

View File

@@ -3,7 +3,7 @@
* *
* MIT Licensed * MIT Licensed
* *
* Copyright 2013-2024 - Reliable Bits Software by Blommers IT. All Rights Reserved. * Copyright 2013-2025 - Ribit Software by Blommers IT. All Rights Reserved.
* Author Rick Blommers * Author Rick Blommers
*/ */
@@ -27,7 +27,9 @@
// Initializing namespaces need to happen outside a namespace // Initializing namespaces need to happen outside a namespace
static void qtawesome_init_resources() static void qtawesome_init_resources()
{ {
#ifdef FONT_AWESOME_PRO #if defined(FONT_AWESOME_PRO_PLUS)
Q_INIT_RESOURCE(QtAwesomeProPlus);
#elif defined(FONT_AWESOME_PRO)
Q_INIT_RESOURCE(QtAwesomePro); Q_INIT_RESOURCE(QtAwesomePro);
#else #else
Q_INIT_RESOURCE(QtAwesomeFree); Q_INIT_RESOURCE(QtAwesomeFree);
@@ -211,31 +213,49 @@ private:
//--------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------
const QString QtAwesome::FA_BRANDS_FONT_FILENAME = "Font Awesome 6 Brands-Regular-400.otf"; const QString QtAwesome::FA_BRANDS_FONT_FILENAME = "Font Awesome 7 Brands-Regular-400.otf";
#ifdef FONT_AWESOME_PRO
const QString QtAwesome::FA_DUOTONE_FONT_FILENAME = "pro/Font Awesome 6 Duotone-Solid-900.otf"; // DEPRECATED, use FA_DUOTONE_SOLID_FONT_FILENAME
const QString QtAwesome::FA_DUOTONE_SOLID_FONT_FILENAME = "pro/Font Awesome 6 Duotone-Solid-900.otf";
const QString QtAwesome::FA_DUOTONE_REGULAR_FONT_FILENAME = "pro/Font Awesome 6 Duotone-Regular-400.otf";
const QString QtAwesome::FA_DUOTONE_LIGHT_FONT_FILENAME = "pro/Font Awesome 6 Duotone-Light-300.otf";
const QString QtAwesome::FA_DUOTONE_THIN_FONT_FILENAME = "pro/Font Awesome 6 Duotone-Thin-100.otf";
const QString QtAwesome::FA_SOLID_FONT_FILENAME = "pro/Font Awesome 6 Pro-Solid-900.otf"; #if defined(FONT_AWESOME_PRO)
const QString QtAwesome::FA_REGULAR_FONT_FILENAME = "pro/Font Awesome 6 Pro-Regular-400.otf"; const QString QtAwesome::FA_DUOTONE_FONT_FILENAME = "pro/Font Awesome 7 Duotone-Solid-900.otf"; // DEPRECATED, use FA_DUOTONE_SOLID_FONT_FILENAME
const QString QtAwesome::FA_LIGHT_FONT_FILENAME = "pro/Font Awesome 6 Pro-Light-300.otf"; const QString QtAwesome::FA_DUOTONE_SOLID_FONT_FILENAME = "pro/Font Awesome 7 Duotone-Solid-900.otf";
const QString QtAwesome::FA_THIN_FONT_FILENAME = "pro/Font Awesome 6 Pro-Thin-100.otf"; const QString QtAwesome::FA_DUOTONE_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Duotone-Regular-400.otf";
const QString QtAwesome::FA_DUOTONE_LIGHT_FONT_FILENAME = "pro/Font Awesome 7 Duotone-Light-300.otf";
const QString QtAwesome::FA_DUOTONE_THIN_FONT_FILENAME = "pro/Font Awesome 7 Duotone-Thin-100.otf";
const QString QtAwesome::FA_SHARP_SOLID_FONT_FILENAME = "pro/Font Awesome 6 Sharp-Solid-900.otf"; const QString QtAwesome::FA_SOLID_FONT_FILENAME = "pro/Font Awesome 7 Pro-Solid-900.otf";
const QString QtAwesome::FA_SHARP_REGULAR_FONT_FILENAME = "pro/Font Awesome 6 Sharp-Regular-400.otf"; const QString QtAwesome::FA_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Pro-Regular-400.otf";
const QString QtAwesome::FA_SHARP_LIGHT_FONT_FILENAME = "pro/Font Awesome 6 Sharp-Light-300.otf"; const QString QtAwesome::FA_LIGHT_FONT_FILENAME = "pro/Font Awesome 7 Pro-Light-300.otf";
const QString QtAwesome::FA_SHARP_THIN_FONT_FILENAME = "pro/Font Awesome 6 Sharp-Thin-100.otf"; const QString QtAwesome::FA_THIN_FONT_FILENAME = "pro/Font Awesome 7 Pro-Thin-100.otf";
const QString QtAwesome::FA_SHARP_SOLID_FONT_FILENAME = "pro/Font Awesome 7 Sharp-Solid-900.otf";
const QString QtAwesome::FA_SHARP_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Sharp-Regular-400.otf";
const QString QtAwesome::FA_SHARP_LIGHT_FONT_FILENAME = "pro/Font Awesome 7 Sharp-Light-300.otf";
const QString QtAwesome::FA_SHARP_THIN_FONT_FILENAME = "pro/Font Awesome 7 Sharp-Thin-100.otf";
const QString QtAwesome::FA_SHARP_DUOTONE_SOLID_FONT_FILENAME = "pro/Font Awesome 7 Sharp Duotone-Solid-900.otf";
const QString QtAwesome::FA_SHARP_DUOTONE_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Sharp Duotone-Regular-400.otf";
const QString QtAwesome::FA_SHARP_DUOTONE_LIGHT_FONT_FILENAME = "pro/Font Awesome 7 Sharp Duotone-Light-300.otf";
const QString QtAwesome::FA_SHARP_DUOTONE_THIN_FONT_FILENAME = "pro/Font Awesome 7 Sharp Duotone-Thin-100.otf";
#ifdef FONT_AWESOME_PRO_PLUS
const QString QtAwesome::FA_CHISEL_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Chisel-Regular-400";
const QString QtAwesome::FA_ETCH_SOLID_FONT_FILENAME = "pro/Font Awesome 7 Etch-Solid-900.otf";
const QString QtAwesome::FA_JELLY_DUOTONE_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Jelly Duo-Regular-400.otf";
const QString QtAwesome::FA_JELLY_FILL_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Jelly Fill-Regular-400";
const QString QtAwesome::FA_JELLY_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Jelly-Regular-400.otf";
const QString QtAwesome::FA_NOTDOG_DUOTONE_SOLID_FONT_FILENAME = "pro/Font Awesome 7 Notdog Duo-Solid-900.otf";
const QString QtAwesome::FA_NOTDOG_SOLID_FONT_FILENAME = "pro/Font Awesome 7 Notdog-Solid-900.otf";
const QString QtAwesome::FA_SLAB_PRESS_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Slab Press-Regular-400.otf";
const QString QtAwesome::FA_SLAB_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Slab-Regular-400.otf";
const QString QtAwesome::FA_THUMBPRINT_LIGHT_FONT_FILENAME = "pro/Font Awesome 7 Thumbprint-Light-300.otf";
const QString QtAwesome::FA_WHITEBOARD_SEMIBOLD_FONT_FILENAME = "pro/Font Awesome 7 Whiteboard-Semibold-600.otf";
#endif
const QString QtAwesome::FA_SHARP_DUOTONE_SOLID_FONT_FILENAME = "pro/Font Awesome 6 Sharp Duotone-Solid-900.otf";
const QString QtAwesome::FA_SHARP_DUOTONE_REGULAR_FONT_FILENAME = "pro/Font Awesome 6 Sharp Duotone-Regular-400.otf";
const QString QtAwesome::FA_SHARP_DUOTONE_LIGHT_FONT_FILENAME = "pro/Font Awesome 6 Sharp Duotone-Light-300.otf";
const QString QtAwesome::FA_SHARP_DUOTONE_THIN_FONT_FILENAME = "pro/Font Awesome 6 Sharp Duotone-Thin-100.otf";
#else #else
const QString QtAwesome::FA_REGULAR_FONT_FILENAME = "Font Awesome 6 Free-Regular-400.otf"; const QString QtAwesome::FA_REGULAR_FONT_FILENAME = "Font Awesome 7 Free-Regular-400.otf";
const QString QtAwesome::FA_SOLID_FONT_FILENAME = "Font Awesome 6 Free-Solid-900.otf"; const QString QtAwesome::FA_SOLID_FONT_FILENAME = "Font Awesome 7 Free-Solid-900.otf";
#endif #endif
/// The default icon colors /// The default icon colors
@@ -270,6 +290,20 @@ QtAwesome::QtAwesome(QObject* parent)
_fontDetails.insert(fa::fa_sharp_duotone_thin, QtAwesomeFontData(FA_SHARP_DUOTONE_THIN_FONT_FILENAME, FA_SHARP_DUOTONE_THIN_FONT_WEIGHT)); _fontDetails.insert(fa::fa_sharp_duotone_thin, QtAwesomeFontData(FA_SHARP_DUOTONE_THIN_FONT_FILENAME, FA_SHARP_DUOTONE_THIN_FONT_WEIGHT));
#endif #endif
#ifdef FONT_AWESOME_PRO_PLUS
_fontDetails.insert(fa::fa_chisel_regular, QtAwesomeFontData(FA_CHISEL_REGULAR_FONT_FILENAME, FA_CHISEL_REGULAR_FONT_WEIGHT));
_fontDetails.insert(fa::fa_etch_solid, QtAwesomeFontData(FA_ETCH_SOLID_FONT_FILENAME, FA_ETCH_SOLID_FONT_WEIGHT));
_fontDetails.insert(fa::fa_jelly_regular, QtAwesomeFontData(FA_JELLY_REGULAR_FONT_FILENAME, FA_JELLY_REGULAR_FONT_WEIGHT));
_fontDetails.insert(fa::fa_jelly_duotone_regular, QtAwesomeFontData(FA_JELLY_DUOTONE_REGULAR_FONT_FILENAME, FA_JELLY_DUOTONE_REGULAR_FONT_WEIGHT));
_fontDetails.insert(fa::fa_jelly_fill_regular, QtAwesomeFontData(FA_JELLY_FILL_REGULAR_FONT_FILENAME, FA_JELLY_FILL_REGULAR_FONT_WEIGHT));
_fontDetails.insert(fa::fa_notdog_duotone_solid, QtAwesomeFontData(FA_NOTDOG_DUOTONE_SOLID_FONT_FILENAME, FA_NOTDOG_DUOTONE_SOLID_FONT_WEIGHT));
_fontDetails.insert(fa::fa_notdog_solid, QtAwesomeFontData(FA_NOTDOG_SOLID_FONT_FILENAME, FA_NOTDOG_SOLID_FONT_WEIGHT));
_fontDetails.insert(fa::fa_slab_press_regular, QtAwesomeFontData(FA_SLAB_PRESS_REGULAR_FONT_FILENAME, FA_SLAB_REGULAR_FONT_WEIGHT));
_fontDetails.insert(fa::fa_slab_regular, QtAwesomeFontData(FA_SLAB_REGULAR_FONT_FILENAME, FA_SLAB_REGULAR_FONT_WEIGHT));
_fontDetails.insert(fa::fa_thumbprint_light, QtAwesomeFontData(FA_THUMBPRINT_LIGHT_FONT_FILENAME, FA_THUMBPRINT_LIGHT_FONT_WEIGHT));
_fontDetails.insert(fa::fa_whiteboard_semibold, QtAwesomeFontData(FA_WHITEBOARD_SEMIBOLD_FONT_FILENAME, FA_WHITEBOARD_SEMIBOLD_FONT_WEIGHT));
#endif
#ifdef USE_COLOR_SCHEME #ifdef USE_COLOR_SCHEME
// support dark/light mode // support dark/light mode
QObject::connect(QApplication::styleHints(), &QStyleHints::colorSchemeChanged, this, [this](Qt::ColorScheme colorScheme){ QObject::connect(QApplication::styleHints(), &QStyleHints::colorSchemeChanged, this, [this](Qt::ColorScheme colorScheme){
@@ -311,8 +345,8 @@ QtAwesome::~QtAwesome()
qDeleteAll(_namedCodepointsList); qDeleteAll(_namedCodepointsList);
} }
/// a specialized init function so font-awesome is loaded and initialized /// A specialized init function so font-awesome is loaded and initialized
/// this method return true on success, it will return false if the fnot cannot be initialized /// This method return true on success, it will return false if the font cannot be initialized
/// To initialize QtAwesome with font-awesome you need to call this method /// To initialize QtAwesome with font-awesome you need to call this method
bool QtAwesome::initFontAwesome() bool QtAwesome::initFontAwesome()
{ {
@@ -320,9 +354,9 @@ bool QtAwesome::initFontAwesome()
// The macro below internally calls "qInitResources_QtAwesome()". this initializes // The macro below internally calls "qInitResources_QtAwesome()". this initializes
// the resource system. For a .pri project this isn't required, but when building and using a // the resource system. For a .pri project this isn't required, but when building and using a
// static library the resource need to initialized first. // static library the resource need to initialized first.
/// //
// I've checked th qInitResource_* code and calling this method mutliple times shouldn't be any problem // I've checked th qInitResource_* code and calling this method multiple times shouldn't be any problem
// (More info about this subject: http://qt-project.org/wiki/QtResources) // (More info about this subject: <http://qt-project.org/wiki/QtResources>)
qtawesome_init_resources(); qtawesome_init_resources();
for (QtAwesomeFontData &fd : _fontDetails) { for (QtAwesomeFontData &fd : _fontDetails) {
@@ -376,6 +410,20 @@ bool QtAwesome::initFontAwesome()
_namedCodepointsByStyle.insert(fa::fa_sharp_duotone_regular, _namedCodepointsByStyle.value(fa::fa_solid)); _namedCodepointsByStyle.insert(fa::fa_sharp_duotone_regular, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_sharp_duotone_light, _namedCodepointsByStyle.value(fa::fa_solid)); _namedCodepointsByStyle.insert(fa::fa_sharp_duotone_light, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_sharp_duotone_thin, _namedCodepointsByStyle.value(fa::fa_solid)); _namedCodepointsByStyle.insert(fa::fa_sharp_duotone_thin, _namedCodepointsByStyle.value(fa::fa_solid));
#ifdef FONT_AWESOME_PRO_PLUS
_namedCodepointsByStyle.insert(fa::fa_chisel_regular, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_etch_solid, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_jelly_regular, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_jelly_duotone_regular, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_jelly_fill_regular, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_notdog_duotone_solid, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_notdog_solid, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_slab_press_regular, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_slab_regular, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_thumbprint_light, _namedCodepointsByStyle.value(fa::fa_solid));
_namedCodepointsByStyle.insert(fa::fa_whiteboard_semibold, _namedCodepointsByStyle.value(fa::fa_solid));
#endif
#else #else
addToNamedCodePoints(fa::fa_regular, faRegularFreeIconArray, sizeof(faRegularFreeIconArray)/sizeof(QtAwesomeNamedIcon)); addToNamedCodePoints(fa::fa_regular, faRegularFreeIconArray, sizeof(faRegularFreeIconArray)/sizeof(QtAwesomeNamedIcon));
#endif #endif
@@ -560,7 +608,23 @@ int QtAwesome::stringToStyleEnum(const QString style) const
else if (style == "fa-sharp-duotone-regular") return fa::fa_sharp_duotone_regular; else if (style == "fa-sharp-duotone-regular") return fa::fa_sharp_duotone_regular;
else if (style == "fa-sharp-duotone-light") return fa::fa_sharp_duotone_light; else if (style == "fa-sharp-duotone-light") return fa::fa_sharp_duotone_light;
else if (style == "fa-sharp-duotone-thin") return fa::fa_sharp_duotone_thin; else if (style == "fa-sharp-duotone-thin") return fa::fa_sharp_duotone_thin;
#ifdef FONT_AWESOME_PRO_PLUS
else if (style == "fa-chisel") return fa::fa_chisel_regular;
else if (style == "fa-etch") return fa::fa_etch_solid;
else if (style == "fa-jelly") return fa::fa_jelly_regular;
else if (style == "fa-jelly-duo") return fa::fa_jelly_duotone_regular;
else if (style == "fa-jelly-fill") return fa::fa_jelly_fill_regular;
else if (style == "fa-notdog") return fa::fa_notdog_solid;
else if (style == "fa-notdog-duo") return fa::fa_notdog_duotone_solid;
else if (style == "fa-slab") return fa::fa_slab_regular;
else if (style == "fa-slab-press") return fa::fa_slab_press_regular;
else if (style == "fa-thumbprint") return fa::fa_thumbprint_light;
else if (style == "fa-whiteboard") return fa::fa_whiteboard_semibold;
#endif
#endif #endif
return fa::fa_solid; return fa::fa_solid;
} }
@@ -586,7 +650,21 @@ const QString QtAwesome::styleEnumToString(int style) const
case fa::fa_sharp_duotone_regular: return "fa-sharp-duotone-regular"; case fa::fa_sharp_duotone_regular: return "fa-sharp-duotone-regular";
case fa::fa_sharp_duotone_light: return "fa-sharp-duotone-light"; case fa::fa_sharp_duotone_light: return "fa-sharp-duotone-light";
case fa::fa_sharp_duotone_thin: return "fa-sharp-duotone-thin"; case fa::fa_sharp_duotone_thin: return "fa-sharp-duotone-thin";
#ifdef FONT_AWESOME_PRO_PLUS
case fa::fa_etch_solid: return "fa-chisel";
case fa::fa_jelly_regular: return "fa-jelly";
case fa::fa_jelly_duotone_regular: return "fa-jelly-duo";
case fa::fa_jelly_fill_regular: return "fa-jelly-fill";
case fa::fa_notdog_solid: return "fa-notdog";
case fa::fa_notdog_duotone_solid: return "fa-notdog-duo";
case fa::fa_slab_regular: return "fa-slab";
case fa::fa_slab_press_regular: return "fa-slab-press";
case fa::fa_thumbprint_light: return "fa-thumbprint";
case fa::fa_whiteboard_semibold: return "fa-whiteboard";
#endif
#endif #endif
} }
return "fa-solid"; return "fa-solid";
} }

View File

@@ -3,7 +3,7 @@
* *
* MIT Licensed * MIT Licensed
* *
* Copyright 2013-2024 - Reliable Bits Software by Blommers IT. All Rights Reserved. * Copyright 2013-2025 - Ribit Software by Blommers IT. All Rights Reserved.
* Author Rick Blommers * Author Rick Blommers
*/ */
@@ -16,18 +16,25 @@
#include <QRect> #include <QRect>
#include <QVariantMap> #include <QVariantMap>
// Having font awesome pro+ also means the usage of Font awesome pro
#ifdef FONT_AWESOME_PRO_PLUS
#define FONT_AWESOME_PRO
#endif
#include "QtAwesomeAnim.h" #include "QtAwesomeAnim.h"
/// A list of all icon-names with the codepoint (unicode-value) on the right /// A list of all icon-names with the codepoint (unicode-value) on the right
/// You can use the names on the page http://fortawesome.github.io/Font-Awesome/design.html /// You can use the names on the page http://fortawesome.github.io/Font-Awesome/design.html
#include "QtAwesomeEnumGenerated.h" #include "QtAwesomeEnumGenerated.h"
namespace fa { namespace fa {
/// A list of all style-names /// A list of all style-names
enum fa_styles { enum fa_styles {
fa_solid = 0, fa_solid = 0,
fa_regular = 1, fa_regular = 1,
#ifdef FONT_AWESOME_PRO #ifdef FONT_AWESOME_PRO
fa_light = 3, fa_light = 3,
fa_thin = 4, fa_thin = 4,
@@ -48,6 +55,27 @@ enum fa_styles {
fa_sharp_duotone_light = 15, fa_sharp_duotone_light = 15,
fa_sharp_duotone_thin = 16, fa_sharp_duotone_thin = 16,
#endif #endif
#ifdef FONT_AWESOME_PRO_PLUS
fa_chisel_regular = 17,
fa_etch_solid = 18,
fa_jelly_regular = 19,
fa_jelly_duotone_regular = 20,
fa_jelly_fill_regular = 21,
fa_notdog_duotone_solid = 22,
fa_notdog_solid = 23,
fa_slab_press_regular = 24,
fa_slab_regular = 25,
fa_thumbprint_light = 26,
fa_whiteboard_semibold = 27,
#endif
fa_brands = 2 fa_brands = 2
}; };
@@ -137,6 +165,34 @@ public:
static const QFont::Weight FA_SHARP_DUOTONE_THIN_FONT_WEIGHT = QFont::ExtraLight; static const QFont::Weight FA_SHARP_DUOTONE_THIN_FONT_WEIGHT = QFont::ExtraLight;
#endif #endif
#ifdef FONT_AWESOME_PRO_PLUS
static const QString FA_CHISEL_REGULAR_FONT_FILENAME; // fa-chisel fa-regular
static const QString FA_ETCH_SOLID_FONT_FILENAME; // fa-etch fa-solid
static const QString FA_JELLY_REGULAR_FONT_FILENAME; // fa-jelly fa-regular
static const QString FA_JELLY_DUOTONE_REGULAR_FONT_FILENAME; // fa-jelly-duo fa-regular
static const QString FA_JELLY_FILL_REGULAR_FONT_FILENAME; // fa-jelly-fill fa-regular
static const QString FA_NOTDOG_DUOTONE_SOLID_FONT_FILENAME; // fa-notdog-duo fa-solid
static const QString FA_NOTDOG_SOLID_FONT_FILENAME; // fa-notdog fa-solid
static const QString FA_SLAB_PRESS_REGULAR_FONT_FILENAME; // fa-slab-press fa-regular
static const QString FA_SLAB_REGULAR_FONT_FILENAME; // fa-slab fa-regular
static const QString FA_THUMBPRINT_LIGHT_FONT_FILENAME; // fa-thumbprint fa-light
static const QString FA_WHITEBOARD_SEMIBOLD_FONT_FILENAME; // fa-whiteboard fa-semibold
static const QFont::Weight FA_CHISEL_REGULAR_FONT_WEIGHT = QFont::Normal;
static const QFont::Weight FA_ETCH_SOLID_FONT_WEIGHT = QFont::Black;
static const QFont::Weight FA_JELLY_REGULAR_FONT_WEIGHT = QFont::Normal;
static const QFont::Weight FA_JELLY_DUOTONE_REGULAR_FONT_WEIGHT = QFont::Normal;
static const QFont::Weight FA_JELLY_FILL_REGULAR_FONT_WEIGHT = QFont::Normal;
static const QFont::Weight FA_NOTDOG_DUOTONE_SOLID_FONT_WEIGHT = QFont::Black;
static const QFont::Weight FA_NOTDOG_SOLID_FONT_WEIGHT = QFont::Black;
static const QFont::Weight FA_SLAB_PRESS_REGULAR_FONT_WEIGHT = QFont::Normal;
static const QFont::Weight FA_SLAB_REGULAR_FONT_WEIGHT = QFont::Normal;
static const QFont::Weight FA_THUMBPRINT_LIGHT_FONT_WEIGHT = QFont::Light;
static const QFont::Weight FA_WHITEBOARD_SEMIBOLD_FONT_WEIGHT = QFont::DemiBold;
#endif
public: public:
explicit QtAwesome(QObject* parent = nullptr); explicit QtAwesome(QObject* parent = nullptr);

View File

@@ -2,8 +2,8 @@ defineReplace( resourcesForConfig ){
return($$PWD/QtAwesome$$eval($$1).qrc) return($$PWD/QtAwesome$$eval($$1).qrc)
} }
options = $$find(CONFIG, fontAwesomePro) $$find(CONFIG, fontAwesomeFree) options = $$find(CONFIG, fontAweomeProPlus) $$find(CONFIG, fontAwesomePro) $$find(CONFIG, fontAwesomeFree)
count(options, 0) { error("fontAwesomePro or fontAwesomeFree should be defined") } count(options, 0) { error("fontAwesomeProPlus, fontAwesomePro or fontAwesomeFree should be defined") }
count(options, 2) { error("fontAwesomePro and fontAwesomeFree were defined, only one config is accepted") } count(options, 2) { error("fontAwesomePro and fontAwesomeFree were defined, only one config is accepted") }
INCLUDEPATH += $$PWD INCLUDEPATH += $$PWD
@@ -18,6 +18,13 @@ HEADERS += $$PWD/QtAwesome.h \
$$PWD/QtAwesomeStringGenerated.h $$PWD/QtAwesomeStringGenerated.h
CONFIG( fontAwesomeProPlus ){
config = ProPlus
RESOURCES += $$resourcesForConfig(config)
DEFINES += FONT_AWESOME_PRO_PLUS=1
!build_pass:message(using font awesome pro+)
}
CONFIG( fontAwesomePro ){ CONFIG( fontAwesomePro ){
config = Pro config = Pro
RESOURCES += $$resourcesForConfig(config) RESOURCES += $$resourcesForConfig(config)

View File

@@ -10,6 +10,7 @@ CONFIG += staticlib c++11
QT += widgets QT += widgets
# only one option must be enabled # only one option must be enabled
#CONFIG += fontAwesomeProPlus
#CONFIG += fontAwesomePro #CONFIG += fontAwesomePro
CONFIG += fontAwesomeFree CONFIG += fontAwesomeFree
include(QtAwesome.pri) include(QtAwesome.pri)

View File

@@ -15,7 +15,6 @@ QtAwesomeAnimation::QtAwesomeAnimation(QWidget *parentWidget, int interval, int
, step_(step) , step_(step)
, angle_(0.0f) , angle_(0.0f)
{ {
} }
void QtAwesomeAnimation::setup(QPainter &painter, const QRect &rect) void QtAwesomeAnimation::setup(QPainter &painter, const QRect &rect)
@@ -38,7 +37,6 @@ void QtAwesomeAnimation::setup(QPainter &painter, const QRect &rect)
} }
} }
void QtAwesomeAnimation::update() void QtAwesomeAnimation::update()
{ {
angle_ += step_; angle_ += step_;

View File

@@ -29,7 +29,6 @@ namespace fa {
int interval_; int interval_;
int step_; int step_;
float angle_; float angle_;
}; };
} // namespace fa } // namespace fa

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
<RCC> <RCC>
<qresource prefix="/"> <qresource prefix="/">
<file>fonts/Font Awesome 6 Brands-Regular-400.otf</file> <file>fonts/Font Awesome 7 Brands-Regular-400.otf</file>
<file>fonts/Font Awesome 6 Free-Regular-400.otf</file> <file>fonts/Font Awesome 7 Free-Regular-400.otf</file>
<file>fonts/Font Awesome 6 Free-Solid-900.otf</file> <file>fonts/Font Awesome 7 Free-Solid-900.otf</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@@ -1,21 +1,21 @@
<RCC> <RCC>
<qresource prefix="/"> <qresource prefix="/">
<file>fonts/Font Awesome 6 Brands-Regular-400.otf</file> <file>fonts/Font Awesome 7 Brands-Regular-400.otf</file>
<file>fonts/pro/Font Awesome 6 Duotone-Solid-900.otf</file> <file>fonts/pro/Font Awesome 7 Duotone-Light-300.otf</file>
<file>fonts/pro/Font Awesome 6 Duotone-Regular-400.otf</file> <file>fonts/pro/Font Awesome 7 Duotone-Regular-400.otf</file>
<file>fonts/pro/Font Awesome 6 Duotone-Light-300.otf</file> <file>fonts/pro/Font Awesome 7 Duotone-Solid-900.otf</file>
<file>fonts/pro/Font Awesome 6 Duotone-Thin-100.otf</file> <file>fonts/pro/Font Awesome 7 Duotone-Thin-100.otf</file>
<file>fonts/pro/Font Awesome 6 Pro-Solid-900.otf</file> <file>fonts/pro/Font Awesome 7 Pro-Light-300.otf</file>
<file>fonts/pro/Font Awesome 6 Pro-Regular-400.otf</file> <file>fonts/pro/Font Awesome 7 Pro-Regular-400.otf</file>
<file>fonts/pro/Font Awesome 6 Pro-Light-300.otf</file> <file>fonts/pro/Font Awesome 7 Pro-Solid-900.otf</file>
<file>fonts/pro/Font Awesome 6 Pro-Thin-100.otf</file> <file>fonts/pro/Font Awesome 7 Pro-Thin-100.otf</file>
<file>fonts/pro/Font Awesome 6 Sharp-Solid-900.otf</file> <file>fonts/pro/Font Awesome 7 Sharp-Light-300.otf</file>
<file>fonts/pro/Font Awesome 6 Sharp-Regular-400.otf</file> <file>fonts/pro/Font Awesome 7 Sharp-Regular-400.otf</file>
<file>fonts/pro/Font Awesome 6 Sharp-Light-300.otf</file> <file>fonts/pro/Font Awesome 7 Sharp-Solid-900.otf</file>
<file>fonts/pro/Font Awesome 6 Sharp-Thin-100.otf</file> <file>fonts/pro/Font Awesome 7 Sharp-Thin-100.otf</file>
<file>fonts/pro/Font Awesome 6 Sharp Duotone-Solid-900.otf</file> <file>fonts/pro/Font Awesome 7 Sharp Duotone-Light-300.otf</file>
<file>fonts/pro/Font Awesome 6 Sharp Duotone-Regular-400.otf</file> <file>fonts/pro/Font Awesome 7 Sharp Duotone-Regular-400.otf</file>
<file>fonts/pro/Font Awesome 6 Sharp Duotone-Light-300.otf</file> <file>fonts/pro/Font Awesome 7 Sharp Duotone-Solid-900.otf</file>
<file>fonts/pro/Font Awesome 6 Sharp Duotone-Thin-100.otf</file> <file>fonts/pro/Font Awesome 7 Sharp Duotone-Thin-100.otf</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@@ -0,0 +1,32 @@
<RCC>
<qresource prefix="/">
<file>fonts/Font Awesome 7 Brands-Regular-400.otf</file>
<file>fonts/pro/Font Awesome 7 Chisel-Regular-400.otf</file>
<file>fonts/pro/Font Awesome 7 Duotone-Light-300.otf</file>
<file>fonts/pro/Font Awesome 7 Duotone-Regular-400.otf</file>
<file>fonts/pro/Font Awesome 7 Duotone-Solid-900.otf</file>
<file>fonts/pro/Font Awesome 7 Duotone-Thin-100.otf</file>
<file>fonts/pro/Font Awesome 7 Etch-Solid-900.otf</file>
<file>fonts/pro/Font Awesome 7 Jelly Duo-Regular-400.otf</file>
<file>fonts/pro/Font Awesome 7 Jelly Fill-Regular-400.otf</file>
<file>fonts/pro/Font Awesome 7 Jelly-Regular-400.otf</file>
<file>fonts/pro/Font Awesome 7 Notdog Duo-Solid-900.otf</file>
<file>fonts/pro/Font Awesome 7 Notdog-Solid-900.otf</file>
<file>fonts/pro/Font Awesome 7 Pro-Light-300.otf</file>
<file>fonts/pro/Font Awesome 7 Pro-Regular-400.otf</file>
<file>fonts/pro/Font Awesome 7 Pro-Solid-900.otf</file>
<file>fonts/pro/Font Awesome 7 Pro-Thin-100.otf</file>
<file>fonts/pro/Font Awesome 7 Sharp Duotone-Light-300.otf</file>
<file>fonts/pro/Font Awesome 7 Sharp Duotone-Regular-400.otf</file>
<file>fonts/pro/Font Awesome 7 Sharp Duotone-Solid-900.otf</file>
<file>fonts/pro/Font Awesome 7 Sharp Duotone-Thin-100.otf</file>
<file>fonts/pro/Font Awesome 7 Sharp-Light-300.otf</file>
<file>fonts/pro/Font Awesome 7 Sharp-Regular-400.otf</file>
<file>fonts/pro/Font Awesome 7 Sharp-Solid-900.otf</file>
<file>fonts/pro/Font Awesome 7 Sharp-Thin-100.otf</file>
<file>fonts/pro/Font Awesome 7 Slab Press-Regular-400.otf</file>
<file>fonts/pro/Font Awesome 7 Slab-Regular-400.otf</file>
<file>fonts/pro/Font Awesome 7 Thumbprint-Light-300.otf</file>
<file>fonts/pro/Font Awesome 7 Whiteboard-Semibold-600.otf</file>
</qresource>
</RCC>

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -19,7 +19,8 @@ HEADERS += \
# only one option must be enabled # only one option must be enabled
#CONFIG += fontAwesomePro # CONFIG += fontAwesomeProPlus
# CONFIG += fontAwesomePro
CONFIG += fontAwesomeFree CONFIG += fontAwesomeFree
include(../QtAwesome/QtAwesome.pri) include(../QtAwesome/QtAwesome.pri)

View File

@@ -1,7 +1,7 @@
/** /**
* MIT Licensed * MIT Licensed
* *
* Copyright 2011-2022 - Reliable Bits Software by Blommers IT. All Rights Reserved. * Copyright 2011-2025 - Ribit Software by Blommers IT. All Rights Reserved.
* Author Rick Blommers * Author Rick Blommers
*/ */
@@ -19,6 +19,6 @@ int main(int argc, char *argv[])
QApplication app(argc, argv); QApplication app(argc, argv);
MainWindow w; MainWindow w;
w.show(); w.show();
return app.exec(); return app.exec();
} }

View File

@@ -17,7 +17,7 @@ MainWindow::MainWindow(QWidget *parent) :
ui->comboBox->addItem("Solid", fa::fa_solid); ui->comboBox->addItem("Solid", fa::fa_solid);
ui->comboBox->addItem("Brands", fa::fa_brands); ui->comboBox->addItem("Brands", fa::fa_brands);
ui->comboBox->addItem("Regular", fa::fa_regular); ui->comboBox->addItem("Regular", fa::fa_regular);
#ifdef FONT_AWESOME_PRO #if defined(FONT_AWESOME_PRO)
ui->comboBox->addItem("Light", fa::fa_light); ui->comboBox->addItem("Light", fa::fa_light);
ui->comboBox->addItem("Thin", fa::fa_thin); ui->comboBox->addItem("Thin", fa::fa_thin);
// ui->comboBox->addItem("Duotone", fa::fa_duotone); // DEPRECATED // ui->comboBox->addItem("Duotone", fa::fa_duotone); // DEPRECATED
@@ -35,6 +35,20 @@ MainWindow::MainWindow(QWidget *parent) :
ui->comboBox->addItem("Sharp Duotone Thin", fa::fa_sharp_duotone_thin); ui->comboBox->addItem("Sharp Duotone Thin", fa::fa_sharp_duotone_thin);
#endif #endif
#if defined(FONT_AWESOME_PRO_PLUS)
ui->comboBox->addItem("Chisel Regular", fa::fa_chisel_regular);
ui->comboBox->addItem("Etch Solid", fa::fa_etch_solid);
ui->comboBox->addItem("Jelly Regular", fa::fa_jelly_regular);
ui->comboBox->addItem("Jelly Duotone Regular", fa::fa_jelly_duotone_regular);
ui->comboBox->addItem("Jelly Fill Regular", fa::fa_jelly_fill_regular);
ui->comboBox->addItem("Notdog Duotone Solid", fa::fa_notdog_duotone_solid);
ui->comboBox->addItem("Notdog Solid", fa::fa_notdog_solid);
ui->comboBox->addItem("Slab Press Regular", fa::fa_slab_press_regular);
ui->comboBox->addItem("Slab Regular", fa::fa_slab_regular);
ui->comboBox->addItem("Thumbprint Light", fa::fa_thumbprint_light);
ui->comboBox->addItem("Whiteboard Semibold", fa::fa_whiteboard_semibold);
#endif
// a simple beer button // a simple beer button
//===================== //=====================
{ {

View File

@@ -1,54 +1,43 @@
# QtAwesome - Font Awesome for Qt Applications # QtAwesome - Font Awesome for Qt Applications
QtAwesome is a library to add [Font Awesome](https://fontawesome.com) QtAwesome is a library to add [Font Awesome](https://fontawesome.com) icons to your [Qt application](http://qt-project.org/).
icons to your [Qt application](http://qt-project.org/).
## Table of Contents ## Table of Contents
- [Latest Release 6.7.2](#latest-release-672) - [Latest Release 7](#latest-release-7)
- [Font Awesome 6 Release](#font-awesome-6-release)
- [Installation Free Version](#installation-free-version) - [Installation Free Version](#installation-free-version)
- [Installation Pro version](#installation-pro-version) - [Installation Pro version](#installation-pro-version)
- [Installation Pro Plus version](#installation-pro-plus-version)
- [Basic Usage](#basic-usage) - [Basic Usage](#basic-usage)
- [Examples](#examples) - [Examples](#examples)
- [Example Custom Painter](#example-custom-painter) - [Example Custom Painter](#example-custom-painter)
- [Default options](#default-options) - [Default options](#default-options)
- [Known Issues And Workarounds](#known-issues-and-workarounds) - [Known Issues And Workarounds](#known-issues-and-workarounds)
- [Summary of Changes](#summary-of-changes)
- [Thanks](#thanks) - [Thanks](#thanks)
- [Contact](#contact) - [Contact](#contact)
- [License](#license) - [License](#license)
## Latest Release 6.7.2 ## Latest Release 7
Update of font files to 6.7.2 Updated to Font Awesome 7
When using Pro+, the extra styles Chisel, Etch, Jelly, Notdog, Slab, Thumbprint and Whiteboard are available.
[View changelog](CHANGES.md) [View changelog](CHANGES.md)
## Font Awesome 6 Release
This is the Font Awesome 6 release. It replaces the main branch, which still was a Font Awesome 4 version.
(There's also a Font Awesome 5 branch, but was never merged to the main/master branch.)
This release is **not** completely backwards compatible with the 4 and 5 releases.
The decision was made for a new clean version which better suited for the future.
(A compatibility layer is in development).
Previous versions used a hand-crafted icon list, this version has a generated list.
Having troubles with this new release? Having troubles with this new release?
- You can find the previous `master` branch in the [fontawesome-4](https://github.com/gamecreature/QtAwesome/tree/fontawesome-4) branch. (`master` is dropped in favour of `main`) - The [main](https://github.com/gamecreature/QtAwesome/) branch contains the latest Font Awesome 7 version.
- The [fontawesome-6](https://github.com/gamecreature/QtAwesome/tree/fontawesome-6) branch contains the Font Awesome 6 version
- The [fontawesome-5](https://github.com/gamecreature/QtAwesome/tree/fontawesome-5) branch contains the Font Awesome 5 version. - The [fontawesome-5](https://github.com/gamecreature/QtAwesome/tree/fontawesome-5) branch contains the Font Awesome 5 version.
- The new [main](https://github.com/gamecreature/QtAwesome/) branch contains the latest Font Awesome 6 version. - You can find the previous `master` branch in the [fontawesome-4](https://github.com/gamecreature/QtAwesome/tree/fontawesome-4) branch. (`master` is dropped in favour of `main`)
- Open a github issue if you'v found a bug or have a suggestion - Open a github issue if you've found a bug or have a suggestion
## Installation Free Version ## Installation Free Version
The easiest way to include QtAweome in your project is to copy the QtAwesome directory to your You can include QtAweome to your project by copying the QtAwesome directory to
project tree and add the following `include()` to your Qt project file: your project tree and add the following `include()` to your Qt project file:
```bash ```sh
CONFIG+=fontAwesomeFree CONFIG+=fontAwesomeFree
include(QtAwesome/QtAwesome.pri) include(QtAwesome/QtAwesome.pri)
``` ```
@@ -59,17 +48,31 @@ Now you are good to go! The free fonts are included in this project.
To activate the pro version, `fontAwesomePro` config should be defined. To activate the pro version, `fontAwesomePro` config should be defined.
```bash ```sh
CONFIG+=fontAwesomePro CONFIG+=fontAwesomePro
include(QtAwesome/QtAwesome.pri) include(QtAwesome/QtAwesome.pri)
``` ```
And the pro font files need to be copied to the `QtAwesome/fonts/pro` folder. And the pro font files need to be copied to the `QtAwesome/fonts/pro` folder.
(ex, Font Awesome 6 Brands-Regular-400.otf, etc... )
## Installation Pro Plus version
To activate the pro+ version, `fontAwesomePro` config should be defined.
```sh
CONFIG+=fontAwesomePro
include(QtAwesome/QtAwesome.pri)
```
Using the fontAwesomePro config, implies the definition of
FONT_AWESOME_PRO, and FONT_AWESOME_PRO_PLUS)
Place the pro+ font files to the `QtAwesome/fonts/pro` folder.
## Basic Usage ## Basic Usage
You probably want to create a single QtAwesome object for your whole application. Create a single QtAwesome object for your whole application.
```c++ ```c++
fa::QtAwesome* awesome = new fa::QtAwesome(qApp) fa::QtAwesome* awesome = new fa::QtAwesome(qApp)
@@ -97,7 +100,7 @@ QPushButton* btn = new QPushButton(awesome->icon("solid coffee" ), "Black please
QPushButton* btn = new QPushButton(awesome->icon("coffee" ), "Black please!"); QPushButton* btn = new QPushButton(awesome->icon("coffee" ), "Black please!");
``` ```
For shorter syntax (more Font Aweseome like) is possible to bring the fa namespace into the curren scope: For shorter syntax (more Font Awesome like) is possible to bring the fa namespace into the current scope:
```c++ ```c++
using namespace fa; using namespace fa;
@@ -113,7 +116,7 @@ options.insert("color" , QColor(255, 0 ,0));
QPushButton* musicButton = new QPushButton(awesome->icon(fa::fa_solid, fa::music, options), "Music"); QPushButton* musicButton = new QPushButton(awesome->icon(fa::fa_solid, fa::music, options), "Music");
``` ```
The defaults option can also be adjusted via the `setDefaultOption` method.\ The defaults option can also be adjusted via the `setDefaultOption` method.
For example having green disabled icons, it is possible to call: For example having green disabled icons, it is possible to call:
```c++ ```c++
@@ -193,7 +196,7 @@ setDefaultOption("duotone-color-active", QApplication::palette().color(QPalette:
setDefaultOption("duotone-color-selected", QApplication::palette().color(QPalette::Active, QPalette::BrightText)); setDefaultOption("duotone-color-selected", QApplication::palette().color(QPalette::Active, QPalette::BrightText));
``` ```
When creating an icon, it first populates the options-map with the default options from the QtAwesome object. When creating an icon, it first populates the options map with the default options from the QtAwesome object.
After that the options are expanded/overwritten by the options supplied to the icon. After that the options are expanded/overwritten by the options supplied to the icon.
It is possible to use another glyph per icon-state. For example to make an icon-unlock symbol switch to locked when selected, It is possible to use another glyph per icon-state. For example to make an icon-unlock symbol switch to locked when selected,
@@ -256,26 +259,17 @@ QAction* menuAction = new QAction("test");
menuAction->setIcon(awesome->icon(fa::fa_heart).pixmap(32,32)); menuAction->setIcon(awesome->icon(fa::fa_heart).pixmap(32,32));
``` ```
## Summary of Changes
- The complete icons set is renewed and is generated
- Everything is namespaced in the `fa` namespace
- Icon name enumerations are changed so the full Font Aweomse name is used: `fa::user` => `fa::fa_user`.
With the dashes replaced by underscores.
- Font Awesome 6 full style names, like `fa::fa_regular`, `fa::fa_solid`
- This release has been tested with Qt 5 and Qt 6.
## Thanks ## Thanks
Thanks go to the contributors of this project! Thanks go to the contributors of this project!
Many thanks go to Dave Gandy an the other Font Awesome contributors!! [https://github.com/FortAwesome/Font-Awesome](https://github.com/FortAwesome/Font-Awesome) Many thanks go to Dave Gandy and the other Font Awesome contributors!! [https://github.com/FortAwesome/Font-Awesome](https://github.com/FortAwesome/Font-Awesome)
And of course to the Qt team/contributors for supplying this great cross-platform c++ library. And of course to the Qt team/contributors for supplying this great cross-platform c++ library.
Contributions are welcome! Feel free to fork and send a pull request through Github. Contributions are welcome! Feel free to fork and send a pull request through Github.
<a href="https://github.com/gamecreature/qtawesome/graphs/contributors"> <a href="https://github.com/gamecreature/qtawesome/graphs/contributors">
<img src="https://contrib.rocks/image?repo=gamecreature/qtawesome" /> <img src="https://contrib.rocks/image?repo=gamecreature/qtawesome" />
</a> </a>
<small>*Contribution list made with [contrib.rocks](https://contrib.rocks).*</small> <small>*Contribution list made with [contrib.rocks](https://contrib.rocks).*</small>
@@ -290,8 +284,8 @@ Contributions are welcome! Feel free to fork and send a pull request through Git
## License ## License
MIT License. Copyright 2013-2022 - Reliable Bits Software by Blommers IT. [https://blommersit.nl/](https://blommersit.nl) MIT License. Copyright 2013-2025 - Ribit Software by Blommers IT. [https://blommersit.nl/](https://blommersit.nl)
The Font Awesome font is licensed under the SIL Open Font License - [https://scripts.sil.org/OFL](http://scripts.sil.org/OFL) The Font Awesome font is licensed under the SIL Open Font License - [https://scripts.sil.org/OFL](http://scripts.sil.org/OFL)
The Font Awesome pictograms are licensed under the CC BY 3.0 License - [https://creativecommons.org/licenses/by/3.0/](http://creativecommons.org/licenses/by/3.0/) The Font Awesome pictograms are licensed under the CC BY 3.0 License - [https://creativecommons.org/licenses/by/3.0/](http://creativecommons.org/licenses/by/3.0/)
"Font Awesome by Dave Gandy - https://github.com/FortAwesome/Font-Awesome" "Font Awesome by Dave Gandy - <https://github.com/FortAwesome/Font-Awesome>"

View File

@@ -1,22 +1,22 @@
namespace fa { namespace fa {
enum fa_common_icons : uint16_t { enum fa_common_icons : uint16_t {
<% icons_common.each_with_index do |(name, unicode), index| -%> <% icons_common.each_with_index do |(name, unicode), index| -%>
<%= id_name(name) %> = <%= "0x#{unicode}" -%><%= index < icons_common.length - 1 ? ',' : '' %> <%= id_name(name) %> = <%= "0x#{unicode}" -%><%= index < icons_common.length - 1 ? ',' : '' %>
<% end %> <% end %>
}; };
enum fa_brand_icons : uint16_t { enum fa_brand_icons : uint16_t {
<% icons_brands.each_with_index do |(name, unicode), index| -%> <% icons_brands.each_with_index do |(name, unicode), index| -%>
<%= id_name(name) %> = <%= "0x#{unicode}" -%><%= index < icons_brands.length - 1 ? ',' : '' %> <%= id_name(name) %> = <%= "0x#{unicode}" -%><%= index < icons_brands.length - 1 ? ',' : '' %>
<% end %> <% end %>
}; };
#ifdef FONT_AWESOME_PRO #ifdef FONT_AWESOME_PRO
enum fa_pro_icons : uint16_t { enum fa_pro_icons : uint16_t {
<% icons_pro.each_with_index do |(name, unicode), index| -%> <% icons_pro.each_with_index do |(name, unicode), index| -%>
<%= id_name(name) %> = <%= "0x#{unicode}" -%><%= index < icons_pro.length - 1 ? ',' : '' %> <%= id_name(name) %> = <%= "0x#{unicode}" -%><%= index < icons_pro.length - 1 ? ',' : '' %>
<% end %> <% end %>
}; };
#endif #endif
} }

View File

@@ -10,12 +10,22 @@ static const fa::QtAwesomeNamedIcon faBrandsIconArray[] = {
<% end %> <% end %>
}; };
#ifdef FONT_AWESOME_PRO #if defined(FONT_AWESOME_PRO)
static const fa::QtAwesomeNamedIcon faProIconArray[] = { static const fa::QtAwesomeNamedIcon faProIconArray[] = {
<% icons_pro.each_with_index do |(name, _unicode), index| -%> <% icons_pro.each_with_index do |(name, _unicode), index| -%>
{ <%= string_name(name) %>, <%= namespaced_id_name(name) %> } <%= index < icons_pro.length - 1 ? ',' : '' %> { <%= string_name(name) %>, <%= namespaced_id_name(name) %> } <%= index < icons_pro.length - 1 ? ',' : '' %>
<% end %> <% end %>
}; };
#elif defined(FONT_AWESOME_PRO_PLUS)
static const fa::QtAwesomeNamedIcon faProIconArray[] = {
<% icons_pro.each_with_index do |(name, _unicode), index| -%>
{ <%= string_name(name) %>, <%= namespaced_id_name(name) %> } <%= index < icons_pro.length - 1 ? ',' : '' %>
<% end %>
};
#else #else
static const fa::QtAwesomeNamedIcon faRegularFreeIconArray[] = { static const fa::QtAwesomeNamedIcon faRegularFreeIconArray[] = {