Skip to content

Commit 458c533

Browse files
committed
Merge tbc_font-28+knots
2 parents 5b18d9e + de33d56 commit 458c533

File tree

6 files changed

+20
-5
lines changed

6 files changed

+20
-5
lines changed

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,6 +1915,7 @@ AM_CONDITIONAL([TARGET_DARWIN], [test "$TARGET_OS" = "darwin"])
19151915
AM_CONDITIONAL([BUILD_DARWIN], [test "$BUILD_OS" = "darwin"])
19161916
AM_CONDITIONAL([TARGET_LINUX], [test "$TARGET_OS" = "linux"])
19171917
AM_CONDITIONAL([TARGET_WINDOWS], [test "$TARGET_OS" = "windows"])
1918+
AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != ""])
19181919
AM_CONDITIONAL([ENABLE_WALLET], [test "$enable_wallet" = "yes"])
19191920
AM_CONDITIONAL([USE_SQLITE], [test "$use_sqlite" = "yes"])
19201921
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
@@ -1218,6 +1218,19 @@ if ENABLE_BENCH
12181218
include Makefile.bench.include
12191219
endif
12201220

1221+
# Font handling must be here, not in Makefile.qt.include, since the output is distributed with the source tarball
1222+
RES_MONOSPACE_FONT_INPUT = qt/res/fonts/RobotoTonalMono-Bold.ttf.in
1223+
RES_MONOSPACE_FONT = qt/res/fonts/RobotoTonalMono-Bold.ttf
1224+
EXTRA_DIST += $(RES_MONOSPACE_FONT_INPUT) $(RES_MONOSPACE_FONT)
1225+
1226+
if HAVE_PYTHON
1227+
1228+
$(RES_MONOSPACE_FONT): $(RES_MONOSPACE_FONT_INPUT)
1229+
@$(MKDIR_P) "$(@D)"
1230+
$(AM_V_GEN) $(PYTHON) -c 'import base64, lzma, sys; sys.stdout.buffer.write(lzma.decompress(base64.b85decode(sys.stdin.read())))' <"$<" >"$@.new" && mv "$@.new" "$@"
1231+
1232+
endif
1233+
12211234
if ENABLE_QT
12221235
include Makefile.qt.include
12231236
endif

src/Makefile.qt.include

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

182182
QT_RES_FONTS = \
183-
qt/res/fonts/RobotoMono-Bold.ttf
183+
$(RES_MONOSPACE_FONT)
184184

185185
QT_RES_ICONS = $(RES_RENDERED_ICONS) \
186186
qt/res/icons/add.png \
@@ -395,7 +395,7 @@ $(QT_QRC_LOCALE_CPP): $(QT_QRC_LOCALE) $(QT_QM)
395395
@rm $(@D)/temp_$(<F)
396396

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

400400
$(QT_QRC_CPP): $(QT_QRC_BUILD) $(QT_FORMS_H) $(QT_RES_FONTS) $(QT_RES_ICONS) $(QT_RES_ANIMATION)
401401
@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.

src/qt/tonalutils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ bool TonalUtils::Supported()
3333
{
3434
QFont default_font;
3535
if (font_supports_tonal(default_font)) return true;
36-
QFont last_resort_font(default_font.lastResortFamily());
37-
if (font_supports_tonal(last_resort_font)) return true;
36+
// FIXME: This will fail if the default font has some non-Tonal glyphs but a fallback supports Tonal
37+
// TODO: Check other fonts and ensure their usage when appropriate
3838
return false;
3939
}
4040

0 commit comments

Comments
 (0)