Skip to content

Commit 89e4219

Browse files
committed
gui: Add Roboto Mono font
1 parent 5bb64ac commit 89e4219

File tree

5 files changed

+25
-2
lines changed

5 files changed

+25
-2
lines changed

contrib/debian/copyright

+15
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ Files: src/qt/res/icons/proxy.png
8787
Copyright: Cristian Mircea Messel
8888
License: public-domain
8989

90+
Files: src/qt/fonts/RobotoMono-Bold.ttf
91+
License: Apache-2.0
92+
Comment: Site: https://fonts.google.com/specimen/Roboto+Mono
93+
9094

9195
License: Expat
9296
Permission is hereby granted, free of charge, to any person obtaining a
@@ -144,3 +148,14 @@ Comment:
144148

145149
License: public-domain
146150
This work is in the public domain.
151+
152+
License: Apache-2.0
153+
Licensed under the Apache License, Version 2.0 (the "License");
154+
you may not use this file except in compliance with the License.
155+
You may obtain a copy of the License at
156+
http://www.apache.org/licenses/LICENSE-2.0
157+
Unless required by applicable law or agreed to in writing, software
158+
distributed under the License is distributed on an "AS IS" BASIS,
159+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
160+
See the License for the specific language governing permissions and
161+
limitations under the License.

src/Makefile.qt.include

+5-2
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ BITCOIN_QT_H = \
164164
qt/walletview.h \
165165
qt/winshutdownmonitor.h
166166

167+
RES_FONTS = \
168+
qt/res/fonts/RobotoMono-Bold.ttf
169+
167170
RES_ICONS = \
168171
qt/res/icons/add.png \
169172
qt/res/icons/address-book.png \
@@ -290,7 +293,7 @@ qt_libbitcoinqt_a_CXXFLAGS = $(AM_CXXFLAGS) $(QT_PIE_FLAGS)
290293
qt_libbitcoinqt_a_OBJCXXFLAGS = $(AM_OBJCXXFLAGS) $(QT_PIE_FLAGS)
291294

292295
qt_libbitcoinqt_a_SOURCES = $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(QT_FORMS_UI) \
293-
$(QT_QRC) $(QT_QRC_LOCALE) $(QT_TS) $(RES_ICONS) $(RES_ANIMATION)
296+
$(QT_QRC) $(QT_QRC_LOCALE) $(QT_TS) $(RES_FONTS) $(RES_ICONS) $(RES_ANIMATION)
294297
if TARGET_DARWIN
295298
qt_libbitcoinqt_a_SOURCES += $(BITCOIN_MM)
296299
endif
@@ -361,7 +364,7 @@ $(QT_QRC_LOCALE_CPP): $(QT_QRC_LOCALE) $(QT_QM)
361364
$(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $@
362365
@rm $(@D)/temp_$(<F)
363366

364-
$(QT_QRC_CPP): $(QT_QRC) $(QT_FORMS_H) $(RES_ICONS) $(RES_ANIMATION)
367+
$(QT_QRC_CPP): $(QT_QRC) $(QT_FORMS_H) $(RES_FONTS) $(RES_ICONS) $(RES_ANIMATION)
365368
@test -f $(RCC)
366369
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(RCC) -name bitcoin $< | \
367370
$(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $@

src/qt/bitcoin.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444

4545
#include <QApplication>
4646
#include <QDebug>
47+
#include <QFontDatabase>
4748
#include <QLibraryInfo>
4849
#include <QLocale>
4950
#include <QMessageBox>
@@ -475,6 +476,7 @@ int GuiMain(int argc, char* argv[])
475476
#endif
476477

477478
BitcoinApplication app;
479+
QFontDatabase::addApplicationFont(":/fonts/monospace");
478480

479481
/// 2. Parse command-line options. We do this after qt in order to show an error if there are problems parsing these
480482
// Command-line options take precedence:

src/qt/bitcoin.qrc

+3
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,7 @@
8383
<file alias="spinner-034">res/animation/spinner-034.png</file>
8484
<file alias="spinner-035">res/animation/spinner-035.png</file>
8585
</qresource>
86+
<qresource prefix="/fonts">
87+
<file alias="monospace">res/fonts/RobotoMono-Bold.ttf</file>
88+
</qresource>
8689
</RCC>

src/qt/res/fonts/RobotoMono-Bold.ttf

85 KB
Binary file not shown.

0 commit comments

Comments
 (0)