From 343501011f828b63fec746032998334758b7f859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Mon, 5 Oct 2026 23:59:36 -0400 Subject: [PATCH] Indent the font test's Python harness with two spaces --- test/shell.d/fontconfig-cjk-test.sh | 32 ++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/test/shell.d/fontconfig-cjk-test.sh b/test/shell.d/fontconfig-cjk-test.sh index c04be559..3899d78b 100755 --- a/test/shell.d/fontconfig-cjk-test.sh +++ b/test/shell.d/fontconfig-cjk-test.sh @@ -48,23 +48,23 @@ fc.FcPatternAddCharSet.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_vo fc.FcFontMatch.restype = ctypes.c_void_p fc.FcFontMatch.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int)] for line in sys.stdin: - family, lang, char = line.split() - pattern = fc.FcPatternCreate() - fc.FcPatternAddString(pattern, b"family", family.encode()) - if lang != "-": - fc.FcPatternAddString(pattern, b"lang", lang.encode()) - if char == "families": - fc.FcConfigSubstitute(None, pattern, 0) - print(fc.FcPatternFormat(pattern, b"%{family}").decode()) - continue - if char != "-": - charset = fc.FcCharSetCreate() - fc.FcCharSetAddChar(charset, int(char, 16)) - fc.FcPatternAddCharSet(pattern, b"charset", charset) + family, lang, char = line.split() + pattern = fc.FcPatternCreate() + fc.FcPatternAddString(pattern, b"family", family.encode()) + if lang != "-": + fc.FcPatternAddString(pattern, b"lang", lang.encode()) + if char == "families": fc.FcConfigSubstitute(None, pattern, 0) - fc.FcDefaultSubstitute(pattern) - result = ctypes.c_int() - print(fc.FcPatternFormat(fc.FcFontMatch(None, pattern, ctypes.byref(result)), b"%{family[0]}").decode()) + print(fc.FcPatternFormat(pattern, b"%{family}").decode()) + continue + if char != "-": + charset = fc.FcCharSetCreate() + fc.FcCharSetAddChar(charset, int(char, 16)) + fc.FcPatternAddCharSet(pattern, b"charset", charset) + fc.FcConfigSubstitute(None, pattern, 0) + fc.FcDefaultSubstitute(pattern) + result = ctypes.c_int() + print(fc.FcPatternFormat(fc.FcFontMatch(None, pattern, ctypes.byref(result)), b"%{family[0]}").decode()) PY # resolve reads "family lang char" lines