diff --git a/src/qt/Makefile.am b/src/qt/Makefile.am index bc2536284..a12e4c171 100644 --- a/src/qt/Makefile.am +++ b/src/qt/Makefile.am @@ -258,6 +258,14 @@ RES_ICONS = \ res/icons/tx_input.png \ res/icons/tx_output.png \ res/icons/tx_mined.png + +RES_FONTS = \ + res/fonts/ComicNeue-Bold.ttf \ + res/fonts/ComicNeue-Bold-Oblique.ttf \ + res/fonts/ComicNeue-Light.ttf \ + res/fonts/ComicNeue-Light-Oblique.ttf \ + res/fonts/ComicNeue-Regular.ttf \ + res/fonts/ComicNeue-Regular-Oblique.ttf BITCOIN_QT_CPP = \ bitcoin.cpp \ @@ -323,7 +331,7 @@ DOGECOIN_RC = res/dogecoin-qt-res.rc libbitcoinqt_a_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \ -I$(top_srcdir)/src/qt/forms $(QT_DBUS_INCLUDES) libbitcoinqt_a_SOURCES = $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(QT_FORMS_UI) \ - $(QT_QRC) $(QT_TS) $(PROTOBUF_PROTO) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) + $(QT_QRC) $(QT_TS) $(PROTOBUF_PROTO) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) $(RES_FONTS) nodist_libbitcoinqt_a_SOURCES = $(QT_MOC_CPP) $(QT_MOC) $(PROTOBUF_CC) \ $(PROTOBUF_H) $(QT_QRC_CPP) @@ -369,7 +377,7 @@ translate: bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP) $( @test -n $(LUPDATE) || echo "lupdate is required for updating translations" @QT_SELECT=$(QT_SELECT) $(LUPDATE) $^ -locations relative -no-obsolete -ts locale/bitcoin_en.ts -$(QT_QRC_CPP): $(QT_QRC) $(QT_QM) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) $(PROTOBUF_H) +$(QT_QRC_CPP): $(QT_QRC) $(QT_QM) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) $(RES_FONTS) $(PROTOBUF_H) @cd $(abs_srcdir); test -f $(RCC) && QT_SELECT=$(QT_SELECT) $(RCC) -name bitcoin -o $(abs_builddir)/$@ $< || \ echo error: could not build $@ $(SED) -i.bak -e '/^\*\*.*Created:/d' $@ && rm -f $@.bak diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index f6335b68c..01fc3a1b9 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -128,6 +129,15 @@ BitcoinGUI::BitcoinGUI(bool fIsTestnet, QWidget *parent) : */ setCentralWidget(rpcConsole); } + + // Dogecoin: load fallback font in case Comic Sans is not availble on the system + QFontDatabase::addApplicationFont(":fonts/ComicNeue-Bold"); + QFontDatabase::addApplicationFont(":fonts/ComicNeue-Bold-Oblique"); + QFontDatabase::addApplicationFont(":fonts/ComicNeue-Light"); + QFontDatabase::addApplicationFont(":fonts/ComicNeue-Light-Oblique"); + QFontDatabase::addApplicationFont(":fonts/ComicNeue-Regular"); + QFontDatabase::addApplicationFont(":fonts/ComicNeue-Regular-Oblique"); + QFont::insertSubstitution("Comic Sans MS", "Comic Neue"); // Dogecoin: Specify Comic Sans as new font. QFont newFont("Comic Sans MS", 10); diff --git a/src/qt/dogecoin.qrc b/src/qt/dogecoin.qrc index 70775ea68..114001286 100644 --- a/src/qt/dogecoin.qrc +++ b/src/qt/dogecoin.qrc @@ -158,4 +158,12 @@ locale/bitcoin_zh_HK.qm locale/bitcoin_zh_TW.qm + + res/fonts/ComicNeue-Bold.ttf + res/fonts/ComicNeue-Bold-Oblique.ttf + res/fonts/ComicNeue-Light.ttf + res/fonts/ComicNeue-Light-Oblique.ttf + res/fonts/ComicNeue-Regular.ttf + res/fonts/ComicNeue-Regular-Oblique.ttf + diff --git a/src/qt/res/fonts/ComicNeue-Bold-Oblique.ttf b/src/qt/res/fonts/ComicNeue-Bold-Oblique.ttf new file mode 100644 index 000000000..013bbfbf4 Binary files /dev/null and b/src/qt/res/fonts/ComicNeue-Bold-Oblique.ttf differ diff --git a/src/qt/res/fonts/ComicNeue-Bold.ttf b/src/qt/res/fonts/ComicNeue-Bold.ttf new file mode 100644 index 000000000..d70924aff Binary files /dev/null and b/src/qt/res/fonts/ComicNeue-Bold.ttf differ diff --git a/src/qt/res/fonts/ComicNeue-Light-Oblique.ttf b/src/qt/res/fonts/ComicNeue-Light-Oblique.ttf new file mode 100644 index 000000000..bb1f16a78 Binary files /dev/null and b/src/qt/res/fonts/ComicNeue-Light-Oblique.ttf differ diff --git a/src/qt/res/fonts/ComicNeue-Light.ttf b/src/qt/res/fonts/ComicNeue-Light.ttf new file mode 100644 index 000000000..6cc7d4281 Binary files /dev/null and b/src/qt/res/fonts/ComicNeue-Light.ttf differ diff --git a/src/qt/res/fonts/ComicNeue-Regular-Oblique.ttf b/src/qt/res/fonts/ComicNeue-Regular-Oblique.ttf new file mode 100644 index 000000000..a950b8951 Binary files /dev/null and b/src/qt/res/fonts/ComicNeue-Regular-Oblique.ttf differ diff --git a/src/qt/res/fonts/ComicNeue-Regular.ttf b/src/qt/res/fonts/ComicNeue-Regular.ttf new file mode 100644 index 000000000..6704d7dc5 Binary files /dev/null and b/src/qt/res/fonts/ComicNeue-Regular.ttf differ