diff --git a/lib/main.dart b/lib/main.dart index f96f403..878caa1 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -21,10 +21,13 @@ class MyApp extends StatelessWidget { data: const YaruThemeData( variant: YaruVariant.orange, useMaterial3: true), builder: (context, yaru, child) { - return MaterialApp( - theme: yaru.theme, - darkTheme: yaru.darkTheme, - home: const KioskMainPage()); + return DefaultTextStyle( + style: const TextStyle( + fontFamily: "Ubuntu", fontFamilyFallback: ["Noto Sans CJK"]), + child: MaterialApp( + theme: yaru.theme, + darkTheme: yaru.darkTheme, + home: const KioskMainPage())); }); } } diff --git a/pubspec.yaml b/pubspec.yaml index 521d26b..4b8cfb8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -90,11 +90,11 @@ flutter: # "family" key with the font family name, and a "fonts" key with a # list giving the asset and other descriptors for the font. For # example: - # fonts: - # - family: Noto Sans CJK - # fonts: - # - asset: /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc - # - asset: /usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc + fonts: + - family: Noto Sans CJK + fonts: + - asset: fonts/NotoSansCJK-Regular.ttc + - asset: fonts/NotoSansCJK-Bold.ttc # - family: Trajan Pro # fonts: # - asset: fonts/TrajanPro.ttf diff --git a/snap/hooks/install b/snap/hooks/install index 946a7f0..edf6441 100755 --- a/snap/hooks/install +++ b/snap/hooks/install @@ -1,6 +1,5 @@ #!/bin/sh set -x -fc-cache -f -v if [ "$(snapctl get daemon)" = "" ] then if grep -q -e snap_core= -e snapd_recovery_mode= /proc/cmdline diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index a9103d9..5bbd479 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -189,11 +189,12 @@ parts: - fonts-noto-cjk - libsqlite3-0 - libsqlite3-dev - - fontconfig # - libdrm-common override-build: | set -eux mkdir -p $CRAFT_PART_INSTALL/bin/lib + mkdir fonts + cp -r /usr/share/fonts/opentype/noto/* fonts/ flutter channel stable flutter upgrade flutter config --enable-linux-desktop