fix: don't preview font style for system fonts on Linux, closes #1015 (#1023)

This commit is contained in:
Huang Xin 2025-05-04 18:23:01 +08:00 committed by GitHub
parent 6b290f09f5
commit 4f6f45fe8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 47 additions and 14 deletions

View file

@ -296,7 +296,11 @@ class NativeBridgePlugin(private val activity: Activity): Plugin(activity) {
.trim()
fontList.add(fontName)
}
ret.put("fonts", JSONArray(fontList))
var fontDict = JSObject()
for (fontName in fontList) {
fontDict.put(fontName, fontName)
}
ret.put("fonts", fontDict)
} catch (e: Exception) {
ret.put("error", e.message)
}