File Index
Files and directories
Sign in
FILE

check-variable-fonts.py

File preview with syntax highlighting.

linux-6.19.14/tools/docs/check-variable-fonts.py PYTHON
 1#!/usr/bin/env python3
 2# SPDX-License-Identifier: GPL-2.0-only
 3# Copyright (C) Akira Yokosawa, 2024
 4#
 5# Ported to Python by (c) Mauro Carvalho Chehab, 2025
 6#
 7# pylint: disable=C0103
 8
 9"""
10Detect problematic Noto CJK variable fonts.
11
12or more details, see .../tools/lib/python/kdoc/latex_fonts.py.
13"""
14
15import argparse
16import sys
17import os.path
18
19src_dir = os.path.dirname(os.path.realpath(__file__))
20sys.path.insert(0, os.path.join(src_dir, '../lib/python'))
21
22from kdoc.latex_fonts import LatexFontChecker
23
24checker = LatexFontChecker()
25
26parser=argparse.ArgumentParser(description=checker.description(),
27                               formatter_class=argparse.RawTextHelpFormatter)
28parser.add_argument("--deny-vf",
29                    help="XDG_CONFIG_HOME dir containing fontconfig/fonts.conf file")
30
31args=parser.parse_args()
32
33msg = LatexFontChecker(args.deny_vf).check()
34if msg:
35    print(msg)
36
37sys.exit(1)
~/ Read-only file preview.