Skip to content

Commit

Permalink
代码整理
Browse files Browse the repository at this point in the history
  • Loading branch information
TakWolf committed Jul 7, 2024
1 parent 444390d commit afe6cb5
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def main():
dump_service.apply_fallback(fallback_config)

design_context = DesignContext.load(font_config, path_define.patch_glyphs_dir)
design_context.standardized()
design_context.format_glyphs()
design_context.fallback(DesignContext.load(font_config, path_define.ark_pixel_glyphs_dir))
design_context.fallback(DesignContext.load(font_config, path_define.fallback_glyphs_dir))
for width_mode in configs.width_modes:
Expand Down
2 changes: 1 addition & 1 deletion tools/build_www.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def main():
dump_service.apply_fallback(fallback_config)

design_context = DesignContext.load(font_config, path_define.patch_glyphs_dir)
design_context.standardized()
design_context.format_glyphs()
design_context.fallback(DesignContext.load(font_config, path_define.ark_pixel_glyphs_dir))
design_context.fallback(DesignContext.load(font_config, path_define.fallback_glyphs_dir))
for width_mode in configs.width_modes:
Expand Down
7 changes: 7 additions & 0 deletions tools/format.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

def main():
pass


if __name__ == '__main__':
main()
Empty file added tools/services/check_service.py
Empty file.
4 changes: 2 additions & 2 deletions tools/services/font_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def __init__(
self._character_mapping_pool = {}
self._glyph_files_pool = {}

def standardized(self):
def format_glyphs(self):
root_dir = self.glyphs_dir.joinpath(str(self.font_config.font_size))
for width_mode_dir_name, code_point_registry in self._glyph_file_registry.items():
width_mode_dir = root_dir.joinpath(width_mode_dir_name)
Expand Down Expand Up @@ -186,7 +186,7 @@ def standardized(self):
file_dir.mkdir(parents=True, exist_ok=True)
glyph_file.file_path.rename(file_path)
glyph_file.file_path = file_path
logger.info("Standardize glyph file path: '%s'", glyph_file.file_path)
logger.info("Format glyph file path: '%s'", glyph_file.file_path)

for file_dir, _, _ in root_dir.walk(top_down=False):
if fs_util.is_empty_dir(file_dir):
Expand Down
Empty file.

0 comments on commit afe6cb5

Please sign in to comment.