Skip to content

Commit

Permalink
命名调整
Browse files Browse the repository at this point in the history
  • Loading branch information
TakWolf committed Jul 11, 2024
1 parent f0239a6 commit e2d50a2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tools/configs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Literal, get_args

font_version = '2024.05.12'
version = '2024.05.12'

type FontSize = Literal[10, 12, 16]
font_sizes = list[FontSize](get_args(FontSize.__value__))
Expand Down
4 changes: 2 additions & 2 deletions tools/services/font_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ def _create_builder(self, width_mode: WidthMode, language_flavor: LanguageFlavor
builder.font_metric.x_height = layout_param.x_height
builder.font_metric.cap_height = layout_param.cap_height

builder.meta_info.version = configs.font_version
builder.meta_info.created_time = datetime.datetime.fromisoformat(f'{configs.font_version.replace('.', '-')}T00:00:00Z')
builder.meta_info.version = configs.version
builder.meta_info.created_time = datetime.datetime.fromisoformat(f'{configs.version.replace('.', '-')}T00:00:00Z')
builder.meta_info.modified_time = builder.meta_info.created_time
builder.meta_info.family_name = f'Ark Pixel {self.font_size}px {width_mode.capitalize()} {language_flavor}'
builder.meta_info.weight_name = WeightName.REGULAR
Expand Down
2 changes: 1 addition & 1 deletion tools/services/info_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def make_font_info(design_context: DesignContext, width_mode: WidthMode):
output.write('\n')
output.write('| 属性 | 值 |\n')
output.write('|---|---|\n')
output.write(f'| 版本号 | {configs.font_version} |\n')
output.write(f'| 版本号 | {configs.version} |\n')
output.write(f'| 字符总数 | {len(alphabet)} |\n')
output.write('\n')
output.write('## Unicode 字符分布\n')
Expand Down
2 changes: 1 addition & 1 deletion tools/services/publish_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

def make_release_zip(font_size: FontSize, width_mode: WidthMode, font_format: FontFormat | FontCollectionFormat):
path_define.releases_dir.mkdir(parents=True, exist_ok=True)
file_path = path_define.releases_dir.joinpath(f'ark-pixel-font-{font_size}px-{width_mode}-{font_format}-v{configs.font_version}.zip')
file_path = path_define.releases_dir.joinpath(f'ark-pixel-font-{font_size}px-{width_mode}-{font_format}-v{configs.version}.zip')
with zipfile.ZipFile(file_path, 'w') as file:
file.write(path_define.project_root_dir.joinpath('LICENSE-OFL'), 'OFL.txt')
if font_format in configs.font_formats:
Expand Down

0 comments on commit e2d50a2

Please sign in to comment.