diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index b49d401eee..7aa6c8a065 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -290,6 +290,10 @@ BITCOIN_QML_BASE_CPP = \ qml/nodemodel.cpp \ qml/util.cpp +QML_RES_FONTS = \ + qml/res/fonts/Inter-Regular.otf \ + qml/res/fonts/Inter-SemiBold.otf + QML_QRC_CPP = qml/qrc_bitcoin.cpp QML_QRC = qml/bitcoin_qml.qrc QML_RES_QML = \ @@ -325,7 +329,7 @@ endif nodist_qt_libbitcoinqt_a_SOURCES = $(QT_MOC_CPP) $(QT_MOC) $(QT_QRC_CPP) $(QT_QRC_LOCALE_CPP) if BUILD_WITH_QML - qt_libbitcoinqt_a_SOURCES += $(BITCOIN_QML_BASE_CPP) $(QML_QRC) $(QML_RES_QML) + qt_libbitcoinqt_a_SOURCES += $(BITCOIN_QML_BASE_CPP) $(QML_QRC) $(QML_RES_FONTS) $(QML_RES_QML) nodist_qt_libbitcoinqt_a_SOURCES += $(QML_QRC_CPP) endif # BUILD_WITH_QML @@ -399,7 +403,7 @@ $(QT_QRC_CPP): $(QT_QRC) $(QT_FORMS_H) $(QT_RES_FONTS) $(QT_RES_ICONS) $(QT_RES_ $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(RCC) -name bitcoin --format-version 1 $< > $@ if BUILD_WITH_QML -$(QML_QRC_CPP): $(QML_QRC) $(QML_RES_QML) +$(QML_QRC_CPP): $(QML_QRC) $(QML_RES_FONTS) $(QML_RES_QML) @test -f $(RCC) $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(RCC) --name bitcoin_qml --format-version 1 $< > $@ endif # BUILD_WITH_QML diff --git a/src/qml/bitcoin.cpp b/src/qml/bitcoin.cpp index 44301228c2..425b8fb2cf 100644 --- a/src/qml/bitcoin.cpp +++ b/src/qml/bitcoin.cpp @@ -175,6 +175,9 @@ int QmlGuiMain(int argc, char* argv[]) node_model.startNodeShutdown(); }); + GUIUtil::LoadFont(":/fonts/inter/regular"); + GUIUtil::LoadFont(":/fonts/inter/semibold"); + QQmlApplicationEngine engine; QScopedPointer network_style{NetworkStyle::instantiate(Params().NetworkIDString())}; diff --git a/src/qml/bitcoin_qml.qrc b/src/qml/bitcoin_qml.qrc index d851c44076..0cfcef47ef 100644 --- a/src/qml/bitcoin_qml.qrc +++ b/src/qml/bitcoin_qml.qrc @@ -7,4 +7,8 @@ ../qt/res/icons/bitcoin.png + + res/fonts/Inter-Regular.otf + res/fonts/Inter-SemiBold.otf + diff --git a/src/qml/components/BlockCounter.qml b/src/qml/components/BlockCounter.qml index e23ba7b72d..69ce238775 100644 --- a/src/qml/components/BlockCounter.qml +++ b/src/qml/components/BlockCounter.qml @@ -16,6 +16,8 @@ Label { padding: 16 horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter + font.family: "Inter" + font.styleName: "Semi Bold" font.pixelSize: height / 3 text: blockHeight } diff --git a/src/qml/res/fonts/Inter-Regular.otf b/src/qml/res/fonts/Inter-Regular.otf new file mode 100644 index 0000000000..84e6a61c3c Binary files /dev/null and b/src/qml/res/fonts/Inter-Regular.otf differ diff --git a/src/qml/res/fonts/Inter-SemiBold.otf b/src/qml/res/fonts/Inter-SemiBold.otf new file mode 100644 index 0000000000..daf4c4413f Binary files /dev/null and b/src/qml/res/fonts/Inter-SemiBold.otf differ