refactor: 写死的坐标改为全局常量

This commit is contained in:
AncTe committed 2025-09-25 18:24:13 +08:00
1 parent 4c6343227f
commit e666b85ba3
15 files changed
+354 -187

No files matched your search

+12 -2
View File
@@ -160,8 +160,18 @@ export class Font implements IFontConfig {
/**
* 获取默认字体
*/
static defaults() {
return new Font();
static defaults(config?: Partial<IFontConfig>) {
if (!config) {
return new Font();
} else {
return new Font(
config.family,
config.size,
config.sizeUnit,
config.weight,
config.italic
);
}
}
/**