[optimize.gpos] declare/re-export option from module
This commit is contained in:
parent
4160f05242
commit
ec79257960
@ -1,7 +1,5 @@
|
|||||||
from argparse import RawTextHelpFormatter
|
from argparse import RawTextHelpFormatter
|
||||||
from fontTools.config import OPTIONS
|
from fontTools.otlLib.optimize.gpos import COMPRESSION_LEVEL, compact
|
||||||
|
|
||||||
from fontTools.otlLib.optimize.gpos import compact
|
|
||||||
from fontTools.ttLib import TTFont
|
from fontTools.ttLib import TTFont
|
||||||
|
|
||||||
|
|
||||||
@ -20,7 +18,6 @@ def main(args=None):
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-o", metavar="OUTPUTFILE", dest="outfile", default=None, help="output file"
|
"-o", metavar="OUTPUTFILE", dest="outfile", default=None, help="output file"
|
||||||
)
|
)
|
||||||
COMPRESSION_LEVEL = OPTIONS["fontTools.otlLib.optimize.gpos:COMPRESSION_LEVEL"]
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--gpos-compression-level",
|
"--gpos-compression-level",
|
||||||
help=COMPRESSION_LEVEL.help,
|
help=COMPRESSION_LEVEL.help,
|
||||||
|
@ -5,11 +5,14 @@ from itertools import chain
|
|||||||
from math import log2
|
from math import log2
|
||||||
from typing import DefaultDict, Dict, Iterable, List, Sequence, Tuple
|
from typing import DefaultDict, Dict, Iterable, List, Sequence, Tuple
|
||||||
|
|
||||||
|
from fontTools.config import OPTIONS
|
||||||
from fontTools.misc.intTools import bit_count, bit_indices
|
from fontTools.misc.intTools import bit_count, bit_indices
|
||||||
from fontTools.ttLib import TTFont
|
from fontTools.ttLib import TTFont
|
||||||
from fontTools.ttLib.tables import otBase, otTables
|
from fontTools.ttLib.tables import otBase, otTables
|
||||||
|
|
||||||
log = logging.getLogger("fontTools.otlLib.optimize.gpos")
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
COMPRESSION_LEVEL = OPTIONS[f"{__name__}:COMPRESSION_LEVEL"]
|
||||||
|
|
||||||
|
|
||||||
def compact(font: TTFont, level: int) -> TTFont:
|
def compact(font: TTFont, level: int) -> TTFont:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user