Fix font detection command on linux in setup.py

This commit is contained in:
1024th 2026-03-13 01:03:20 +08:00
parent c0b549fee8
commit ffe8cef1a8

View file

@ -949,7 +949,7 @@ def add_builtin_fonts(args: Options) -> None:
break
else:
lines = subprocess.check_output([
'fc-match', '--format', '%{file}\n%{postscriptname}', f'term:postscriptname={psname}', 'file', 'postscriptname']).decode().splitlines()
'fc-list', '--format', '%{file}\n%{postscriptname}', f':postscriptname={psname}']).decode().splitlines()
if len(lines) != 2:
raise SystemExit(f'fc-match returned unexpected output: {lines}')
if lines[1] != psname: