Skip to content

Commit

Permalink
Merge pull request #287 from Npepperlinux/linuxfont
Browse files Browse the repository at this point in the history
Linuxのフォントコールバックの改善
  • Loading branch information
shiosyakeyakini-info authored Sep 9, 2023
2 parents 45f6c7b + 1acc2e9 commit 2d1b4c6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/view/themes/app_theme_scope.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,16 @@ class AppThemeScopeState extends ConsumerState<AppThemeScope> {
defaultTargetPlatform == TargetPlatform.macOS) {
return "SF Pro Text";
}
if (defaultTargetPlatform == TargetPlatform.linux) {
return "Noto Sans CJK JP";
}

return "KosugiMaru";
}

List<String> resolveFontFamilyCallback() {
if (defaultTargetPlatform == TargetPlatform.windows) {
if (defaultTargetPlatform == TargetPlatform.windows ||
defaultTargetPlatform == TargetPlatform.linux) {
return ["Noto Sans CJK JP", "KosugiMaru", "BIZ UDPGothic"];
}
if (defaultTargetPlatform == TargetPlatform.iOS ||
Expand Down Expand Up @@ -101,7 +105,8 @@ class AppThemeScopeState extends ConsumerState<AppThemeScope> {
fontFamily: "Segoe UI Emoji",
fontFamilyFallback: ["Segoe UI Emoji", "Noto Color Emoji", "Meiryo"]);
}
if (defaultTargetPlatform == TargetPlatform.android) {
if (defaultTargetPlatform == TargetPlatform.android ||
defaultTargetPlatform == TargetPlatform.linux) {
return const TextStyle(
fontFamily: "Noto Color Emoji",
fontFamilyFallback: ["Noto Color Emoji", "Noto Sans JP"]);
Expand Down

0 comments on commit 2d1b4c6

Please sign in to comment.