Commit 658e6bc7 authored by myhloli's avatar myhloli
Browse files

refactor(utils): comment out Chinese font check on Windows

- Temporarily disable Chinese font check for Windows systems
- This change allows bypassing the font check when the required fonts are not present
parent 4641264e
...@@ -21,13 +21,14 @@ def check_fonts_installed(): ...@@ -21,13 +21,14 @@ def check_fonts_installed():
if system_type == 'Windows': if system_type == 'Windows':
# Windows: check fonts via registry or system font folder # Windows: check fonts via registry or system font folder
font_dir = Path("C:/Windows/Fonts") # font_dir = Path("C:/Windows/Fonts")
installed_fonts = [f.name for f in font_dir.glob("*.ttf")] # installed_fonts = [f.name for f in font_dir.glob("*.ttf")]
if any(font for font in REQUIRED_CHS_FONTS if any(font in f for f in installed_fonts)): # if any(font for font in REQUIRED_CHS_FONTS if any(font in f for f in installed_fonts)):
return True # return True
raise EnvironmentError( # raise EnvironmentError(
f"Missing Chinese font. Please install at least one of: {', '.join(REQUIRED_CHS_FONTS)}" # f"Missing Chinese font. Please install at least one of: {', '.join(REQUIRED_CHS_FONTS)}"
) # )
pass
else: else:
# Linux/macOS: use fc-list # Linux/macOS: use fc-list
try: try:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment