mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-02 17:44:31 +08:00
refactor: 写死的坐标改为全局常量
This commit is contained in:
1 parent
4c6343227f
commit
e666b85ba3
15 files changed
+354
-187
No files matched your search
@@ -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
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user