Turn on feaLib debugging from the environment
export FONTTOOLS_LOOKUP_DEBUGGING=1 to make a Debg table
This commit is contained in:
parent
3e964ad8da
commit
f827a2a7f1
@ -2,7 +2,11 @@ from fontTools.misc.py23 import *
|
||||
from fontTools.misc import sstruct
|
||||
from fontTools.misc.textTools import binary2num, safeEval
|
||||
from fontTools.feaLib.error import FeatureLibError
|
||||
from fontTools.feaLib.lookupDebugInfo import LookupDebugInfo, LOOKUP_DEBUG_INFO_KEY
|
||||
from fontTools.feaLib.lookupDebugInfo import (
|
||||
LookupDebugInfo,
|
||||
LOOKUP_DEBUG_INFO_KEY,
|
||||
LOOKUP_DEBUG_ENV_VAR,
|
||||
)
|
||||
from fontTools.feaLib.parser import Parser
|
||||
from fontTools.feaLib.ast import FeatureFile
|
||||
from fontTools.otlLib import builder as otl
|
||||
@ -31,6 +35,7 @@ from collections import defaultdict
|
||||
import itertools
|
||||
import logging
|
||||
import warnings
|
||||
import os
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@ -210,7 +215,7 @@ class Builder(object):
|
||||
self.font["BASE"] = base
|
||||
elif "BASE" in self.font:
|
||||
del self.font["BASE"]
|
||||
if debug:
|
||||
if debug or os.environ.get(LOOKUP_DEBUG_ENV_VAR):
|
||||
self.buildDebg()
|
||||
|
||||
def get_chained_lookup_(self, location, builder_class):
|
||||
|
@ -1,6 +1,7 @@
|
||||
from typing import NamedTuple
|
||||
|
||||
LOOKUP_DEBUG_INFO_KEY = "com.github.fonttools.feaLib"
|
||||
LOOKUP_DEBUG_ENV_VAR = "FONTTOOLS_LOOKUP_DEBUGGING"
|
||||
|
||||
class LookupDebugInfo(NamedTuple):
|
||||
"""Information about where a lookup came from, to be embedded in a font"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user