From 3a6b17d9a234d102e6b82e619a81b83d6b790e05 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Fri, 24 Feb 2023 21:45:35 +0200 Subject: [PATCH] [fontBuilder] Add debug to addOpenTypeFeatures Passed to addOpenTypeFeaturesFromString(). --- Lib/fontTools/fontBuilder.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Lib/fontTools/fontBuilder.py b/Lib/fontTools/fontBuilder.py index 3e9d41b83..ec1e26459 100644 --- a/Lib/fontTools/fontBuilder.py +++ b/Lib/fontTools/fontBuilder.py @@ -800,7 +800,7 @@ class FontBuilder(object): ) self._initTableWithValues("DSIG", {}, values) - def addOpenTypeFeatures(self, features, filename=None, tables=None): + def addOpenTypeFeatures(self, features, filename=None, tables=None, debug=False): """Add OpenType features to the font from a string containing Feature File syntax. @@ -810,11 +810,14 @@ class FontBuilder(object): The optional `tables` argument can be a list of OTL tables tags to build, allowing the caller to only build selected OTL tables. See `fontTools.feaLib` for details. + + The optional `debug` argument controls whether to add source debugging + information to the font in the `Debg` table. """ from .feaLib.builder import addOpenTypeFeaturesFromString addOpenTypeFeaturesFromString( - self.font, features, filename=filename, tables=tables + self.font, features, filename=filename, tables=tables, debug=debug ) def addFeatureVariations(self, conditionalSubstitutions, featureTag="rvrn"):