foundrytools-cli 1.1.17__tar.gz → 1.1.19__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {foundrytools_cli-1.1.17/foundrytools_cli.egg-info → foundrytools_cli-1.1.19}/PKG-INFO +7 -7
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/Font.py +22 -3
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/VFont.py +1 -4
- foundrytools_cli-1.1.19/foundryToolsCLI/__init__.py +3 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19/foundrytools_cli.egg-info}/PKG-INFO +7 -7
- foundrytools_cli-1.1.19/foundrytools_cli.egg-info/requires.txt +12 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/requirements.txt +6 -6
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/setup.py +1 -1
- foundrytools_cli-1.1.17/foundryToolsCLI/__init__.py +0 -3
- foundrytools_cli-1.1.17/foundrytools_cli.egg-info/requires.txt +0 -12
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/LICENSE +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/MANIFEST.in +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/README.md +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/CLI/__init__.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/CLI/ftcli_assistant.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/CLI/ftcli_cff.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/CLI/ftcli_converter.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/CLI/ftcli_fix.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/CLI/ftcli_hhea.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/CLI/ftcli_metrics.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/CLI/ftcli_name.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/CLI/ftcli_os2.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/CLI/ftcli_otf.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/CLI/ftcli_post.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/CLI/ftcli_print.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/CLI/ftcli_ttf.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/CLI/ftcli_utils.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/__init__.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/assistant/UI.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/assistant/__init__.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/assistant/fonts_data.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/assistant/styles_mapping.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/constants.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/converters/__init__.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/converters/options.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/converters/otf_to_ttf.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/converters/sfnt_to_web.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/converters/ttc_to_sfnt.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/converters/ttf_to_otf.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/converters/variable_to_static.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/converters/web_to_sfnt.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/printer/UI.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/printer/__init__.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/tables/CFF_.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/tables/OS_2.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/tables/__init__.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/tables/head.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/tables/hhea.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/tables/name.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/tables/post.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/utils/__init__.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/utils/bits_tools.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/utils/cli_tools.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/utils/click_tools.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/utils/logger.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/utils/otf_tools.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/utils/ps_recalc_stems.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/utils/ps_recalc_zones.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/utils/skia_tools.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/utils/text_tools.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/utils/timer.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/utils/ttf_tools.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/__main__.py +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundrytools_cli.egg-info/SOURCES.txt +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundrytools_cli.egg-info/dependency_links.txt +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundrytools_cli.egg-info/entry_points.txt +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundrytools_cli.egg-info/not-zip-safe +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundrytools_cli.egg-info/top_level.txt +0 -0
- {foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: foundrytools-cli
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.19
|
|
4
4
|
Summary: A set of command line tools to inspect, manipulate and convert font files
|
|
5
5
|
Home-page: https://github.com/ftCLI/FoundryTools-CLI
|
|
6
6
|
Author: ftCLI
|
|
@@ -10,18 +10,18 @@ Classifier: Operating System :: OS Independent
|
|
|
10
10
|
Requires-Python: >=3.9
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENSE
|
|
13
|
-
Requires-Dist: afdko>=4.0.
|
|
14
|
-
Requires-Dist: fonttools>=4.
|
|
13
|
+
Requires-Dist: afdko>=4.0.2
|
|
14
|
+
Requires-Dist: fonttools>=4.55.1
|
|
15
15
|
Requires-Dist: brotli>=1.1.0
|
|
16
16
|
Requires-Dist: click>=8.1.7
|
|
17
17
|
Requires-Dist: cffsubr>=0.3.0
|
|
18
18
|
Requires-Dist: dehinter>=4.0.0
|
|
19
19
|
Requires-Dist: loguru>=0.7.2
|
|
20
|
-
Requires-Dist: pathvalidate>=3.2.
|
|
21
|
-
Requires-Dist: rich>=13.
|
|
22
|
-
Requires-Dist: skia-pathops>=0.8.0.
|
|
20
|
+
Requires-Dist: pathvalidate>=3.2.1
|
|
21
|
+
Requires-Dist: rich>=13.9.4
|
|
22
|
+
Requires-Dist: skia-pathops>=0.8.0.post2
|
|
23
23
|
Requires-Dist: ttfautohint-py>=0.5.1
|
|
24
|
-
Requires-Dist: zopfli>=0.2.3
|
|
24
|
+
Requires-Dist: zopfli>=0.2.3.post1
|
|
25
25
|
|
|
26
26
|
# FoundryTools-CLI
|
|
27
27
|
FoundryTools-CLI, former known as ftCLI, is a collection of command line tools written in Python to inspect, manipulate
|
|
@@ -9,6 +9,7 @@ from cffsubr import subroutinize, desubroutinize
|
|
|
9
9
|
from fontTools.misc.psCharStrings import T2CharString
|
|
10
10
|
from fontTools.misc.timeTools import timestampToString
|
|
11
11
|
from fontTools.pens.statisticsPen import StatisticsPen
|
|
12
|
+
from fontTools.ttLib.tables._f_v_a_r import Axis
|
|
12
13
|
from fontTools.ttLib.ttFont import TTFont
|
|
13
14
|
|
|
14
15
|
from foundryToolsCLI.Lib.tables.OS_2 import TableOS2
|
|
@@ -623,6 +624,13 @@ class Font(TTFont):
|
|
|
623
624
|
name.
|
|
624
625
|
:return: A string representing the file name of the font.
|
|
625
626
|
"""
|
|
627
|
+
if self.is_variable:
|
|
628
|
+
family_name = self.guess_family_name().replace(" ", "").strip()
|
|
629
|
+
if self.is_italic:
|
|
630
|
+
family_name += "-Italic"
|
|
631
|
+
axes = self.get_axes()
|
|
632
|
+
file_name = f"{family_name}[{','.join([axis.axisTag for axis in axes])}]"
|
|
633
|
+
return file_name
|
|
626
634
|
|
|
627
635
|
if self.is_ttf:
|
|
628
636
|
if source in (4, 5):
|
|
@@ -644,6 +652,14 @@ class Font(TTFont):
|
|
|
644
652
|
else:
|
|
645
653
|
return Path(self.reader.file.name).stem
|
|
646
654
|
|
|
655
|
+
def get_axes(self) -> list[Axis]:
|
|
656
|
+
"""
|
|
657
|
+
This function returns a list of axes in a variable font.
|
|
658
|
+
"""
|
|
659
|
+
if not self.is_variable:
|
|
660
|
+
return []
|
|
661
|
+
return [axis for axis in self["fvar"].axes]
|
|
662
|
+
|
|
647
663
|
def fix_cff_top_dict_version(self) -> None:
|
|
648
664
|
if not self.is_otf:
|
|
649
665
|
return
|
|
@@ -720,7 +736,8 @@ class Font(TTFont):
|
|
|
720
736
|
ui_name_ids = []
|
|
721
737
|
for record in self["GSUB"].table.FeatureList.FeatureRecord:
|
|
722
738
|
if record.Feature.FeatureParams:
|
|
723
|
-
|
|
739
|
+
if hasattr(record.Feature.FeatureParams, "UINameID"):
|
|
740
|
+
ui_name_ids.append(record.Feature.FeatureParams.UINameID)
|
|
724
741
|
return sorted(set(ui_name_ids))
|
|
725
742
|
|
|
726
743
|
def reorder_ui_name_ids(self) -> None:
|
|
@@ -733,14 +750,16 @@ class Font(TTFont):
|
|
|
733
750
|
if "GSUB" not in self:
|
|
734
751
|
return
|
|
735
752
|
ui_name_ids = self.get_ui_name_ids()
|
|
753
|
+
if not ui_name_ids:
|
|
754
|
+
return
|
|
736
755
|
for count, value in enumerate(ui_name_ids, start=256):
|
|
737
756
|
for n in name_table.names:
|
|
738
757
|
if n.nameID == value:
|
|
739
758
|
n.nameID = count
|
|
740
759
|
for record in self["GSUB"].table.FeatureList.FeatureRecord:
|
|
741
760
|
if record.Feature.FeatureParams:
|
|
742
|
-
if record.Feature.FeatureParams
|
|
743
|
-
record.Feature.FeatureParams
|
|
761
|
+
if hasattr(record.Feature.FeatureParams, "UINameID"):
|
|
762
|
+
setattr(record.Feature.FeatureParams, "UINameID", count)
|
|
744
763
|
|
|
745
764
|
def modify_linegap_percent(self, percent):
|
|
746
765
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
2
|
|
|
3
|
-
from fontTools.ttLib.tables._f_v_a_r import NamedInstance
|
|
3
|
+
from fontTools.ttLib.tables._f_v_a_r import NamedInstance
|
|
4
4
|
|
|
5
5
|
from foundryToolsCLI.Lib.Font import Font
|
|
6
6
|
|
|
@@ -10,9 +10,6 @@ class VariableFont(Font):
|
|
|
10
10
|
super().__init__(file=file, recalcTimestamp=recalcTimestamp)
|
|
11
11
|
assert "fvar" in self
|
|
12
12
|
|
|
13
|
-
def get_axes(self) -> list[Axis]:
|
|
14
|
-
return [axis for axis in self["fvar"].axes if axis.flags == 0]
|
|
15
|
-
|
|
16
13
|
def get_instances(self) -> list[NamedInstance]:
|
|
17
14
|
return [instance for instance in self["fvar"].instances]
|
|
18
15
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: foundrytools-cli
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.19
|
|
4
4
|
Summary: A set of command line tools to inspect, manipulate and convert font files
|
|
5
5
|
Home-page: https://github.com/ftCLI/FoundryTools-CLI
|
|
6
6
|
Author: ftCLI
|
|
@@ -10,18 +10,18 @@ Classifier: Operating System :: OS Independent
|
|
|
10
10
|
Requires-Python: >=3.9
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
License-File: LICENSE
|
|
13
|
-
Requires-Dist: afdko>=4.0.
|
|
14
|
-
Requires-Dist: fonttools>=4.
|
|
13
|
+
Requires-Dist: afdko>=4.0.2
|
|
14
|
+
Requires-Dist: fonttools>=4.55.1
|
|
15
15
|
Requires-Dist: brotli>=1.1.0
|
|
16
16
|
Requires-Dist: click>=8.1.7
|
|
17
17
|
Requires-Dist: cffsubr>=0.3.0
|
|
18
18
|
Requires-Dist: dehinter>=4.0.0
|
|
19
19
|
Requires-Dist: loguru>=0.7.2
|
|
20
|
-
Requires-Dist: pathvalidate>=3.2.
|
|
21
|
-
Requires-Dist: rich>=13.
|
|
22
|
-
Requires-Dist: skia-pathops>=0.8.0.
|
|
20
|
+
Requires-Dist: pathvalidate>=3.2.1
|
|
21
|
+
Requires-Dist: rich>=13.9.4
|
|
22
|
+
Requires-Dist: skia-pathops>=0.8.0.post2
|
|
23
23
|
Requires-Dist: ttfautohint-py>=0.5.1
|
|
24
|
-
Requires-Dist: zopfli>=0.2.3
|
|
24
|
+
Requires-Dist: zopfli>=0.2.3.post1
|
|
25
25
|
|
|
26
26
|
# FoundryTools-CLI
|
|
27
27
|
FoundryTools-CLI, former known as ftCLI, is a collection of command line tools written in Python to inspect, manipulate
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Hard pinning here gets relaxed to ">=" in setup.py
|
|
2
|
-
afdko==4.0.
|
|
3
|
-
fonttools==4.
|
|
2
|
+
afdko==4.0.2
|
|
3
|
+
fonttools==4.55.1
|
|
4
4
|
brotli==1.1.0
|
|
5
5
|
click==8.1.7
|
|
6
6
|
cffsubr==0.3.0
|
|
7
7
|
dehinter==4.0.0
|
|
8
8
|
loguru==0.7.2
|
|
9
|
-
pathvalidate==3.2.
|
|
10
|
-
rich==13.
|
|
11
|
-
skia-pathops==0.8.0.
|
|
9
|
+
pathvalidate==3.2.1
|
|
10
|
+
rich==13.9.4
|
|
11
|
+
skia-pathops==0.8.0.post2
|
|
12
12
|
ttfautohint-py==0.5.1
|
|
13
|
-
zopfli==0.2.3
|
|
13
|
+
zopfli==0.2.3.post1
|
|
@@ -18,7 +18,7 @@ def _get_requirements():
|
|
|
18
18
|
|
|
19
19
|
setuptools.setup(
|
|
20
20
|
name="foundrytools-cli",
|
|
21
|
-
version="1.1.
|
|
21
|
+
version="1.1.19",
|
|
22
22
|
description="A set of command line tools to inspect, manipulate and convert font files",
|
|
23
23
|
long_description=long_description,
|
|
24
24
|
long_description_content_type="text/markdown",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/assistant/__init__.py
RENAMED
|
File without changes
|
{foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/assistant/fonts_data.py
RENAMED
|
File without changes
|
{foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/assistant/styles_mapping.py
RENAMED
|
File without changes
|
|
File without changes
|
{foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/converters/__init__.py
RENAMED
|
File without changes
|
{foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/converters/options.py
RENAMED
|
File without changes
|
{foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/converters/otf_to_ttf.py
RENAMED
|
File without changes
|
{foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/converters/sfnt_to_web.py
RENAMED
|
File without changes
|
{foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/converters/ttc_to_sfnt.py
RENAMED
|
File without changes
|
{foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/converters/ttf_to_otf.py
RENAMED
|
File without changes
|
|
File without changes
|
{foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/converters/web_to_sfnt.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/utils/click_tools.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/utils/ps_recalc_stems.py
RENAMED
|
File without changes
|
{foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundryToolsCLI/Lib/utils/ps_recalc_zones.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundrytools_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{foundrytools_cli-1.1.17 → foundrytools_cli-1.1.19}/foundrytools_cli.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|