add fallback font

This commit is contained in:
Jannis Froese 2014-05-19 19:59:20 +02:00
parent 79cd57af87
commit a728425814
No known key found for this signature in database
GPG key ID: 1AEF9F73ECA11726
9 changed files with 28 additions and 2 deletions

View file

@ -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

View file

@ -32,6 +32,7 @@
#include <QDateTime>
#include <QDesktopWidget>
#include <QDragEnterEvent>
#include <QFontDatabase>
#include <QIcon>
#include <QLabel>
#include <QListWidget>
@ -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);

View file

@ -158,4 +158,12 @@
<file alias="zh_HK">locale/bitcoin_zh_HK.qm</file>
<file alias="zh_TW">locale/bitcoin_zh_TW.qm</file>
</qresource>
<qresource prefix="/fonts">
<file alias="ComicNeue-Bold">res/fonts/ComicNeue-Bold.ttf</file>
<file alias="ComicNeue-Bold-Oblique">res/fonts/ComicNeue-Bold-Oblique.ttf</file>
<file alias="ComicNeue-Light">res/fonts/ComicNeue-Light.ttf</file>
<file alias="ComicNeue-Light-Oblique">res/fonts/ComicNeue-Light-Oblique.ttf</file>
<file alias="ComicNeue-Regular">res/fonts/ComicNeue-Regular.ttf</file>
<file alias="ComicNeue-Regular-Oblique">res/fonts/ComicNeue-Regular-Oblique.ttf</file>
</qresource>
</RCC>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.