foundrytools-cli 1.1.10__tar.gz → 1.1.11__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.
Files changed (68) hide show
  1. {foundrytools-cli-1.1.10/foundrytools_cli.egg-info → foundrytools-cli-1.1.11}/PKG-INFO +1 -1
  2. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/CLI/ftcli_utils.py +23 -2
  3. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/converters/ttf_to_otf.py +10 -5
  4. foundrytools-cli-1.1.11/foundryToolsCLI/__init__.py +3 -0
  5. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11/foundrytools_cli.egg-info}/PKG-INFO +1 -1
  6. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/setup.py +1 -1
  7. foundrytools-cli-1.1.10/foundryToolsCLI/__init__.py +0 -3
  8. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/LICENSE +0 -0
  9. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/MANIFEST.in +0 -0
  10. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/README.md +0 -0
  11. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/CLI/__init__.py +0 -0
  12. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/CLI/ftcli_assistant.py +0 -0
  13. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/CLI/ftcli_cff.py +0 -0
  14. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/CLI/ftcli_converter.py +0 -0
  15. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/CLI/ftcli_fix.py +0 -0
  16. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/CLI/ftcli_hhea.py +0 -0
  17. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/CLI/ftcli_metrics.py +0 -0
  18. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/CLI/ftcli_name.py +0 -0
  19. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/CLI/ftcli_os2.py +0 -0
  20. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/CLI/ftcli_otf.py +0 -0
  21. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/CLI/ftcli_post.py +0 -0
  22. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/CLI/ftcli_print.py +0 -0
  23. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/CLI/ftcli_ttf.py +0 -0
  24. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/Font.py +0 -0
  25. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/VFont.py +0 -0
  26. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/__init__.py +0 -0
  27. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/assistant/UI.py +0 -0
  28. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/assistant/__init__.py +0 -0
  29. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/assistant/fonts_data.py +0 -0
  30. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/assistant/styles_mapping.py +0 -0
  31. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/constants.py +0 -0
  32. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/converters/__init__.py +0 -0
  33. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/converters/options.py +0 -0
  34. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/converters/otf_to_ttf.py +0 -0
  35. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/converters/sfnt_to_web.py +0 -0
  36. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/converters/ttc_to_sfnt.py +0 -0
  37. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/converters/variable_to_static.py +0 -0
  38. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/converters/web_to_sfnt.py +0 -0
  39. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/printer/UI.py +0 -0
  40. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/printer/__init__.py +0 -0
  41. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/tables/CFF_.py +0 -0
  42. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/tables/OS_2.py +0 -0
  43. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/tables/__init__.py +0 -0
  44. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/tables/head.py +0 -0
  45. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/tables/hhea.py +0 -0
  46. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/tables/name.py +0 -0
  47. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/tables/post.py +0 -0
  48. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/utils/__init__.py +0 -0
  49. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/utils/bits_tools.py +0 -0
  50. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/utils/cli_tools.py +0 -0
  51. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/utils/click_tools.py +0 -0
  52. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/utils/logger.py +0 -0
  53. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/utils/otf_tools.py +0 -0
  54. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/utils/ps_recalc_stems.py +0 -0
  55. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/utils/ps_recalc_zones.py +0 -0
  56. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/utils/skia_tools.py +0 -0
  57. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/utils/text_tools.py +0 -0
  58. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/utils/timer.py +0 -0
  59. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/Lib/utils/ttf_tools.py +0 -0
  60. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundryToolsCLI/__main__.py +0 -0
  61. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundrytools_cli.egg-info/SOURCES.txt +0 -0
  62. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundrytools_cli.egg-info/dependency_links.txt +0 -0
  63. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundrytools_cli.egg-info/entry_points.txt +0 -0
  64. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundrytools_cli.egg-info/not-zip-safe +0 -0
  65. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundrytools_cli.egg-info/requires.txt +0 -0
  66. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/foundrytools_cli.egg-info/top_level.txt +0 -0
  67. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/requirements.txt +0 -0
  68. {foundrytools-cli-1.1.10 → foundrytools-cli-1.1.11}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: foundrytools-cli
3
- Version: 1.1.10
3
+ Version: 1.1.11
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
@@ -331,6 +331,18 @@ def rebuild(
331
331
  @click.option(
332
332
  "-vs", "--version-string", is_flag=True, help="Recalculates nameID 5 (version string)"
333
333
  )
334
+ @click.option(
335
+ "-p",
336
+ "--platform-id",
337
+ type=click.Choice(choices=["1", "3"]),
338
+ callback=choice_to_int_callback,
339
+ help="""
340
+ platformID of the NameRecord to add (1: Macintosh, 3: Windows).
341
+
342
+ When recalculating Unique identifier and/or Version string, update only the NameRecords matching
343
+ the specified platformID.
344
+ """,
345
+ )
334
346
  @add_recursive_option()
335
347
  @add_common_options()
336
348
  @Timer(logger=logger.info)
@@ -340,6 +352,7 @@ def set_revision(
340
352
  minor: t.Optional[int] = None,
341
353
  unique_identifier: bool = False,
342
354
  version_string: bool = False,
355
+ platform_id: int = None,
343
356
  recursive: bool = False,
344
357
  output_dir: t.Optional[Path] = None,
345
358
  recalc_timestamp: bool = False,
@@ -403,11 +416,19 @@ def set_revision(
403
416
  vend_id = os2.get_vend_id()
404
417
  ps_name = name_table.getDebugName(6)
405
418
  name_table.add_name(
406
- font, string=f"{new_font_revision};{vend_id};{ps_name}", name_id=3
419
+ font,
420
+ string=f"{new_font_revision};{vend_id};{ps_name}",
421
+ name_id=3,
422
+ platform_id=platform_id,
407
423
  )
408
424
 
409
425
  if version_string:
410
- name_table.add_name(font, string=f"Version {new_font_revision}", name_id=5)
426
+ name_table.add_name(
427
+ font,
428
+ string=f"Version {new_font_revision}",
429
+ name_id=5,
430
+ platform_id=platform_id,
431
+ )
411
432
 
412
433
  if name_table_copy.compile(font) != name_table.compile(font):
413
434
  has_changed = True
@@ -91,14 +91,19 @@ class TTF2OTFRunner(object):
91
91
  if self.options.subroutinize:
92
92
  cff_font.otf_subroutinize()
93
93
 
94
- other_blues, blue_values = cff_font.otf_recalc_zones()
95
- cff_font.set_zones(other_blues=other_blues, blue_values=blue_values)
96
- std_h_w, std_v_w = cff_font.otf_recalc_stems()
97
- cff_font.set_stems(std_h_w=std_h_w, std_v_w=std_v_w)
94
+ try:
95
+ other_blues, blue_values = cff_font.otf_recalc_zones()
96
+ cff_font.set_zones(other_blues=other_blues, blue_values=blue_values)
97
+ except Exception as e:
98
+ logger.warning(f"Failed to recalculate zones: {e}")
99
+ try:
100
+ std_h_w, std_v_w = cff_font.otf_recalc_stems()
101
+ cff_font.set_stems(std_h_w=std_h_w, std_v_w=std_v_w)
102
+ except Exception as e:
103
+ logger.warning(f"Failed to recalculate stems: {e}")
98
104
 
99
105
  cff_font.save(output_file)
100
106
  cff_font.close()
101
-
102
107
  logger.success(Logs.file_saved, file=output_file)
103
108
 
104
109
  except Exception as e:
@@ -0,0 +1,3 @@
1
+ VERSION = __version__ = "1.1.11"
2
+
3
+ __all__ = ["VERSION"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: foundrytools-cli
3
- Version: 1.1.10
3
+ Version: 1.1.11
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
@@ -18,7 +18,7 @@ def _get_requirements():
18
18
 
19
19
  setuptools.setup(
20
20
  name="foundrytools-cli",
21
- version="1.1.10",
21
+ version="1.1.11",
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",
@@ -1,3 +0,0 @@
1
- VERSION = __version__ = "1.1.10"
2
-
3
- __all__ = ["VERSION"]