mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 17:27:08 +08:00
feat(原生桌面): 完善字体别名与集合匹配
This commit is contained in:
1 parent
92785cea4f
commit
a4f979ed2f
2 files changed
+2
-2
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user