Skip to content

Commit e823065

Browse files
committed
fix #67, Update to Font Awesome 7, added Pro+ icon support
1 parent c197c2a commit e823065

25 files changed

+8863
-5194
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Changes
22

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

LICENSE.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
MIT License
2-
===========
1+
# MIT License
32

4-
Copyright 2013-2025 [Blommers IT](https://blommersit.nl). All Rights Reserved.
3+
Copyright 2013-2025 [Ribit Software by Blommers IT](https://blommersit.nl). All Rights Reserved.
54
Author [Rick Blommers](mailto:rick@blommersit.nl)
65

76
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
1615
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1716
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1817

19-
20-
Font Awesome License
21-
====================
18+
## Font Awesome License
2219

2320
[https://github.com/FortAwesome/Font-Awesome](https://github.com/FortAwesome/Font-Awesome)
2421

QtAwesome/QtAwesome.cpp

Lines changed: 109 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* MIT Licensed
55
*
6-
* Copyright 2013-2024 - Reliable Bits Software by Blommers IT. All Rights Reserved.
6+
* Copyright 2013-2025 - Ribit Software by Blommers IT. All Rights Reserved.
77
* Author Rick Blommers
88
*/
99

@@ -27,7 +27,9 @@
2727
// Initializing namespaces need to happen outside a namespace
2828
static void qtawesome_init_resources()
2929
{
30-
#ifdef FONT_AWESOME_PRO
30+
#if defined(FONT_AWESOME_PRO_PLUS)
31+
Q_INIT_RESOURCE(QtAwesomeProPlus);
32+
#elif defined(FONT_AWESOME_PRO)
3133
Q_INIT_RESOURCE(QtAwesomePro);
3234
#else
3335
Q_INIT_RESOURCE(QtAwesomeFree);
@@ -211,31 +213,49 @@ class QtAwesomeIconPainterIconEngine : public QIconEngine
211213

212214
//---------------------------------------------------------------------------------------
213215

214-
const QString QtAwesome::FA_BRANDS_FONT_FILENAME = "Font Awesome 6 Brands-Regular-400.otf";
215-
#ifdef FONT_AWESOME_PRO
216-
const QString QtAwesome::FA_DUOTONE_FONT_FILENAME = "pro/Font Awesome 6 Duotone-Solid-900.otf"; // DEPRECATED, use FA_DUOTONE_SOLID_FONT_FILENAME
217-
const QString QtAwesome::FA_DUOTONE_SOLID_FONT_FILENAME = "pro/Font Awesome 6 Duotone-Solid-900.otf";
218-
const QString QtAwesome::FA_DUOTONE_REGULAR_FONT_FILENAME = "pro/Font Awesome 6 Duotone-Regular-400.otf";
219-
const QString QtAwesome::FA_DUOTONE_LIGHT_FONT_FILENAME = "pro/Font Awesome 6 Duotone-Light-300.otf";
220-
const QString QtAwesome::FA_DUOTONE_THIN_FONT_FILENAME = "pro/Font Awesome 6 Duotone-Thin-100.otf";
221-
222-
const QString QtAwesome::FA_SOLID_FONT_FILENAME = "pro/Font Awesome 6 Pro-Solid-900.otf";
223-
const QString QtAwesome::FA_REGULAR_FONT_FILENAME = "pro/Font Awesome 6 Pro-Regular-400.otf";
224-
const QString QtAwesome::FA_LIGHT_FONT_FILENAME = "pro/Font Awesome 6 Pro-Light-300.otf";
225-
const QString QtAwesome::FA_THIN_FONT_FILENAME = "pro/Font Awesome 6 Pro-Thin-100.otf";
226-
227-
const QString QtAwesome::FA_SHARP_SOLID_FONT_FILENAME = "pro/Font Awesome 6 Sharp-Solid-900.otf";
228-
const QString QtAwesome::FA_SHARP_REGULAR_FONT_FILENAME = "pro/Font Awesome 6 Sharp-Regular-400.otf";
229-
const QString QtAwesome::FA_SHARP_LIGHT_FONT_FILENAME = "pro/Font Awesome 6 Sharp-Light-300.otf";
230-
const QString QtAwesome::FA_SHARP_THIN_FONT_FILENAME = "pro/Font Awesome 6 Sharp-Thin-100.otf";
231-
232-
const QString QtAwesome::FA_SHARP_DUOTONE_SOLID_FONT_FILENAME = "pro/Font Awesome 6 Sharp Duotone-Solid-900.otf";
233-
const QString QtAwesome::FA_SHARP_DUOTONE_REGULAR_FONT_FILENAME = "pro/Font Awesome 6 Sharp Duotone-Regular-400.otf";
234-
const QString QtAwesome::FA_SHARP_DUOTONE_LIGHT_FONT_FILENAME = "pro/Font Awesome 6 Sharp Duotone-Light-300.otf";
235-
const QString QtAwesome::FA_SHARP_DUOTONE_THIN_FONT_FILENAME = "pro/Font Awesome 6 Sharp Duotone-Thin-100.otf";
216+
const QString QtAwesome::FA_BRANDS_FONT_FILENAME = "Font Awesome 7 Brands-Regular-400.otf";
217+
218+
#if defined(FONT_AWESOME_PRO)
219+
const QString QtAwesome::FA_DUOTONE_FONT_FILENAME = "pro/Font Awesome 7 Duotone-Solid-900.otf"; // DEPRECATED, use FA_DUOTONE_SOLID_FONT_FILENAME
220+
const QString QtAwesome::FA_DUOTONE_SOLID_FONT_FILENAME = "pro/Font Awesome 7 Duotone-Solid-900.otf";
221+
const QString QtAwesome::FA_DUOTONE_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Duotone-Regular-400.otf";
222+
const QString QtAwesome::FA_DUOTONE_LIGHT_FONT_FILENAME = "pro/Font Awesome 7 Duotone-Light-300.otf";
223+
const QString QtAwesome::FA_DUOTONE_THIN_FONT_FILENAME = "pro/Font Awesome 7 Duotone-Thin-100.otf";
224+
225+
const QString QtAwesome::FA_SOLID_FONT_FILENAME = "pro/Font Awesome 7 Pro-Solid-900.otf";
226+
const QString QtAwesome::FA_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Pro-Regular-400.otf";
227+
const QString QtAwesome::FA_LIGHT_FONT_FILENAME = "pro/Font Awesome 7 Pro-Light-300.otf";
228+
const QString QtAwesome::FA_THIN_FONT_FILENAME = "pro/Font Awesome 7 Pro-Thin-100.otf";
229+
230+
const QString QtAwesome::FA_SHARP_SOLID_FONT_FILENAME = "pro/Font Awesome 7 Sharp-Solid-900.otf";
231+
const QString QtAwesome::FA_SHARP_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Sharp-Regular-400.otf";
232+
const QString QtAwesome::FA_SHARP_LIGHT_FONT_FILENAME = "pro/Font Awesome 7 Sharp-Light-300.otf";
233+
const QString QtAwesome::FA_SHARP_THIN_FONT_FILENAME = "pro/Font Awesome 7 Sharp-Thin-100.otf";
234+
235+
const QString QtAwesome::FA_SHARP_DUOTONE_SOLID_FONT_FILENAME = "pro/Font Awesome 7 Sharp Duotone-Solid-900.otf";
236+
const QString QtAwesome::FA_SHARP_DUOTONE_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Sharp Duotone-Regular-400.otf";
237+
const QString QtAwesome::FA_SHARP_DUOTONE_LIGHT_FONT_FILENAME = "pro/Font Awesome 7 Sharp Duotone-Light-300.otf";
238+
const QString QtAwesome::FA_SHARP_DUOTONE_THIN_FONT_FILENAME = "pro/Font Awesome 7 Sharp Duotone-Thin-100.otf";
239+
240+
#ifdef FONT_AWESOME_PRO_PLUS
241+
242+
const QString QtAwesome::FA_CHISEL_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Chisel-Regular-400";
243+
const QString QtAwesome::FA_ETCH_SOLID_FONT_FILENAME = "pro/Font Awesome 7 Etch-Solid-900.otf";
244+
const QString QtAwesome::FA_JELLY_DUOTONE_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Jelly Duo-Regular-400.otf";
245+
const QString QtAwesome::FA_JELLY_FILL_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Jelly Fill-Regular-400";
246+
const QString QtAwesome::FA_JELLY_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Jelly-Regular-400.otf";
247+
const QString QtAwesome::FA_NOTDOG_DUOTONE_SOLID_FONT_FILENAME = "pro/Font Awesome 7 Notdog Duo-Solid-900.otf";
248+
const QString QtAwesome::FA_NOTDOG_SOLID_FONT_FILENAME = "pro/Font Awesome 7 Notdog-Solid-900.otf";
249+
const QString QtAwesome::FA_SLAB_PRESS_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Slab Press-Regular-400.otf";
250+
const QString QtAwesome::FA_SLAB_REGULAR_FONT_FILENAME = "pro/Font Awesome 7 Slab-Regular-400.otf";
251+
const QString QtAwesome::FA_THUMBPRINT_LIGHT_FONT_FILENAME = "pro/Font Awesome 7 Thumbprint-Light-300.otf";
252+
const QString QtAwesome::FA_WHITEBOARD_SEMIBOLD_FONT_FILENAME = "pro/Font Awesome 7 Whiteboard-Semibold-600.otf";
253+
254+
#endif
255+
236256
#else
237-
const QString QtAwesome::FA_REGULAR_FONT_FILENAME = "Font Awesome 6 Free-Regular-400.otf";
238-
const QString QtAwesome::FA_SOLID_FONT_FILENAME = "Font Awesome 6 Free-Solid-900.otf";
257+
const QString QtAwesome::FA_REGULAR_FONT_FILENAME = "Font Awesome 7 Free-Regular-400.otf";
258+
const QString QtAwesome::FA_SOLID_FONT_FILENAME = "Font Awesome 7 Free-Solid-900.otf";
239259
#endif
240260

241261
/// The default icon colors
@@ -270,6 +290,20 @@ QtAwesome::QtAwesome(QObject* parent)
270290
_fontDetails.insert(fa::fa_sharp_duotone_thin, QtAwesomeFontData(FA_SHARP_DUOTONE_THIN_FONT_FILENAME, FA_SHARP_DUOTONE_THIN_FONT_WEIGHT));
271291
#endif
272292

293+
#ifdef FONT_AWESOME_PRO_PLUS
294+
_fontDetails.insert(fa::fa_chisel_regular, QtAwesomeFontData(FA_CHISEL_REGULAR_FONT_FILENAME, FA_CHISEL_REGULAR_FONT_WEIGHT));
295+
_fontDetails.insert(fa::fa_etch_solid, QtAwesomeFontData(FA_ETCH_SOLID_FONT_FILENAME, FA_ETCH_SOLID_FONT_WEIGHT));
296+
_fontDetails.insert(fa::fa_jelly_regular, QtAwesomeFontData(FA_JELLY_REGULAR_FONT_FILENAME, FA_JELLY_REGULAR_FONT_WEIGHT));
297+
_fontDetails.insert(fa::fa_jelly_duotone_regular, QtAwesomeFontData(FA_JELLY_DUOTONE_REGULAR_FONT_FILENAME, FA_JELLY_DUOTONE_REGULAR_FONT_WEIGHT));
298+
_fontDetails.insert(fa::fa_jelly_fill_regular, QtAwesomeFontData(FA_JELLY_FILL_REGULAR_FONT_FILENAME, FA_JELLY_FILL_REGULAR_FONT_WEIGHT));
299+
_fontDetails.insert(fa::fa_notdog_duotone_solid, QtAwesomeFontData(FA_NOTDOG_DUOTONE_SOLID_FONT_FILENAME, FA_NOTDOG_DUOTONE_SOLID_FONT_WEIGHT));
300+
_fontDetails.insert(fa::fa_notdog_solid, QtAwesomeFontData(FA_NOTDOG_SOLID_FONT_FILENAME, FA_NOTDOG_SOLID_FONT_WEIGHT));
301+
_fontDetails.insert(fa::fa_slab_press_regular, QtAwesomeFontData(FA_SLAB_PRESS_REGULAR_FONT_FILENAME, FA_SLAB_REGULAR_FONT_WEIGHT));
302+
_fontDetails.insert(fa::fa_slab_regular, QtAwesomeFontData(FA_SLAB_REGULAR_FONT_FILENAME, FA_SLAB_REGULAR_FONT_WEIGHT));
303+
_fontDetails.insert(fa::fa_thumbprint_light, QtAwesomeFontData(FA_THUMBPRINT_LIGHT_FONT_FILENAME, FA_THUMBPRINT_LIGHT_FONT_WEIGHT));
304+
_fontDetails.insert(fa::fa_whiteboard_semibold, QtAwesomeFontData(FA_WHITEBOARD_SEMIBOLD_FONT_FILENAME, FA_WHITEBOARD_SEMIBOLD_FONT_WEIGHT));
305+
#endif
306+
273307
#ifdef USE_COLOR_SCHEME
274308
// support dark/light mode
275309
QObject::connect(QApplication::styleHints(), &QStyleHints::colorSchemeChanged, this, [this](Qt::ColorScheme colorScheme){
@@ -311,18 +345,18 @@ QtAwesome::~QtAwesome()
311345
qDeleteAll(_namedCodepointsList);
312346
}
313347

314-
/// a specialized init function so font-awesome is loaded and initialized
315-
/// this method return true on success, it will return false if the fnot cannot be initialized
348+
/// A specialized init function so font-awesome is loaded and initialized
349+
/// This method return true on success, it will return false if the font cannot be initialized
316350
/// To initialize QtAwesome with font-awesome you need to call this method
317351
bool QtAwesome::initFontAwesome()
318352
{
319353
bool success = true;
320354
// The macro below internally calls "qInitResources_QtAwesome()". this initializes
321355
// the resource system. For a .pri project this isn't required, but when building and using a
322356
// static library the resource need to initialized first.
323-
///
324-
// I've checked th qInitResource_* code and calling this method mutliple times shouldn't be any problem
325-
// (More info about this subject: http://qt-project.org/wiki/QtResources)
357+
//
358+
// I've checked th qInitResource_* code and calling this method multiple times shouldn't be any problem
359+
// (More info about this subject: <http://qt-project.org/wiki/QtResources>)
326360
qtawesome_init_resources();
327361

328362
for (QtAwesomeFontData &fd : _fontDetails) {
@@ -376,6 +410,20 @@ bool QtAwesome::initFontAwesome()
376410
_namedCodepointsByStyle.insert(fa::fa_sharp_duotone_regular, _namedCodepointsByStyle.value(fa::fa_solid));
377411
_namedCodepointsByStyle.insert(fa::fa_sharp_duotone_light, _namedCodepointsByStyle.value(fa::fa_solid));
378412
_namedCodepointsByStyle.insert(fa::fa_sharp_duotone_thin, _namedCodepointsByStyle.value(fa::fa_solid));
413+
414+
#ifdef FONT_AWESOME_PRO_PLUS
415+
_namedCodepointsByStyle.insert(fa::fa_chisel_regular, _namedCodepointsByStyle.value(fa::fa_solid));
416+
_namedCodepointsByStyle.insert(fa::fa_etch_solid, _namedCodepointsByStyle.value(fa::fa_solid));
417+
_namedCodepointsByStyle.insert(fa::fa_jelly_regular, _namedCodepointsByStyle.value(fa::fa_solid));
418+
_namedCodepointsByStyle.insert(fa::fa_jelly_duotone_regular, _namedCodepointsByStyle.value(fa::fa_solid));
419+
_namedCodepointsByStyle.insert(fa::fa_jelly_fill_regular, _namedCodepointsByStyle.value(fa::fa_solid));
420+
_namedCodepointsByStyle.insert(fa::fa_notdog_duotone_solid, _namedCodepointsByStyle.value(fa::fa_solid));
421+
_namedCodepointsByStyle.insert(fa::fa_notdog_solid, _namedCodepointsByStyle.value(fa::fa_solid));
422+
_namedCodepointsByStyle.insert(fa::fa_slab_press_regular, _namedCodepointsByStyle.value(fa::fa_solid));
423+
_namedCodepointsByStyle.insert(fa::fa_slab_regular, _namedCodepointsByStyle.value(fa::fa_solid));
424+
_namedCodepointsByStyle.insert(fa::fa_thumbprint_light, _namedCodepointsByStyle.value(fa::fa_solid));
425+
_namedCodepointsByStyle.insert(fa::fa_whiteboard_semibold, _namedCodepointsByStyle.value(fa::fa_solid));
426+
#endif
379427
#else
380428
addToNamedCodePoints(fa::fa_regular, faRegularFreeIconArray, sizeof(faRegularFreeIconArray)/sizeof(QtAwesomeNamedIcon));
381429
#endif
@@ -560,7 +608,23 @@ int QtAwesome::stringToStyleEnum(const QString style) const
560608
else if (style == "fa-sharp-duotone-regular") return fa::fa_sharp_duotone_regular;
561609
else if (style == "fa-sharp-duotone-light") return fa::fa_sharp_duotone_light;
562610
else if (style == "fa-sharp-duotone-thin") return fa::fa_sharp_duotone_thin;
611+
612+
#ifdef FONT_AWESOME_PRO_PLUS
613+
else if (style == "fa-chisel") return fa::fa_chisel_regular;
614+
else if (style == "fa-etch") return fa::fa_etch_solid;
615+
else if (style == "fa-jelly") return fa::fa_jelly_regular;
616+
else if (style == "fa-jelly-duo") return fa::fa_jelly_duotone_regular;
617+
else if (style == "fa-jelly-fill") return fa::fa_jelly_fill_regular;
618+
else if (style == "fa-notdog") return fa::fa_notdog_solid;
619+
else if (style == "fa-notdog-duo") return fa::fa_notdog_duotone_solid;
620+
else if (style == "fa-slab") return fa::fa_slab_regular;
621+
else if (style == "fa-slab-press") return fa::fa_slab_press_regular;
622+
else if (style == "fa-thumbprint") return fa::fa_thumbprint_light;
623+
else if (style == "fa-whiteboard") return fa::fa_whiteboard_semibold;
624+
#endif
563625
#endif
626+
627+
564628
return fa::fa_solid;
565629
}
566630

@@ -586,7 +650,21 @@ const QString QtAwesome::styleEnumToString(int style) const
586650
case fa::fa_sharp_duotone_regular: return "fa-sharp-duotone-regular";
587651
case fa::fa_sharp_duotone_light: return "fa-sharp-duotone-light";
588652
case fa::fa_sharp_duotone_thin: return "fa-sharp-duotone-thin";
653+
654+
#ifdef FONT_AWESOME_PRO_PLUS
655+
case fa::fa_etch_solid: return "fa-chisel";
656+
case fa::fa_jelly_regular: return "fa-jelly";
657+
case fa::fa_jelly_duotone_regular: return "fa-jelly-duo";
658+
case fa::fa_jelly_fill_regular: return "fa-jelly-fill";
659+
case fa::fa_notdog_solid: return "fa-notdog";
660+
case fa::fa_notdog_duotone_solid: return "fa-notdog-duo";
661+
case fa::fa_slab_regular: return "fa-slab";
662+
case fa::fa_slab_press_regular: return "fa-slab-press";
663+
case fa::fa_thumbprint_light: return "fa-thumbprint";
664+
case fa::fa_whiteboard_semibold: return "fa-whiteboard";
665+
#endif
589666
#endif
667+
590668
}
591669
return "fa-solid";
592670
}

QtAwesome/QtAwesome.h

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* MIT Licensed
55
*
6-
* Copyright 2013-2024 - Reliable Bits Software by Blommers IT. All Rights Reserved.
6+
* Copyright 2013-2025 - Ribit Software by Blommers IT. All Rights Reserved.
77
* Author Rick Blommers
88
*/
99

@@ -16,18 +16,25 @@
1616
#include <QRect>
1717
#include <QVariantMap>
1818

19+
// Having font awesome pro+ also means the usage of Font awesome pro
20+
#ifdef FONT_AWESOME_PRO_PLUS
21+
#define FONT_AWESOME_PRO
22+
#endif
23+
1924
#include "QtAwesomeAnim.h"
2025

2126
/// A list of all icon-names with the codepoint (unicode-value) on the right
2227
/// You can use the names on the page http://fortawesome.github.io/Font-Awesome/design.html
2328
#include "QtAwesomeEnumGenerated.h"
2429

30+
2531
namespace fa {
2632

2733
/// A list of all style-names
2834
enum fa_styles {
2935
fa_solid = 0,
3036
fa_regular = 1,
37+
3138
#ifdef FONT_AWESOME_PRO
3239
fa_light = 3,
3340
fa_thin = 4,
@@ -48,6 +55,27 @@ enum fa_styles {
4855
fa_sharp_duotone_light = 15,
4956
fa_sharp_duotone_thin = 16,
5057
#endif
58+
59+
#ifdef FONT_AWESOME_PRO_PLUS
60+
fa_chisel_regular = 17,
61+
62+
fa_etch_solid = 18,
63+
64+
fa_jelly_regular = 19,
65+
fa_jelly_duotone_regular = 20,
66+
fa_jelly_fill_regular = 21,
67+
68+
fa_notdog_duotone_solid = 22,
69+
fa_notdog_solid = 23,
70+
71+
fa_slab_press_regular = 24,
72+
fa_slab_regular = 25,
73+
74+
fa_thumbprint_light = 26,
75+
76+
fa_whiteboard_semibold = 27,
77+
#endif
78+
5179
fa_brands = 2
5280
};
5381

@@ -137,6 +165,34 @@ Q_OBJECT
137165
static const QFont::Weight FA_SHARP_DUOTONE_THIN_FONT_WEIGHT = QFont::ExtraLight;
138166
#endif
139167

168+
#ifdef FONT_AWESOME_PRO_PLUS
169+
170+
static const QString FA_CHISEL_REGULAR_FONT_FILENAME; // fa-chisel fa-regular
171+
static const QString FA_ETCH_SOLID_FONT_FILENAME; // fa-etch fa-solid
172+
static const QString FA_JELLY_REGULAR_FONT_FILENAME; // fa-jelly fa-regular
173+
static const QString FA_JELLY_DUOTONE_REGULAR_FONT_FILENAME; // fa-jelly-duo fa-regular
174+
static const QString FA_JELLY_FILL_REGULAR_FONT_FILENAME; // fa-jelly-fill fa-regular
175+
static const QString FA_NOTDOG_DUOTONE_SOLID_FONT_FILENAME; // fa-notdog-duo fa-solid
176+
static const QString FA_NOTDOG_SOLID_FONT_FILENAME; // fa-notdog fa-solid
177+
static const QString FA_SLAB_PRESS_REGULAR_FONT_FILENAME; // fa-slab-press fa-regular
178+
static const QString FA_SLAB_REGULAR_FONT_FILENAME; // fa-slab fa-regular
179+
static const QString FA_THUMBPRINT_LIGHT_FONT_FILENAME; // fa-thumbprint fa-light
180+
static const QString FA_WHITEBOARD_SEMIBOLD_FONT_FILENAME; // fa-whiteboard fa-semibold
181+
182+
static const QFont::Weight FA_CHISEL_REGULAR_FONT_WEIGHT = QFont::Normal;
183+
static const QFont::Weight FA_ETCH_SOLID_FONT_WEIGHT = QFont::Black;
184+
static const QFont::Weight FA_JELLY_REGULAR_FONT_WEIGHT = QFont::Normal;
185+
static const QFont::Weight FA_JELLY_DUOTONE_REGULAR_FONT_WEIGHT = QFont::Normal;
186+
static const QFont::Weight FA_JELLY_FILL_REGULAR_FONT_WEIGHT = QFont::Normal;
187+
static const QFont::Weight FA_NOTDOG_DUOTONE_SOLID_FONT_WEIGHT = QFont::Black;
188+
static const QFont::Weight FA_NOTDOG_SOLID_FONT_WEIGHT = QFont::Black;
189+
static const QFont::Weight FA_SLAB_PRESS_REGULAR_FONT_WEIGHT = QFont::Normal;
190+
static const QFont::Weight FA_SLAB_REGULAR_FONT_WEIGHT = QFont::Normal;
191+
static const QFont::Weight FA_THUMBPRINT_LIGHT_FONT_WEIGHT = QFont::Light;
192+
static const QFont::Weight FA_WHITEBOARD_SEMIBOLD_FONT_WEIGHT = QFont::DemiBold;
193+
#endif
194+
195+
140196
public:
141197

142198
explicit QtAwesome(QObject* parent = nullptr);

QtAwesome/QtAwesome.pri

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ defineReplace( resourcesForConfig ){
22
return($$PWD/QtAwesome$$eval($$1).qrc)
33
}
44

5-
options = $$find(CONFIG, fontAwesomePro) $$find(CONFIG, fontAwesomeFree)
6-
count(options, 0) { error("fontAwesomePro or fontAwesomeFree should be defined") }
5+
options = $$find(CONFIG, fontAweomeProPlus) $$find(CONFIG, fontAwesomePro) $$find(CONFIG, fontAwesomeFree)
6+
count(options, 0) { error("fontAwesomeProPlus, fontAwesomePro or fontAwesomeFree should be defined") }
77
count(options, 2) { error("fontAwesomePro and fontAwesomeFree were defined, only one config is accepted") }
88

99
INCLUDEPATH += $$PWD
@@ -18,6 +18,13 @@ HEADERS += $$PWD/QtAwesome.h \
1818
$$PWD/QtAwesomeStringGenerated.h
1919

2020

21+
CONFIG( fontAwesomeProPlus ){
22+
config = ProPlus
23+
RESOURCES += $$resourcesForConfig(config)
24+
DEFINES += FONT_AWESOME_PRO_PLUS=1
25+
!build_pass:message(using font awesome pro+)
26+
}
27+
2128
CONFIG( fontAwesomePro ){
2229
config = Pro
2330
RESOURCES += $$resourcesForConfig(config)

QtAwesome/QtAwesome.pro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ CONFIG += staticlib c++11
1010
QT += widgets
1111

1212
# only one option must be enabled
13+
#CONFIG += fontAwesomeProPlus
1314
#CONFIG += fontAwesomePro
1415
CONFIG += fontAwesomeFree
1516
include(QtAwesome.pri)

QtAwesome/QtAwesomeAnim.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ QtAwesomeAnimation::QtAwesomeAnimation(QWidget *parentWidget, int interval, int
1515
, step_(step)
1616
, angle_(0.0f)
1717
{
18-
1918
}
2019

2120
void QtAwesomeAnimation::setup(QPainter &painter, const QRect &rect)
@@ -38,7 +37,6 @@ void QtAwesomeAnimation::setup(QPainter &painter, const QRect &rect)
3837
}
3938
}
4039

41-
4240
void QtAwesomeAnimation::update()
4341
{
4442
angle_ += step_;

QtAwesome/QtAwesomeAnim.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ namespace fa {
2929
int interval_;
3030
int step_;
3131
float angle_;
32-
3332
};
3433
} // namespace fa
3534

0 commit comments

Comments
 (0)