freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype][master] * src/tools/*.py: Migrate to Python 3.


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] * src/tools/*.py: Migrate to Python 3.
Date: Thu, 29 Sep 2022 02:42:18 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

  • 3f3427c6
    by Azamat Hackimov at 2022-09-28T22:35:49-04:00
    * src/tools/*.py: Migrate to Python 3.
    
    Fixes #1185, closes !205. Formatting changes according to PEP8.
    

3 changed files:

Changes:

  • src/tools/chktrcmp.py
    1
    -#!/usr/bin/env python
    
    1
    +#!/usr/bin/env python3
    
    2 2
     #
    
    3 3
     # Check trace components in FreeType 2 source.
    
    4 4
     # Author: suzuki toshiya, 2009, 2013, 2020
    
    5 5
     #
    
    6 6
     # This code is explicitly into the public domain.
    
    7 7
     
    
    8
    -
    
    9 8
     import sys
    
    10 9
     import os
    
    11 10
     import re
    
    12 11
     
    
    13
    -SRC_FILE_LIST   = []
    
    14
    -USED_COMPONENT  = {}
    
    12
    +SRC_FILE_LIST = []
    
    13
    +USED_COMPONENT = {}
    
    15 14
     KNOWN_COMPONENT = {}
    
    16 15
     
    
    17
    -SRC_FILE_DIRS   = [ "src" ]
    
    18
    -TRACE_DEF_FILES = [ "include/freetype/internal/fttrace.h" ]
    
    16
    +SRC_FILE_DIRS = ["src"]
    
    17
    +TRACE_DEF_FILES = ["include/freetype/internal/fttrace.h"]
    
    18
    +
    
    19
    +
    
    20
    +def usage():
    
    21
    +    print("Usage: %s [option]" % sys.argv[0])
    
    22
    +    print("Search used-but-defined and defined-but-not-used trace_XXX macros")
    
    23
    +    print("")
    
    24
    +    print("  --help:")
    
    25
    +    print("        Show this help")
    
    26
    +    print("")
    
    27
    +    print("  --src-dirs=dir1:dir2:...")
    
    28
    +    print("        Specify the directories of C source files to be checked")
    
    29
    +    print("        Default is %s" % ":".join(SRC_FILE_DIRS))
    
    30
    +    print("")
    
    31
    +    print("  --def-files=file1:file2:...")
    
    32
    +    print("        Specify the header files including FT_TRACE_DEF()")
    
    33
    +    print("        Default is %s" % ":".join(TRACE_DEF_FILES))
    
    34
    +    print("")
    
    19 35
     
    
    20 36
     
    
    21 37
     # --------------------------------------------------------------
    
    22 38
     # Parse command line options
    
    23 39
     #
    
    24
    -
    
    25
    -for i in range( 1, len( sys.argv ) ):
    
    26
    -  if sys.argv[i].startswith( "--help" ):
    
    27
    -    print "Usage: %s [option]" % sys.argv[0]
    
    28
    -    print "Search used-but-defined and defined-but-not-used trace_XXX macros"
    
    29
    -    print ""
    
    30
    -    print "  --help:"
    
    31
    -    print "        Show this help"
    
    32
    -    print ""
    
    33
    -    print "  --src-dirs=dir1:dir2:..."
    
    34
    -    print "        Specify the directories of C source files to be checked"
    
    35
    -    print "        Default is %s" % ":".join( SRC_FILE_DIRS )
    
    36
    -    print ""
    
    37
    -    print "  --def-files=file1:file2:..."
    
    38
    -    print "        Specify the header files including FT_TRACE_DEF()"
    
    39
    -    print "        Default is %s" % ":".join( TRACE_DEF_FILES )
    
    40
    -    print ""
    
    41
    -    exit(0)
    
    42
    -  if sys.argv[i].startswith( "--src-dirs=" ):
    
    43
    -    SRC_FILE_DIRS = sys.argv[i].replace( "--src-dirs=", "", 1 ).split( ":" )
    
    44
    -  elif sys.argv[i].startswith( "--def-files=" ):
    
    45
    -    TRACE_DEF_FILES = sys.argv[i].replace( "--def-files=", "", 1 ).split( ":" )
    
    46
    -
    
    40
    +for i in range(1, len(sys.argv)):
    
    41
    +    if sys.argv[i].startswith("--help"):
    
    42
    +        usage()
    
    43
    +        exit(0)
    
    44
    +    if sys.argv[i].startswith("--src-dirs="):
    
    45
    +        SRC_FILE_DIRS = sys.argv[i].replace("--src-dirs=", "", 1).split(":")
    
    46
    +    elif sys.argv[i].startswith("--def-files="):
    
    47
    +        TRACE_DEF_FILES = sys.argv[i].replace("--def-files=", "", 1).split(":")
    
    47 48
     
    
    48 49
     # --------------------------------------------------------------
    
    49 50
     # Scan C source and header files using trace macros.
    
    50 51
     #
    
    51 52
     
    
    52
    -c_pathname_pat = re.compile( '^.*\.[ch]$', re.IGNORECASE )
    
    53
    -trace_use_pat  = re.compile( '^[ \t]*#define[ \t]+FT_COMPONENT[ \t]+' )
    
    53
    +c_pathname_pat = re.compile('^.*\.[ch]$', re.IGNORECASE)
    
    54
    +trace_use_pat = re.compile('^[ \t]*#define[ \t]+FT_COMPONENT[ \t]+')
    
    54 55
     
    
    55 56
     for d in SRC_FILE_DIRS:
    
    56
    -  for ( p, dlst, flst ) in os.walk( d ):
    
    57
    -    for f in flst:
    
    58
    -      if c_pathname_pat.match( f ) != None:
    
    59
    -        src_pathname = os.path.join( p, f )
    
    60
    -
    
    61
    -        line_num = 0
    
    62
    -        for src_line in open( src_pathname, 'r' ):
    
    63
    -          line_num = line_num + 1
    
    64
    -          src_line = src_line.strip()
    
    65
    -          if trace_use_pat.match( src_line ) != None:
    
    66
    -            component_name = trace_use_pat.sub( '', src_line )
    
    67
    -            if component_name in USED_COMPONENT:
    
    68
    -              USED_COMPONENT[component_name].append( "%s:%d" % ( src_pathname, line_num ) )
    
    69
    -            else:
    
    70
    -              USED_COMPONENT[component_name] = [ "%s:%d" % ( src_pathname, line_num ) ]
    
    71
    -
    
    57
    +    for (p, dlst, flst) in os.walk(d):
    
    58
    +        for f in flst:
    
    59
    +            if c_pathname_pat.match(f) is not None:
    
    60
    +                src_pathname = os.path.join(p, f)
    
    61
    +
    
    62
    +                line_num = 0
    
    63
    +                for src_line in open(src_pathname, 'r'):
    
    64
    +                    line_num = line_num + 1
    
    65
    +                    src_line = src_line.strip()
    
    66
    +                    if trace_use_pat.match(src_line) is not None:
    
    67
    +                        component_name = trace_use_pat.sub('', src_line)
    
    68
    +                        if component_name in USED_COMPONENT:
    
    69
    +                            USED_COMPONENT[component_name]\
    
    70
    +                                .append("%s:%d" % (src_pathname, line_num))
    
    71
    +                        else:
    
    72
    +                            USED_COMPONENT[component_name] =\
    
    73
    +                                ["%s:%d" % (src_pathname, line_num)]
    
    72 74
     
    
    73 75
     # --------------------------------------------------------------
    
    74 76
     # Scan header file(s) defining trace macros.
    
    75 77
     #
    
    76 78
     
    
    77
    -trace_def_pat_opn = re.compile( '^.*FT_TRACE_DEF[ \t]*\([ \t]*' )
    
    78
    -trace_def_pat_cls = re.compile( '[ \t\)].*$' )
    
    79
    +trace_def_pat_opn = re.compile('^.*FT_TRACE_DEF[ \t]*\([ \t]*')
    
    80
    +trace_def_pat_cls = re.compile('[ \t\)].*$')
    
    79 81
     
    
    80 82
     for f in TRACE_DEF_FILES:
    
    81
    -  line_num = 0
    
    82
    -  for hdr_line in open( f, 'r' ):
    
    83
    -    line_num = line_num + 1
    
    84
    -    hdr_line = hdr_line.strip()
    
    85
    -    if trace_def_pat_opn.match( hdr_line ) != None:
    
    86
    -      component_name = trace_def_pat_opn.sub( '', hdr_line )
    
    87
    -      component_name = trace_def_pat_cls.sub( '', component_name )
    
    88
    -      if component_name in KNOWN_COMPONENT:
    
    89
    -        print "trace component %s is defined twice, see %s and fttrace.h:%d" % \
    
    90
    -          ( component_name, KNOWN_COMPONENT[component_name], line_num )
    
    91
    -      else:
    
    92
    -        KNOWN_COMPONENT[component_name] = "%s:%d" % \
    
    93
    -          ( os.path.basename( f ), line_num )
    
    94
    -
    
    83
    +    line_num = 0
    
    84
    +    for hdr_line in open(f, 'r'):
    
    85
    +        line_num = line_num + 1
    
    86
    +        hdr_line = hdr_line.strip()
    
    87
    +        if trace_def_pat_opn.match(hdr_line) is not None:
    
    88
    +            component_name = trace_def_pat_opn.sub('', hdr_line)
    
    89
    +            component_name = trace_def_pat_cls.sub('', component_name)
    
    90
    +            if component_name in KNOWN_COMPONENT:
    
    91
    +                print("trace component %s is defined twice,"
    
    92
    +                      " see %s and fttrace.h:%d" %
    
    93
    +                      (component_name, KNOWN_COMPONENT[component_name],
    
    94
    +                       line_num))
    
    95
    +            else:
    
    96
    +                KNOWN_COMPONENT[component_name] =\
    
    97
    +                    "%s:%d" % (os.path.basename(f), line_num)
    
    95 98
     
    
    96 99
     # --------------------------------------------------------------
    
    97 100
     # Compare the used and defined trace macros.
    
    98 101
     #
    
    99 102
     
    
    100
    -print "# Trace component used in the implementations but not defined in fttrace.h."
    
    101
    -cmpnt = USED_COMPONENT.keys()
    
    103
    +print("# Trace component used in the implementations but not defined in "
    
    104
    +      "fttrace.h.")
    
    105
    +cmpnt = list(USED_COMPONENT.keys())
    
    102 106
     cmpnt.sort()
    
    103 107
     for c in cmpnt:
    
    104
    -  if c not in KNOWN_COMPONENT:
    
    105
    -    print "Trace component %s (used in %s) is not defined." % ( c, ", ".join( USED_COMPONENT[c] ) )
    
    108
    +    if c not in KNOWN_COMPONENT:
    
    109
    +        print("Trace component %s (used in %s) is not defined." %
    
    110
    +              (c, ", ".join(USED_COMPONENT[c])))
    
    106 111
     
    
    107
    -print "# Trace component is defined but not used in the implementations."
    
    108
    -cmpnt = KNOWN_COMPONENT.keys()
    
    112
    +print("# Trace component is defined but not used in the implementations.")
    
    113
    +cmpnt = list(KNOWN_COMPONENT.keys())
    
    109 114
     cmpnt.sort()
    
    110 115
     for c in cmpnt:
    
    111
    -  if c not in USED_COMPONENT:
    
    112
    -    if c != "any":
    
    113
    -      print "Trace component %s (defined in %s) is not used." % ( c, KNOWN_COMPONENT[c] )
    
    114
    -
    116
    +    if c not in USED_COMPONENT:
    
    117
    +        if c != "any":
    
    118
    +            print("Trace component %s (defined in %s) is not used." %
    
    119
    +                  (c, KNOWN_COMPONENT[c]))

  • src/tools/cordic.py
    1
    +#!/usr/bin/env python3
    
    2
    +
    
    1 3
     # compute arctangent table for CORDIC computations in fttrigon.c
    
    2
    -import sys, math
    
    4
    +import math
    
    3 5
     
    
    4
    -#units  = 64*65536.0   # don't change !!
    
    5
    -units  = 180 * 2**16
    
    6
    -scale  = units/math.pi
    
    6
    +# units  = 64*65536.0   # don't change !!
    
    7
    +units = 180 * 2 ** 16
    
    8
    +scale = units / math.pi
    
    7 9
     shrink = 1.0
    
    8
    -comma  = ""
    
    10
    +angles2 = []
    
    9 11
     
    
    10
    -print ""
    
    11
    -print "table of arctan( 1/2^n ) for PI = " + repr(units/65536.0) + " units"
    
    12
    +print("")
    
    13
    +print("table of arctan( 1/2^n ) for PI = " + repr(units / 65536.0) + " units")
    
    12 14
     
    
    13
    -for n in range(1,32):
    
    15
    +for n in range(1, 32):
    
    14 16
     
    
    15
    -    x = 0.5**n                      # tangent value
    
    17
    +    x = 0.5 ** n  # tangent value
    
    16 18
     
    
    17
    -    angle  = math.atan(x)           # arctangent
    
    18
    -    angle2 = round(angle*scale)     # arctangent in FT_Angle units
    
    19
    +    angle = math.atan(x)  # arctangent
    
    20
    +    angle2 = round(angle * scale)  # arctangent in FT_Angle units
    
    19 21
     
    
    20 22
         if angle2 <= 0:
    
    21 23
             break
    
    22 24
     
    
    23
    -    sys.stdout.write( comma + repr( int(angle2) ) )
    
    24
    -    comma = ", "
    
    25
    -
    
    26
    -    shrink /= math.sqrt( 1 + x*x )
    
    27
    -
    
    28
    -print
    
    29
    -print "shrink factor    = " + repr( shrink )
    
    30
    -print "shrink factor 2  = " + repr( int( shrink * (2**32) ) )
    
    31
    -print "expansion factor = " + repr( 1/shrink )
    
    32
    -print ""
    
    25
    +    angles2.append(repr(int(angle2)))
    
    26
    +    shrink /= math.sqrt(1 + x * x)
    
    33 27
     
    
    28
    +print(", ".join(angles2))
    
    29
    +print("shrink factor    = " + repr(shrink))
    
    30
    +print("shrink factor 2  = " + repr(int(shrink * (2 ** 32))))
    
    31
    +print("expansion factor = " + repr(1 / shrink))
    
    32
    +print("")

  • src/tools/glnames.py
    1
    -#!/usr/bin/env python
    
    2
    -#
    
    1
    +#!/usr/bin/env python3
    
    3 2
     
    
    4 3
     #
    
    5 4
     # FreeType 2 glyph name builder
    
    6 5
     #
    
    7
    -
    
    8
    -
    
    9 6
     # Copyright (C) 1996-2022 by
    
    10 7
     # David Turner, Robert Wilhelm, and Werner Lemberg.
    
    11 8
     #
    
    ... ... @@ -16,8 +13,7 @@
    16 13
     # fully.
    
    17 14
     
    
    18 15
     
    
    19
    -"""\
    
    20
    -
    
    16
    +"""
    
    21 17
     usage: %s <output-file>
    
    22 18
     
    
    23 19
       This python script generates the glyph names tables defined in the
    
    ... ... @@ -26,9 +22,9 @@ usage: %s <output-file>
    26 22
       Its single argument is the name of the header file to be created.
    
    27 23
     """
    
    28 24
     
    
    29
    -
    
    30
    -import sys, string, struct, re, os.path
    
    31
    -
    
    25
    +import os.path
    
    26
    +import struct
    
    27
    +import sys
    
    32 28
     
    
    33 29
     # This table lists the glyphs according to the Macintosh specification.
    
    34 30
     # It is used by the TrueType Postscript names table.
    
    ... ... @@ -39,379 +35,371 @@ import sys, string, struct, re, os.path
    39 35
     #
    
    40 36
     # for the official list.
    
    41 37
     #
    
    42
    -mac_standard_names = \
    
    43
    -[
    
    44
    -  # 0
    
    45
    -  ".notdef", ".null", "nonmarkingreturn", "space", "exclam",
    
    46
    -  "quotedbl", "numbersign", "dollar", "percent", "ampersand",
    
    47
    -
    
    48
    -  # 10
    
    49
    -  "quotesingle", "parenleft", "parenright", "asterisk", "plus",
    
    50
    -  "comma", "hyphen", "period", "slash", "zero",
    
    51
    -
    
    52
    -  # 20
    
    53
    -  "one", "two", "three", "four", "five",
    
    54
    -  "six", "seven", "eight", "nine", "colon",
    
    55
    -
    
    56
    -  # 30
    
    57
    -  "semicolon", "less", "equal", "greater", "question",
    
    58
    -  "at", "A", "B", "C", "D",
    
    59
    -
    
    60
    -  # 40
    
    61
    -  "E", "F", "G", "H", "I",
    
    62
    -  "J", "K", "L", "M", "N",
    
    63
    -
    
    64
    -  # 50
    
    65
    -  "O", "P", "Q", "R", "S",
    
    66
    -  "T", "U", "V", "W", "X",
    
    67
    -
    
    68
    -  # 60
    
    69
    -  "Y", "Z", "bracketleft", "backslash", "bracketright",
    
    70
    -  "asciicircum", "underscore", "grave", "a", "b",
    
    71
    -
    
    72
    -  # 70
    
    73
    -  "c", "d", "e", "f", "g",
    
    74
    -  "h", "i", "j", "k", "l",
    
    75
    -
    
    76
    -  # 80
    
    77
    -  "m", "n", "o", "p", "q",
    
    78
    -  "r", "s", "t", "u", "v",
    
    79
    -
    
    80
    -  # 90
    
    81
    -  "w", "x", "y", "z", "braceleft",
    
    82
    -  "bar", "braceright", "asciitilde", "Adieresis", "Aring",
    
    83
    -
    
    84
    -  # 100
    
    85
    -  "Ccedilla", "Eacute", "Ntilde", "Odieresis", "Udieresis",
    
    86
    -  "aacute", "agrave", "acircumflex", "adieresis", "atilde",
    
    87
    -
    
    88
    -  # 110
    
    89
    -  "aring", "ccedilla", "eacute", "egrave", "ecircumflex",
    
    90
    -  "edieresis", "iacute", "igrave", "icircumflex", "idieresis",
    
    91
    -
    
    92
    -  # 120
    
    93
    -  "ntilde", "oacute", "ograve", "ocircumflex", "odieresis",
    
    94
    -  "otilde", "uacute", "ugrave", "ucircumflex", "udieresis",
    
    95
    -
    
    96
    -  # 130
    
    97
    -  "dagger", "degree", "cent", "sterling", "section",
    
    98
    -  "bullet", "paragraph", "germandbls", "registered", "copyright",
    
    99
    -
    
    100
    -  # 140
    
    101
    -  "trademark", "acute", "dieresis", "notequal", "AE",
    
    102
    -  "Oslash", "infinity", "plusminus", "lessequal", "greaterequal",
    
    103
    -
    
    104
    -  # 150
    
    105
    -  "yen", "mu", "partialdiff", "summation", "product",
    
    106
    -  "pi", "integral", "ordfeminine", "ordmasculine", "Omega",
    
    107
    -
    
    108
    -  # 160
    
    109
    -  "ae", "oslash", "questiondown", "exclamdown", "logicalnot",
    
    110
    -  "radical", "florin", "approxequal", "Delta", "guillemotleft",
    
    111
    -
    
    112
    -  # 170
    
    113
    -  "guillemotright", "ellipsis", "nonbreakingspace", "Agrave", "Atilde",
    
    114
    -  "Otilde", "OE", "oe", "endash", "emdash",
    
    115
    -
    
    116
    -  # 180
    
    117
    -  "quotedblleft", "quotedblright", "quoteleft", "quoteright", "divide",
    
    118
    -  "lozenge", "ydieresis", "Ydieresis", "fraction", "currency",
    
    119
    -
    
    120
    -  # 190
    
    121
    -  "guilsinglleft", "guilsinglright", "fi", "fl", "daggerdbl",
    
    122
    -  "periodcentered", "quotesinglbase", "quotedblbase", "perthousand",
    
    38
    +mac_standard_names = [
    
    39
    +    # 0
    
    40
    +    ".notdef", ".null", "nonmarkingreturn", "space", "exclam",
    
    41
    +    "quotedbl", "numbersign", "dollar", "percent", "ampersand",
    
    42
    +
    
    43
    +    # 10
    
    44
    +    "quotesingle", "parenleft", "parenright", "asterisk", "plus",
    
    45
    +    "comma", "hyphen", "period", "slash", "zero",
    
    46
    +
    
    47
    +    # 20
    
    48
    +    "one", "two", "three", "four", "five",
    
    49
    +    "six", "seven", "eight", "nine", "colon",
    
    50
    +
    
    51
    +    # 30
    
    52
    +    "semicolon", "less", "equal", "greater", "question",
    
    53
    +    "at", "A", "B", "C", "D",
    
    54
    +
    
    55
    +    # 40
    
    56
    +    "E", "F", "G", "H", "I",
    
    57
    +    "J", "K", "L", "M", "N",
    
    58
    +
    
    59
    +    # 50
    
    60
    +    "O", "P", "Q", "R", "S",
    
    61
    +    "T", "U", "V", "W", "X",
    
    62
    +
    
    63
    +    # 60
    
    64
    +    "Y", "Z", "bracketleft", "backslash", "bracketright",
    
    65
    +    "asciicircum", "underscore", "grave", "a", "b",
    
    66
    +
    
    67
    +    # 70
    
    68
    +    "c", "d", "e", "f", "g",
    
    69
    +    "h", "i", "j", "k", "l",
    
    70
    +
    
    71
    +    # 80
    
    72
    +    "m", "n", "o", "p", "q",
    
    73
    +    "r", "s", "t", "u", "v",
    
    74
    +
    
    75
    +    # 90
    
    76
    +    "w", "x", "y", "z", "braceleft",
    
    77
    +    "bar", "braceright", "asciitilde", "Adieresis", "Aring",
    
    78
    +
    
    79
    +    # 100
    
    80
    +    "Ccedilla", "Eacute", "Ntilde", "Odieresis", "Udieresis",
    
    81
    +    "aacute", "agrave", "acircumflex", "adieresis", "atilde",
    
    82
    +
    
    83
    +    # 110
    
    84
    +    "aring", "ccedilla", "eacute", "egrave", "ecircumflex",
    
    85
    +    "edieresis", "iacute", "igrave", "icircumflex", "idieresis",
    
    86
    +
    
    87
    +    # 120
    
    88
    +    "ntilde", "oacute", "ograve", "ocircumflex", "odieresis",
    
    89
    +    "otilde", "uacute", "ugrave", "ucircumflex", "udieresis",
    
    90
    +
    
    91
    +    # 130
    
    92
    +    "dagger", "degree", "cent", "sterling", "section",
    
    93
    +    "bullet", "paragraph", "germandbls", "registered", "copyright",
    
    94
    +
    
    95
    +    # 140
    
    96
    +    "trademark", "acute", "dieresis", "notequal", "AE",
    
    97
    +    "Oslash", "infinity", "plusminus", "lessequal", "greaterequal",
    
    98
    +
    
    99
    +    # 150
    
    100
    +    "yen", "mu", "partialdiff", "summation", "product",
    
    101
    +    "pi", "integral", "ordfeminine", "ordmasculine", "Omega",
    
    102
    +
    
    103
    +    # 160
    
    104
    +    "ae", "oslash", "questiondown", "exclamdown", "logicalnot",
    
    105
    +    "radical", "florin", "approxequal", "Delta", "guillemotleft",
    
    106
    +
    
    107
    +    # 170
    
    108
    +    "guillemotright", "ellipsis", "nonbreakingspace", "Agrave", "Atilde",
    
    109
    +    "Otilde", "OE", "oe", "endash", "emdash",
    
    110
    +
    
    111
    +    # 180
    
    112
    +    "quotedblleft", "quotedblright", "quoteleft", "quoteright", "divide",
    
    113
    +    "lozenge", "ydieresis", "Ydieresis", "fraction", "currency",
    
    114
    +
    
    115
    +    # 190
    
    116
    +    "guilsinglleft", "guilsinglright", "fi", "fl", "daggerdbl",
    
    117
    +    "periodcentered", "quotesinglbase", "quotedblbase", "perthousand",
    
    123 118
         "Acircumflex",
    
    124 119
     
    
    125
    -  # 200
    
    126
    -  "Ecircumflex", "Aacute", "Edieresis", "Egrave", "Iacute",
    
    127
    -  "Icircumflex", "Idieresis", "Igrave", "Oacute", "Ocircumflex",
    
    120
    +    # 200
    
    121
    +    "Ecircumflex", "Aacute", "Edieresis", "Egrave", "Iacute",
    
    122
    +    "Icircumflex", "Idieresis", "Igrave", "Oacute", "Ocircumflex",
    
    128 123
     
    
    129
    -  # 210
    
    130
    -  "apple", "Ograve", "Uacute", "Ucircumflex", "Ugrave",
    
    131
    -  "dotlessi", "circumflex", "tilde", "macron", "breve",
    
    124
    +    # 210
    
    125
    +    "apple", "Ograve", "Uacute", "Ucircumflex", "Ugrave",
    
    126
    +    "dotlessi", "circumflex", "tilde", "macron", "breve",
    
    132 127
     
    
    133
    -  # 220
    
    134
    -  "dotaccent", "ring", "cedilla", "hungarumlaut", "ogonek",
    
    135
    -  "caron", "Lslash", "lslash", "Scaron", "scaron",
    
    128
    +    # 220
    
    129
    +    "dotaccent", "ring", "cedilla", "hungarumlaut", "ogonek",
    
    130
    +    "caron", "Lslash", "lslash", "Scaron", "scaron",
    
    136 131
     
    
    137
    -  # 230
    
    138
    -  "Zcaron", "zcaron", "brokenbar", "Eth", "eth",
    
    139
    -  "Yacute", "yacute", "Thorn", "thorn", "minus",
    
    132
    +    # 230
    
    133
    +    "Zcaron", "zcaron", "brokenbar", "Eth", "eth",
    
    134
    +    "Yacute", "yacute", "Thorn", "thorn", "minus",
    
    140 135
     
    
    141
    -  # 240
    
    142
    -  "multiply", "onesuperior", "twosuperior", "threesuperior", "onehalf",
    
    143
    -  "onequarter", "threequarters", "franc", "Gbreve", "gbreve",
    
    136
    +    # 240
    
    137
    +    "multiply", "onesuperior", "twosuperior", "threesuperior", "onehalf",
    
    138
    +    "onequarter", "threequarters", "franc", "Gbreve", "gbreve",
    
    144 139
     
    
    145
    -  # 250
    
    146
    -  "Idotaccent", "Scedilla", "scedilla", "Cacute", "cacute",
    
    147
    -  "Ccaron", "ccaron", "dcroat"
    
    140
    +    # 250
    
    141
    +    "Idotaccent", "Scedilla", "scedilla", "Cacute", "cacute",
    
    142
    +    "Ccaron", "ccaron", "dcroat"
    
    148 143
     ]
    
    149 144
     
    
    150
    -
    
    151 145
     # The list of standard `SID' glyph names.  For the official list,
    
    152 146
     # see Annex A of document at
    
    153 147
     #
    
    154
    -#   https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5176.CFF.pdf  .
    
    148
    +#   https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5176.CFF.pdf
    
    155 149
     #
    
    156
    -sid_standard_names = \
    
    157
    -[
    
    158
    -  # 0
    
    159
    -  ".notdef", "space", "exclam", "quotedbl", "numbersign",
    
    160
    -  "dollar", "percent", "ampersand", "quoteright", "parenleft",
    
    161
    -
    
    162
    -  # 10
    
    163
    -  "parenright", "asterisk", "plus", "comma", "hyphen",
    
    164
    -  "period", "slash", "zero", "one", "two",
    
    165
    -
    
    166
    -  # 20
    
    167
    -  "three", "four", "five", "six", "seven",
    
    168
    -  "eight", "nine", "colon", "semicolon", "less",
    
    169
    -
    
    170
    -  # 30
    
    171
    -  "equal", "greater", "question", "at", "A",
    
    172
    -  "B", "C", "D", "E", "F",
    
    173
    -
    
    174
    -  # 40
    
    175
    -  "G", "H", "I", "J", "K",
    
    176
    -  "L", "M", "N", "O", "P",
    
    177
    -
    
    178
    -  # 50
    
    179
    -  "Q", "R", "S", "T", "U",
    
    180
    -  "V", "W", "X", "Y", "Z",
    
    181
    -
    
    182
    -  # 60
    
    183
    -  "bracketleft", "backslash", "bracketright", "asciicircum", "underscore",
    
    184
    -  "quoteleft", "a", "b", "c", "d",
    
    185
    -
    
    186
    -  # 70
    
    187
    -  "e", "f", "g", "h", "i",
    
    188
    -  "j", "k", "l", "m", "n",
    
    189
    -
    
    190
    -  # 80
    
    191
    -  "o", "p", "q", "r", "s",
    
    192
    -  "t", "u", "v", "w", "x",
    
    193
    -
    
    194
    -  # 90
    
    195
    -  "y", "z", "braceleft", "bar", "braceright",
    
    196
    -  "asciitilde", "exclamdown", "cent", "sterling", "fraction",
    
    197
    -
    
    198
    -  # 100
    
    199
    -  "yen", "florin", "section", "currency", "quotesingle",
    
    200
    -  "quotedblleft", "guillemotleft", "guilsinglleft", "guilsinglright", "fi",
    
    201
    -
    
    202
    -  # 110
    
    203
    -  "fl", "endash", "dagger", "daggerdbl", "periodcentered",
    
    204
    -  "paragraph", "bullet", "quotesinglbase", "quotedblbase", "quotedblright",
    
    205
    -
    
    206
    -  # 120
    
    207
    -  "guillemotright", "ellipsis", "perthousand", "questiondown", "grave",
    
    208
    -  "acute", "circumflex", "tilde", "macron", "breve",
    
    209
    -
    
    210
    -  # 130
    
    211
    -  "dotaccent", "dieresis", "ring", "cedilla", "hungarumlaut",
    
    212
    -  "ogonek", "caron", "emdash", "AE", "ordfeminine",
    
    213
    -
    
    214
    -  # 140
    
    215
    -  "Lslash", "Oslash", "OE", "ordmasculine", "ae",
    
    216
    -  "dotlessi", "lslash", "oslash", "oe", "germandbls",
    
    217
    -
    
    218
    -  # 150
    
    219
    -  "onesuperior", "logicalnot", "mu", "trademark", "Eth",
    
    220
    -  "onehalf", "plusminus", "Thorn", "onequarter", "divide",
    
    221
    -
    
    222
    -  # 160
    
    223
    -  "brokenbar", "degree", "thorn", "threequarters", "twosuperior",
    
    224
    -  "registered", "minus", "eth", "multiply", "threesuperior",
    
    225
    -
    
    226
    -  # 170
    
    227
    -  "copyright", "Aacute", "Acircumflex", "Adieresis", "Agrave",
    
    228
    -  "Aring", "Atilde", "Ccedilla", "Eacute", "Ecircumflex",
    
    229
    -
    
    230
    -  # 180
    
    231
    -  "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis",
    
    232
    -  "Igrave", "Ntilde", "Oacute", "Ocircumflex", "Odieresis",
    
    233
    -
    
    234
    -  # 190
    
    235
    -  "Ograve", "Otilde", "Scaron", "Uacute", "Ucircumflex",
    
    236
    -  "Udieresis", "Ugrave", "Yacute", "Ydieresis", "Zcaron",
    
    237
    -
    
    238
    -  # 200
    
    239
    -  "aacute", "acircumflex", "adieresis", "agrave", "aring",
    
    240
    -  "atilde", "ccedilla", "eacute", "ecircumflex", "edieresis",
    
    241
    -
    
    242
    -  # 210
    
    243
    -  "egrave", "iacute", "icircumflex", "idieresis", "igrave",
    
    244
    -  "ntilde", "oacute", "ocircumflex", "odieresis", "ograve",
    
    245
    -
    
    246
    -  # 220
    
    247
    -  "otilde", "scaron", "uacute", "ucircumflex", "udieresis",
    
    248
    -  "ugrave", "yacute", "ydieresis", "zcaron", "exclamsmall",
    
    249
    -
    
    250
    -  # 230
    
    251
    -  "Hungarumlautsmall", "dollaroldstyle", "dollarsuperior", "ampersandsmall",
    
    150
    +sid_standard_names = [
    
    151
    +    # 0
    
    152
    +    ".notdef", "space", "exclam", "quotedbl", "numbersign",
    
    153
    +    "dollar", "percent", "ampersand", "quoteright", "parenleft",
    
    154
    +
    
    155
    +    # 10
    
    156
    +    "parenright", "asterisk", "plus", "comma", "hyphen",
    
    157
    +    "period", "slash", "zero", "one", "two",
    
    158
    +
    
    159
    +    # 20
    
    160
    +    "three", "four", "five", "six", "seven",
    
    161
    +    "eight", "nine", "colon", "semicolon", "less",
    
    162
    +
    
    163
    +    # 30
    
    164
    +    "equal", "greater", "question", "at", "A",
    
    165
    +    "B", "C", "D", "E", "F",
    
    166
    +
    
    167
    +    # 40
    
    168
    +    "G", "H", "I", "J", "K",
    
    169
    +    "L", "M", "N", "O", "P",
    
    170
    +
    
    171
    +    # 50
    
    172
    +    "Q", "R", "S", "T", "U",
    
    173
    +    "V", "W", "X", "Y", "Z",
    
    174
    +
    
    175
    +    # 60
    
    176
    +    "bracketleft", "backslash", "bracketright", "asciicircum", "underscore",
    
    177
    +    "quoteleft", "a", "b", "c", "d",
    
    178
    +
    
    179
    +    # 70
    
    180
    +    "e", "f", "g", "h", "i",
    
    181
    +    "j", "k", "l", "m", "n",
    
    182
    +
    
    183
    +    # 80
    
    184
    +    "o", "p", "q", "r", "s",
    
    185
    +    "t", "u", "v", "w", "x",
    
    186
    +
    
    187
    +    # 90
    
    188
    +    "y", "z", "braceleft", "bar", "braceright",
    
    189
    +    "asciitilde", "exclamdown", "cent", "sterling", "fraction",
    
    190
    +
    
    191
    +    # 100
    
    192
    +    "yen", "florin", "section", "currency", "quotesingle",
    
    193
    +    "quotedblleft", "guillemotleft", "guilsinglleft", "guilsinglright", "fi",
    
    194
    +
    
    195
    +    # 110
    
    196
    +    "fl", "endash", "dagger", "daggerdbl", "periodcentered",
    
    197
    +    "paragraph", "bullet", "quotesinglbase", "quotedblbase", "quotedblright",
    
    198
    +
    
    199
    +    # 120
    
    200
    +    "guillemotright", "ellipsis", "perthousand", "questiondown", "grave",
    
    201
    +    "acute", "circumflex", "tilde", "macron", "breve",
    
    202
    +
    
    203
    +    # 130
    
    204
    +    "dotaccent", "dieresis", "ring", "cedilla", "hungarumlaut",
    
    205
    +    "ogonek", "caron", "emdash", "AE", "ordfeminine",
    
    206
    +
    
    207
    +    # 140
    
    208
    +    "Lslash", "Oslash", "OE", "ordmasculine", "ae",
    
    209
    +    "dotlessi", "lslash", "oslash", "oe", "germandbls",
    
    210
    +
    
    211
    +    # 150
    
    212
    +    "onesuperior", "logicalnot", "mu", "trademark", "Eth",
    
    213
    +    "onehalf", "plusminus", "Thorn", "onequarter", "divide",
    
    214
    +
    
    215
    +    # 160
    
    216
    +    "brokenbar", "degree", "thorn", "threequarters", "twosuperior",
    
    217
    +    "registered", "minus", "eth", "multiply", "threesuperior",
    
    218
    +
    
    219
    +    # 170
    
    220
    +    "copyright", "Aacute", "Acircumflex", "Adieresis", "Agrave",
    
    221
    +    "Aring", "Atilde", "Ccedilla", "Eacute", "Ecircumflex",
    
    222
    +
    
    223
    +    # 180
    
    224
    +    "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis",
    
    225
    +    "Igrave", "Ntilde", "Oacute", "Ocircumflex", "Odieresis",
    
    226
    +
    
    227
    +    # 190
    
    228
    +    "Ograve", "Otilde", "Scaron", "Uacute", "Ucircumflex",
    
    229
    +    "Udieresis", "Ugrave", "Yacute", "Ydieresis", "Zcaron",
    
    230
    +
    
    231
    +    # 200
    
    232
    +    "aacute", "acircumflex", "adieresis", "agrave", "aring",
    
    233
    +    "atilde", "ccedilla", "eacute", "ecircumflex", "edieresis",
    
    234
    +
    
    235
    +    # 210
    
    236
    +    "egrave", "iacute", "icircumflex", "idieresis", "igrave",
    
    237
    +    "ntilde", "oacute", "ocircumflex", "odieresis", "ograve",
    
    238
    +
    
    239
    +    # 220
    
    240
    +    "otilde", "scaron", "uacute", "ucircumflex", "udieresis",
    
    241
    +    "ugrave", "yacute", "ydieresis", "zcaron", "exclamsmall",
    
    242
    +
    
    243
    +    # 230
    
    244
    +    "Hungarumlautsmall", "dollaroldstyle", "dollarsuperior", "ampersandsmall",
    
    252 245
         "Acutesmall",
    
    253
    -  "parenleftsuperior", "parenrightsuperior", "twodotenleader",
    
    246
    +    "parenleftsuperior", "parenrightsuperior", "twodotenleader",
    
    254 247
         "onedotenleader", "zerooldstyle",
    
    255 248
     
    
    256
    -  # 240
    
    257
    -  "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle",
    
    249
    +    # 240
    
    250
    +    "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle",
    
    258 251
         "fiveoldstyle",
    
    259
    -  "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle",
    
    252
    +    "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle",
    
    260 253
         "commasuperior",
    
    261 254
     
    
    262
    -  # 250
    
    263
    -  "threequartersemdash", "periodsuperior", "questionsmall", "asuperior",
    
    255
    +    # 250
    
    256
    +    "threequartersemdash", "periodsuperior", "questionsmall", "asuperior",
    
    264 257
         "bsuperior",
    
    265
    -  "centsuperior", "dsuperior", "esuperior", "isuperior", "lsuperior",
    
    258
    +    "centsuperior", "dsuperior", "esuperior", "isuperior", "lsuperior",
    
    266 259
     
    
    267
    -  # 260
    
    268
    -  "msuperior", "nsuperior", "osuperior", "rsuperior", "ssuperior",
    
    269
    -  "tsuperior", "ff", "ffi", "ffl", "parenleftinferior",
    
    260
    +    # 260
    
    261
    +    "msuperior", "nsuperior", "osuperior", "rsuperior", "ssuperior",
    
    262
    +    "tsuperior", "ff", "ffi", "ffl", "parenleftinferior",
    
    270 263
     
    
    271
    -  # 270
    
    272
    -  "parenrightinferior", "Circumflexsmall", "hyphensuperior", "Gravesmall",
    
    264
    +    # 270
    
    265
    +    "parenrightinferior", "Circumflexsmall", "hyphensuperior", "Gravesmall",
    
    273 266
         "Asmall",
    
    274
    -  "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall",
    
    267
    +    "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall",
    
    275 268
     
    
    276
    -  # 280
    
    277
    -  "Gsmall", "Hsmall", "Ismall", "Jsmall", "Ksmall",
    
    278
    -  "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall",
    
    269
    +    # 280
    
    270
    +    "Gsmall", "Hsmall", "Ismall", "Jsmall", "Ksmall",
    
    271
    +    "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall",
    
    279 272
     
    
    280
    -  # 290
    
    281
    -  "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall",
    
    282
    -  "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall",
    
    273
    +    # 290
    
    274
    +    "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall",
    
    275
    +    "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall",
    
    283 276
     
    
    284
    -  # 300
    
    285
    -  "colonmonetary", "onefitted", "rupiah", "Tildesmall", "exclamdownsmall",
    
    286
    -  "centoldstyle", "Lslashsmall", "Scaronsmall", "Zcaronsmall",
    
    277
    +    # 300
    
    278
    +    "colonmonetary", "onefitted", "rupiah", "Tildesmall", "exclamdownsmall",
    
    279
    +    "centoldstyle", "Lslashsmall", "Scaronsmall", "Zcaronsmall",
    
    287 280
         "Dieresissmall",
    
    288 281
     
    
    289
    -  # 310
    
    290
    -  "Brevesmall", "Caronsmall", "Dotaccentsmall", "Macronsmall", "figuredash",
    
    291
    -  "hypheninferior", "Ogoneksmall", "Ringsmall", "Cedillasmall",
    
    282
    +    # 310
    
    283
    +    "Brevesmall", "Caronsmall", "Dotaccentsmall", "Macronsmall", "figuredash",
    
    284
    +    "hypheninferior", "Ogoneksmall", "Ringsmall", "Cedillasmall",
    
    292 285
         "questiondownsmall",
    
    293 286
     
    
    294
    -  # 320
    
    295
    -  "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird",
    
    296
    -  "twothirds", "zerosuperior", "foursuperior", "fivesuperior",
    
    287
    +    # 320
    
    288
    +    "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird",
    
    289
    +    "twothirds", "zerosuperior", "foursuperior", "fivesuperior",
    
    297 290
         "sixsuperior",
    
    298 291
     
    
    299
    -  # 330
    
    300
    -  "sevensuperior", "eightsuperior", "ninesuperior", "zeroinferior",
    
    292
    +    # 330
    
    293
    +    "sevensuperior", "eightsuperior", "ninesuperior", "zeroinferior",
    
    301 294
         "oneinferior",
    
    302
    -  "twoinferior", "threeinferior", "fourinferior", "fiveinferior",
    
    295
    +    "twoinferior", "threeinferior", "fourinferior", "fiveinferior",
    
    303 296
         "sixinferior",
    
    304 297
     
    
    305
    -  # 340
    
    306
    -  "seveninferior", "eightinferior", "nineinferior", "centinferior",
    
    298
    +    # 340
    
    299
    +    "seveninferior", "eightinferior", "nineinferior", "centinferior",
    
    307 300
         "dollarinferior",
    
    308
    -  "periodinferior", "commainferior", "Agravesmall", "Aacutesmall",
    
    301
    +    "periodinferior", "commainferior", "Agravesmall", "Aacutesmall",
    
    309 302
         "Acircumflexsmall",
    
    310 303
     
    
    311
    -  # 350
    
    312
    -  "Atildesmall", "Adieresissmall", "Aringsmall", "AEsmall", "Ccedillasmall",
    
    313
    -  "Egravesmall", "Eacutesmall", "Ecircumflexsmall", "Edieresissmall",
    
    304
    +    # 350
    
    305
    +    "Atildesmall", "Adieresissmall", "Aringsmall", "AEsmall", "Ccedillasmall",
    
    306
    +    "Egravesmall", "Eacutesmall", "Ecircumflexsmall", "Edieresissmall",
    
    314 307
         "Igravesmall",
    
    315 308
     
    
    316
    -  # 360
    
    317
    -  "Iacutesmall", "Icircumflexsmall", "Idieresissmall", "Ethsmall",
    
    309
    +    # 360
    
    310
    +    "Iacutesmall", "Icircumflexsmall", "Idieresissmall", "Ethsmall",
    
    318 311
         "Ntildesmall",
    
    319
    -  "Ogravesmall", "Oacutesmall", "Ocircumflexsmall", "Otildesmall",
    
    312
    +    "Ogravesmall", "Oacutesmall", "Ocircumflexsmall", "Otildesmall",
    
    320 313
         "Odieresissmall",
    
    321 314
     
    
    322
    -  # 370
    
    323
    -  "OEsmall", "Oslashsmall", "Ugravesmall", "Uacutesmall",
    
    315
    +    # 370
    
    316
    +    "OEsmall", "Oslashsmall", "Ugravesmall", "Uacutesmall",
    
    324 317
         "Ucircumflexsmall",
    
    325
    -  "Udieresissmall", "Yacutesmall", "Thornsmall", "Ydieresissmall",
    
    318
    +    "Udieresissmall", "Yacutesmall", "Thornsmall", "Ydieresissmall",
    
    326 319
         "001.000",
    
    327