Skip to content

Commit 26de8b0

Browse files
committed
qml: Add regular and semibold typefaces of Inter font
1 parent cd1f893 commit 26de8b0

File tree

6 files changed

+14
-1
lines changed

6 files changed

+14
-1
lines changed

src/Makefile.qt.include

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,10 @@ BITCOIN_QML_BASE_CPP = \
290290
qml/nodemodel.cpp \
291291
qml/util.cpp
292292

293+
QML_RES_FONTS = \
294+
qml/res/fonts/Inter-Regular.otf \
295+
qml/res/fonts/Inter-SemiBold.otf
296+
293297
QML_QRC_CPP = qml/qrc_bitcoin.cpp
294298
QML_QRC = qml/bitcoin_qml.qrc
295299
RES_QML = $(wildcard $(srcdir)/qml/pages/*.qml)
@@ -396,7 +400,7 @@ $(QT_QRC_CPP): $(QT_QRC) $(QT_FORMS_H) $(QT_RES_FONTS) $(QT_RES_ICONS) $(QT_RES_
396400
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(RCC) -name bitcoin --format-version 1 $< > $@
397401

398402
if BUILD_WITH_QML
399-
$(QML_QRC_CPP): $(QML_QRC) $(RES_QML)
403+
$(QML_QRC_CPP): $(QML_QRC) $(QML_RES_FONTS) $(RES_QML)
400404
@test -f $(RCC)
401405
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(RCC) --name bitcoin_qml --format-version 1 $< > $@
402406
endif # BUILD_WITH_QML

src/qml/bitcoin.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ int QmlGuiMain(int argc, char* argv[])
175175
node_model.startNodeShutdown();
176176
});
177177

178+
GUIUtil::loadFont(":/fonts/inter/regular");
179+
GUIUtil::loadFont(":/fonts/inter/semibold");
180+
178181
QQmlApplicationEngine engine;
179182

180183
QScopedPointer<const NetworkStyle> network_style{NetworkStyle::instantiate(Params().NetworkIDString())};

src/qml/bitcoin_qml.qrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@
77
<qresource prefix="/icons">
88
<file alias="bitcoin">../qt/res/icons/bitcoin.png</file>
99
</qresource>
10+
<qresource prefix="/fonts">
11+
<file alias="inter/regular">res/fonts/Inter-Regular.otf</file>
12+
<file alias="inter/semibold">res/fonts/Inter-SemiBold.otf</file>
13+
</qresource>
1014
</RCC>

src/qml/components/BlockCounter.qml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Label {
1616
padding: 16
1717
horizontalAlignment: Text.AlignHCenter
1818
verticalAlignment: Text.AlignVCenter
19+
font.family: "Inter"
20+
font.styleName: "Semi Bold"
1921
font.pixelSize: height / 3
2022
text: blockHeight
2123
}

src/qml/res/fonts/Inter-Regular.otf

253 KB
Binary file not shown.

src/qml/res/fonts/Inter-SemiBold.otf

264 KB
Binary file not shown.

0 commit comments

Comments
 (0)