Skip to content

Commit 15f37db

Browse files
committed
gui: Add IBM Plex Mono font
1 parent ca30d34 commit 15f37db

7 files changed

+20
-28
lines changed

src/Makefile.qt.include

+5-2
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ BITCOIN_QT_H = \
162162
qt/walletview.h \
163163
qt/winshutdownmonitor.h
164164

165+
RES_FONTS = \
166+
qt/res/fonts/IBMPlexMono-Medium.ttf
167+
165168
RES_ICONS = \
166169
qt/res/icons/add.png \
167170
qt/res/icons/address-book.png \
@@ -288,7 +291,7 @@ qt_libbitcoinqt_a_CXXFLAGS = $(AM_CXXFLAGS) $(QT_PIE_FLAGS)
288291
qt_libbitcoinqt_a_OBJCXXFLAGS = $(AM_OBJCXXFLAGS) $(QT_PIE_FLAGS)
289292

290293
qt_libbitcoinqt_a_SOURCES = $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(QT_FORMS_UI) \
291-
$(QT_QRC) $(QT_QRC_LOCALE) $(QT_TS) $(RES_ICONS) $(RES_ANIMATION)
294+
$(QT_QRC) $(QT_QRC_LOCALE) $(QT_TS) $(RES_FONTS) $(RES_ICONS) $(RES_ANIMATION)
292295
if TARGET_DARWIN
293296
qt_libbitcoinqt_a_SOURCES += $(BITCOIN_MM)
294297
endif
@@ -359,7 +362,7 @@ $(QT_QRC_LOCALE_CPP): $(QT_QRC_LOCALE) $(QT_QM)
359362
$(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $@
360363
@rm $(@D)/temp_$(<F)
361364

362-
$(QT_QRC_CPP): $(QT_QRC) $(QT_FORMS_H) $(RES_ICONS) $(RES_ANIMATION)
365+
$(QT_QRC_CPP): $(QT_QRC) $(QT_FORMS_H) $(RES_FONTS) $(RES_ICONS) $(RES_ANIMATION)
363366
@test -f $(RCC)
364367
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(RCC) -name bitcoin $< | \
365368
$(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>
@@ -465,6 +466,7 @@ int GuiMain(int argc, char* argv[])
465466
#endif
466467

467468
BitcoinApplication app;
469+
QFontDatabase::addApplicationFont(":/fonts/monospace");
468470

469471
/// 2. Parse command-line options. We do this after qt in order to show an error if there are problems parsing these
470472
// 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/IBMPlexMono-Medium.ttf</file>
88+
</qresource>
8689
</RCC>

src/qt/bitcoinunits.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ QString BitcoinUnits::formatWithPrivacy(int unit, const CAmount& amount, Separat
158158
assert(amount >= 0);
159159
QString value;
160160
if (privacy) {
161-
value = format(unit, 0, false, separators, true).replace('0', '#');
161+
value = format(unit, 0, false, separators, true).replace('0', '*');
162162
} else {
163163
value = format(unit, amount, false, separators, true);
164164
}

src/qt/forms/overviewpage.ui

+8-24
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,7 @@
118118
<widget class="QLabel" name="labelWatchPending">
119119
<property name="font">
120120
<font>
121-
<family>Monospace</family>
122-
<weight>75</weight>
123-
<bold>true</bold>
121+
<family>IBM Plex Mono</family>
124122
</font>
125123
</property>
126124
<property name="cursor">
@@ -144,9 +142,7 @@
144142
<widget class="QLabel" name="labelUnconfirmed">
145143
<property name="font">
146144
<font>
147-
<family>Monospace</family>
148-
<weight>75</weight>
149-
<bold>true</bold>
145+
<family>IBM Plex Mono</family>
150146
</font>
151147
</property>
152148
<property name="cursor">
@@ -170,9 +166,7 @@
170166
<widget class="QLabel" name="labelWatchImmature">
171167
<property name="font">
172168
<font>
173-
<family>Monospace</family>
174-
<weight>75</weight>
175-
<bold>true</bold>
169+
<family>IBM Plex Mono</family>
176170
</font>
177171
</property>
178172
<property name="cursor">
@@ -229,9 +223,7 @@
229223
<widget class="QLabel" name="labelImmature">
230224
<property name="font">
231225
<font>
232-
<family>Monospace</family>
233-
<weight>75</weight>
234-
<bold>true</bold>
226+
<family>IBM Plex Mono</family>
235227
</font>
236228
</property>
237229
<property name="cursor">
@@ -275,9 +267,7 @@
275267
<widget class="QLabel" name="labelTotal">
276268
<property name="font">
277269
<font>
278-
<family>Monospace</family>
279-
<weight>75</weight>
280-
<bold>true</bold>
270+
<family>IBM Plex Mono</family>
281271
</font>
282272
</property>
283273
<property name="cursor">
@@ -301,9 +291,7 @@
301291
<widget class="QLabel" name="labelWatchTotal">
302292
<property name="font">
303293
<font>
304-
<family>Monospace</family>
305-
<weight>75</weight>
306-
<bold>true</bold>
294+
<family>IBM Plex Mono</family>
307295
</font>
308296
</property>
309297
<property name="cursor">
@@ -344,9 +332,7 @@
344332
<widget class="QLabel" name="labelBalance">
345333
<property name="font">
346334
<font>
347-
<family>Monospace</family>
348-
<weight>75</weight>
349-
<bold>true</bold>
335+
<family>IBM Plex Mono</family>
350336
</font>
351337
</property>
352338
<property name="cursor">
@@ -370,9 +356,7 @@
370356
<widget class="QLabel" name="labelWatchAvailable">
371357
<property name="font">
372358
<font>
373-
<family>Monospace</family>
374-
<weight>75</weight>
375-
<bold>true</bold>
359+
<family>IBM Plex Mono</family>
376360
</font>
377361
</property>
378362
<property name="cursor">

src/qt/guiutil.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ QString dateTimeStr(qint64 nTime)
7777

7878
QFont fixedPitchFont()
7979
{
80-
return QFontDatabase::systemFont(QFontDatabase::FixedFont);
80+
return QFont("IBM Plex Mono");
8181
}
8282

8383
// Just some dummy data to generate a convincing random-looking (but consistent) address
109 KB
Binary file not shown.

0 commit comments

Comments
 (0)