Skip to content

Add regular and semibold typefaces of Inter font #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -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 = \
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/qml/bitcoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<const NetworkStyle> network_style{NetworkStyle::instantiate(Params().NetworkIDString())};
Expand Down
4 changes: 4 additions & 0 deletions src/qml/bitcoin_qml.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@
<qresource prefix="/icons">
<file alias="bitcoin">../qt/res/icons/bitcoin.png</file>
</qresource>
<qresource prefix="/fonts">
<file alias="inter/regular">res/fonts/Inter-Regular.otf</file>
<file alias="inter/semibold">res/fonts/Inter-SemiBold.otf</file>
</qresource>
</RCC>
2 changes: 2 additions & 0 deletions src/qml/components/BlockCounter.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Binary file added src/qml/res/fonts/Inter-Regular.otf
Binary file not shown.
Binary file added src/qml/res/fonts/Inter-SemiBold.otf
Binary file not shown.