Skip to content

Commit 28d30b7

Browse files
committed
Include Tonal digits and BTC symbol in bundled font
1 parent 0132462 commit 28d30b7

File tree

5 files changed

+18
-3
lines changed

5 files changed

+18
-3
lines changed

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1661,6 +1661,7 @@ AM_CONDITIONAL([TARGET_DARWIN], [test "$TARGET_OS" = "darwin"])
16611661
AM_CONDITIONAL([BUILD_DARWIN], [test "$BUILD_OS" = "darwin"])
16621662
AM_CONDITIONAL([TARGET_LINUX], [test "$TARGET_OS" = "linux"])
16631663
AM_CONDITIONAL([TARGET_WINDOWS], [test "$TARGET_OS" = "windows"])
1664+
AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != ""])
16641665
AM_CONDITIONAL([ENABLE_WALLET], [test "$enable_wallet" = "yes"])
16651666
AM_CONDITIONAL([USE_SQLITE], [test "$use_sqlite" = "yes"])
16661667
AM_CONDITIONAL([USE_BDB], [test "$use_bdb" = "yes"])

src/Makefile.am

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,19 @@ if ENABLE_BENCH
11661166
include Makefile.bench.include
11671167
endif
11681168

1169+
# Font handling must be here, not in Makefile.qt.include, since the output is distributed with the source tarball
1170+
RES_MONOSPACE_FONT_INPUT = qt/res/fonts/RobotoTonalMono-Bold.ttf.in
1171+
RES_MONOSPACE_FONT = qt/res/fonts/RobotoTonalMono-Bold.ttf
1172+
EXTRA_DIST += $(RES_MONOSPACE_FONT_INPUT) $(RES_MONOSPACE_FONT)
1173+
1174+
if HAVE_PYTHON
1175+
1176+
$(RES_MONOSPACE_FONT): $(RES_MONOSPACE_FONT_INPUT)
1177+
@$(MKDIR_P) "$(@D)"
1178+
$(AM_V_GEN) $(PYTHON) -c 'import base64, lzma, sys; sys.stdout.buffer.write(lzma.decompress(base64.b85decode(sys.stdin.read())))' <"$<" >"$@.new" && mv "$@.new" "$@"
1179+
1180+
endif
1181+
11691182
if ENABLE_QT
11701183
include Makefile.qt.include
11711184
endif

src/Makefile.qt.include

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ BITCOIN_QT_H = \
171171
qt/winshutdownmonitor.h
172172

173173
QT_RES_FONTS = \
174-
qt/res/fonts/RobotoMono-Bold.ttf
174+
$(RES_MONOSPACE_FONT)
175175

176176
QT_RES_ICONS = $(RES_RENDERED_ICONS) \
177177
qt/res/icons/add.png \
@@ -382,7 +382,7 @@ $(QT_QRC_LOCALE_CPP): $(QT_QRC_LOCALE) $(QT_QM)
382382
@rm $(@D)/temp_$(<F)
383383

384384
$(QT_QRC_BUILD): $(QT_QRC)
385-
$(SED) -e 's:\(res\/\(icons\|animation\|fonts\)/\):$(abs_srcdir)/qt/\1:' <"$<" >"$@"
385+
$(SED) -e 's:\(res\/\(icons\|animation\)/\):$(abs_srcdir)/qt/\1:' <"$<" >"$@"
386386

387387
$(QT_QRC_CPP): $(QT_QRC_BUILD) $(QT_FORMS_H) $(QT_RES_FONTS) $(QT_RES_ICONS) $(QT_RES_ANIMATION)
388388
@test -f $(RCC) || (echo "rcc $(RCC) not found, but is required for generating qrc cpp files"; exit 1)

src/qt/bitcoin.qrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,6 @@
8484
<file alias="spinner-035">res/animation/spinner-035.png</file>
8585
</qresource>
8686
<qresource prefix="/fonts">
87-
<file alias="monospace">res/fonts/RobotoMono-Bold.ttf</file>
87+
<file alias="monospace">res/fonts/RobotoTonalMono-Bold.ttf</file>
8888
</qresource>
8989
</RCC>

src/qt/res/fonts/RobotoTonalMono-Bold.ttf.in

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)