Skip to content

Commit

Permalink
Update the font loading logic for Vivo
Browse files Browse the repository at this point in the history
  • Loading branch information
LastMonopoly committed Feb 19, 2023
1 parent 69a545e commit 1549006
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/src/system_chinese_font.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'dart:io';
import 'dart:ui';

import 'package:flutter/material.dart';
Expand Down Expand Up @@ -45,7 +46,13 @@ class SystemChineseFont {
static List<String> get fontFamilyFallback {
if (!systemFontLoaded) {
// honorSystemFont.load();
vivoSystemFont.load();
final vivoFont = File("/system/fonts/VivoFont.ttf");
if (vivoFont.existsSync() &&
vivoFont
.resolveSymbolicLinksSync()
.contains("DroidSansFallbackBBK")) {
vivoSystemFont.load();
}
systemFontLoaded = true;
}

Expand Down

0 comments on commit 1549006

Please sign in to comment.