From 225f2812fcd87b217405a97fbd7f0d5f45192e84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Tue, 14 Feb 2023 19:59:23 +0800 Subject: Some use embedded Roboto --- HomeDefault.ui.qml | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/HomeDefault.ui.qml b/HomeDefault.ui.qml index d580aa0..018c0a9 100644 --- a/HomeDefault.ui.qml +++ b/HomeDefault.ui.qml @@ -6,6 +6,11 @@ Flickable { property alias header: header property alias counter: counter property alias popular: popular + property bool doesntEmbed: Qt.platform.os === "android" + || Qt.platform.os === "linux" + || Qt.platform.os === "osx" + || Qt.platform.os === "unix" + || Qt.platform.os === "windows" contentHeight: body.height ColumnLayout { @@ -52,8 +57,16 @@ Flickable { horizontalAlignment: Text.AlignHCenter wrapMode: Text.Wrap Layout.fillWidth: true - font.family: heebo.name - font.pixelSize: 24 + font { + family: heebo.name + pixelSize: 24 + } + } + + FontLoader { + id: roboto + source: doesntEmbed ? "" + : "Roboto/Roboto-Medium.ttf" } Label { @@ -62,8 +75,12 @@ Flickable { horizontalAlignment: Text.AlignHCenter wrapMode: Text.Wrap Layout.fillWidth: true - font.family: "Roboto" - font.pixelSize: 19 + font { + family: doesntEmbed + ? "Roboto" + : roboto.name + pixelSize: 19 + } } } -- cgit v1.2.3