foundrytools-cli 1.1.5__tar.gz → 1.1.6__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.5/foundrytools_cli.egg-info → foundrytools-cli-1.1.6}/PKG-INFO +4 -4
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/CLI/ftcli_cff.py +1 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/utils/ps_recalc_zones.py +33 -4
- foundrytools-cli-1.1.6/foundryToolsCLI/__init__.py +3 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6/foundrytools_cli.egg-info}/PKG-INFO +4 -4
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundrytools_cli.egg-info/requires.txt +3 -3
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/requirements.txt +3 -3
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/setup.py +1 -1
- foundrytools-cli-1.1.5/foundryToolsCLI/__init__.py +0 -3
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/LICENSE +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/MANIFEST.in +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/README.md +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/CLI/__init__.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/CLI/ftcli_assistant.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/CLI/ftcli_converter.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/CLI/ftcli_fix.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/CLI/ftcli_hhea.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/CLI/ftcli_metrics.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/CLI/ftcli_name.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/CLI/ftcli_os2.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/CLI/ftcli_otf.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/CLI/ftcli_post.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/CLI/ftcli_print.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/CLI/ftcli_ttf.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/CLI/ftcli_utils.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/Font.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/VFont.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/__init__.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/assistant/UI.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/assistant/__init__.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/assistant/fonts_data.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/assistant/styles_mapping.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/constants.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/converters/__init__.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/converters/options.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/converters/otf_to_ttf.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/converters/sfnt_to_web.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/converters/ttc_to_sfnt.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/converters/ttf_to_otf.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/converters/variable_to_static.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/converters/web_to_sfnt.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/printer/UI.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/printer/__init__.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/tables/CFF_.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/tables/OS_2.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/tables/__init__.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/tables/head.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/tables/hhea.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/tables/name.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/tables/post.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/utils/__init__.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/utils/bits_tools.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/utils/cli_tools.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/utils/click_tools.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/utils/logger.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/utils/otf_tools.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/utils/ps_recalc_stems.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/utils/skia_tools.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/utils/text_tools.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/utils/timer.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/utils/ttf_tools.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/__main__.py +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundrytools_cli.egg-info/SOURCES.txt +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundrytools_cli.egg-info/dependency_links.txt +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundrytools_cli.egg-info/entry_points.txt +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundrytools_cli.egg-info/not-zip-safe +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundrytools_cli.egg-info/top_level.txt +0 -0
- {foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/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.6
|
|
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,11 +10,11 @@ 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.1
|
|
14
|
+
Requires-Dist: fonttools>=4.47.2
|
|
15
15
|
Requires-Dist: brotli>=1.1.0
|
|
16
16
|
Requires-Dist: click>=8.1.7
|
|
17
|
-
Requires-Dist: cffsubr>=0.
|
|
17
|
+
Requires-Dist: cffsubr>=0.3.0
|
|
18
18
|
Requires-Dist: dehinter>=4.0.0
|
|
19
19
|
Requires-Dist: loguru>=0.7.2
|
|
20
20
|
Requires-Dist: pathvalidate>=3.2.0
|
|
@@ -33,6 +33,7 @@ tbl_cff = click.Group("subcommands")
|
|
|
33
33
|
"--copyright", "Copyright", is_flag=True, help="Deletes CFF.cff.topDictIndex[0] Copyright"
|
|
34
34
|
)
|
|
35
35
|
@click.option("--notice", "Notice", is_flag=True, help="Deletes CFF.cff.topDictIndex[0] Copyright")
|
|
36
|
+
@click.option("--unique-id", "UniqueID", is_flag=True, help="Deletes CFF.cff.topDictIndex[0] UniqueID")
|
|
36
37
|
@add_recursive_option()
|
|
37
38
|
@add_common_options()
|
|
38
39
|
@Timer(logger=logger.info)
|
{foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/utils/ps_recalc_zones.py
RENAMED
|
@@ -4,9 +4,9 @@ from collections import Counter
|
|
|
4
4
|
from fontTools.pens.boundsPen import BoundsPen
|
|
5
5
|
from fontTools.ttLib.ttFont import TTFont
|
|
6
6
|
|
|
7
|
-
UPPERCASE_LETTERS = [chr(i) for i in range(65, 91)]
|
|
7
|
+
UPPERCASE_LETTERS = [chr(i) for i in range(65, 91)] # A-Z
|
|
8
8
|
UPPERCASE_DESCENDERS = ["J", "Q"]
|
|
9
|
-
LOWERCASE_LETTERS = [chr(i) for i in range(97, 123)]
|
|
9
|
+
LOWERCASE_LETTERS = [chr(i) for i in range(97, 123)] # a-z
|
|
10
10
|
LOWERCASE_DESCENDERS = ["f", "g", "j", "p", "q", "y"]
|
|
11
11
|
LOWERCASE_ASCENDERS = ["b", "d", "f", "h", "k", "l", "t"]
|
|
12
12
|
|
|
@@ -21,7 +21,7 @@ UPPERCASE_GLYPHS = UPPERCASE_LETTERS
|
|
|
21
21
|
ASCENDER_GLYPHS = list(set(LOWERCASE_ASCENDERS) - {"t"})
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
__all__ = ["recalc_zones"]
|
|
24
|
+
__all__ = ["recalc_zones", "GlyphBounds"]
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
class GlyphBounds(t.TypedDict):
|
|
@@ -137,6 +137,29 @@ def fix_lists_overlaps(lists: t.List[t.List[float]]) -> t.List[t.List[float]]:
|
|
|
137
137
|
return lists
|
|
138
138
|
|
|
139
139
|
|
|
140
|
+
def fix_min_separation_limits(lists: t.List[t.List[float]], limit: int) -> t.List[t.List[float]]:
|
|
141
|
+
"""
|
|
142
|
+
Fixes the minimum separation between zones.
|
|
143
|
+
|
|
144
|
+
Args:
|
|
145
|
+
lists (List[List[float]]): A list of lists of floats.
|
|
146
|
+
limit (int): The minimum separation between zones.
|
|
147
|
+
|
|
148
|
+
Returns:
|
|
149
|
+
List[List[float]]: The input list with the minimum separation between zones fixed.
|
|
150
|
+
"""
|
|
151
|
+
for i in range(len(lists) - 1):
|
|
152
|
+
if lists[i + 1][0] - lists[i][1] < limit:
|
|
153
|
+
# If the difference between the two values is less than 3, then
|
|
154
|
+
# set the second value to the first value
|
|
155
|
+
if lists[i + 1][1] - lists[i][1] > limit:
|
|
156
|
+
lists[i + 1][0] = lists[i + 1][1]
|
|
157
|
+
else:
|
|
158
|
+
# Remove the second list
|
|
159
|
+
lists.pop(i + 1)
|
|
160
|
+
return lists
|
|
161
|
+
|
|
162
|
+
|
|
140
163
|
def calculate_zone(
|
|
141
164
|
font: TTFont, glyph_names: t.List[str], min_or_max: t.Literal["yMin", "yMax"]
|
|
142
165
|
) -> t.List[float]:
|
|
@@ -211,7 +234,13 @@ def recalc_zones(
|
|
|
211
234
|
if lists_overlaps(zones):
|
|
212
235
|
zones = fix_lists_overlaps(zones)
|
|
213
236
|
|
|
237
|
+
min_separation = font["CFF "].cff.topDictIndex[0].Private.BlueFuzz * 2 + 1
|
|
238
|
+
zones = fix_min_separation_limits(zones, limit=min_separation)
|
|
239
|
+
|
|
214
240
|
other_blues = [int(v) for v in zones[0]]
|
|
215
|
-
|
|
241
|
+
|
|
242
|
+
blue_values = []
|
|
243
|
+
for zone in zones[1:]:
|
|
244
|
+
blue_values.extend([int(v) for v in zone])
|
|
216
245
|
|
|
217
246
|
return other_blues, blue_values
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: foundrytools-cli
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.6
|
|
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,11 +10,11 @@ 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.1
|
|
14
|
+
Requires-Dist: fonttools>=4.47.2
|
|
15
15
|
Requires-Dist: brotli>=1.1.0
|
|
16
16
|
Requires-Dist: click>=8.1.7
|
|
17
|
-
Requires-Dist: cffsubr>=0.
|
|
17
|
+
Requires-Dist: cffsubr>=0.3.0
|
|
18
18
|
Requires-Dist: dehinter>=4.0.0
|
|
19
19
|
Requires-Dist: loguru>=0.7.2
|
|
20
20
|
Requires-Dist: pathvalidate>=3.2.0
|
|
@@ -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.6",
|
|
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
|
|
File without changes
|
|
File without changes
|
{foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/assistant/fonts_data.py
RENAMED
|
File without changes
|
{foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/assistant/styles_mapping.py
RENAMED
|
File without changes
|
|
File without changes
|
{foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/converters/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/converters/otf_to_ttf.py
RENAMED
|
File without changes
|
{foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/converters/sfnt_to_web.py
RENAMED
|
File without changes
|
{foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/converters/ttc_to_sfnt.py
RENAMED
|
File without changes
|
{foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/converters/ttf_to_otf.py
RENAMED
|
File without changes
|
|
File without changes
|
{foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundryToolsCLI/Lib/utils/ps_recalc_stems.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.5 → foundrytools-cli-1.1.6}/foundrytools_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{foundrytools-cli-1.1.5 → foundrytools-cli-1.1.6}/foundrytools_cli.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|