feat(原生桌面): 完善字体别名与集合匹配

This commit is contained in:
xiaoqidun committed 2026-10-18 03:26:20 +08:00
1 parent 92785cea4f
commit a4f979ed2f
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -400,7 +400,7 @@ export class FontManager {
for (const font of fonts) {
if (disabled.has(this.localName(font))) continue;
const names = [this.localName(font), font.postscriptName && `${font.postscriptName}.ttf`,
font.family && `${[font.family, font.style].filter(Boolean).join(" ")}.ttf`];
font.family && `${[font.family, font.style].filter(Boolean).join(" ")}.ttf`, ...(font.names || []).map(name => `${name}.ttf`)];
for (const name of names) {
if (name && !entries.has(name)) entries.set(name, font);
}