fix(编辑能力): 修复字体引用隔离与资源释放
build.yaml / build (push) Successful in 49s

This commit is contained in:
xiaoqidun committed 2026-10-28 16:07:41 +08:00
1 parent 50898934dc
commit f4429b126a
3 files changed
+9 -5

No files matched your search

+1 -1
View File
@@ -31,7 +31,7 @@ export class FontPicker {
const name = (font.fullName || font.name).normalize("NFKC").toLocaleLowerCase();
this.names.set(name, (this.names.get(name) || 0) + 1);
}
const key = font => font?.id || font?.postscriptName;
const key = font => font?.richKey || font?.id || font?.postscriptName;
this.value = !fonts.length ? "" : selected === null ? "-1" : String(Math.max(0, fonts.findIndex(font => key(font) === key(selected))));
this.restore();
}