From 249d8a3751b76c1b0ad836b7fd0be92379aacea8 Mon Sep 17 00:00:00 2001 From: TakWolf Date: Tue, 12 Nov 2024 02:59:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=BB=98=E8=AE=A4=20flavor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/services/check_service.py | 2 +- tools/services/font_service.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/services/check_service.py b/tools/services/check_service.py index 442d840..51ed4d0 100644 --- a/tools/services/check_service.py +++ b/tools/services/check_service.py @@ -23,7 +23,7 @@ def check_glyph_files(font_config: FontConfig): width_mode_dir = path_define.patch_glyphs_dir.joinpath(str(font_config.font_size), width_mode_dir_name) context = glyph_file_util.load_context(width_mode_dir) for code_point, flavor_group in context.items(): - assert '' in flavor_group, f'[{font_config.font_size}px] missing default flavor: {width_mode_dir_name} {code_point:04X}' + assert None in flavor_group, f'[{font_config.font_size}px] missing default flavor: {width_mode_dir_name} {code_point:04X}' if code_point == -1: block = None diff --git a/tools/services/font_service.py b/tools/services/font_service.py index cb101a7..7d00f92 100644 --- a/tools/services/font_service.py +++ b/tools/services/font_service.py @@ -33,10 +33,10 @@ def load(font_config: FontConfig) -> 'DesignContext': flavor_group['zh_hans'] = flavor_group['zh_cn'] if 'zh_tr' in flavor_group: flavor_group['zh_hant'] = flavor_group['zh_tr'] - if '' not in flavor_group: + if None not in flavor_group: for language_flavor in configs.language_file_flavors: if language_flavor in flavor_group: - flavor_group[''] = flavor_group[language_flavor] + flavor_group[None] = flavor_group[language_flavor] break return DesignContext(font_config, glyph_files)