Skip to content

Commit

Permalink
Copy and shop fonts manually
Browse files Browse the repository at this point in the history
  • Loading branch information
sukso96100 committed Sep 3, 2023
1 parent 938be88 commit 16f9c9d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
11 changes: 7 additions & 4 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
});
}
}
Expand Down
10 changes: 5 additions & 5 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion snap/hooks/install
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 16f9c9d

Please sign in to comment.