fix: import system fonts list on Android (#998)

Note that the system fonts might not be available in Android webview
This commit is contained in:
Huang Xin
2025-04-30 01:14:03 +08:00
committed by GitHub
parent 946d17882b
commit 59f0cede39
2 changed files with 2 additions and 1 deletions
@@ -137,7 +137,7 @@ const FontPanel: React.FC<{ bookKey: string }> = ({ bookKey }) => {
useEffect(() => {
if (isTauriAppPlatform()) {
getSysFontsList().then((res) => {
if (res.error) {
if (res.error || res.fonts.length === 0) {
console.error('Failed to get system fonts list:', res.error);
return;
}