python-fontbro 0.19.0__tar.gz → 0.21.0__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 (56) hide show
  1. {python-fontbro-0.19.0/python_fontbro.egg-info → python-fontbro-0.21.0}/PKG-INFO +9 -5
  2. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/README.md +8 -4
  3. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/fontbro/flags.py +12 -2
  4. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/fontbro/font.py +521 -251
  5. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/fontbro/math.py +6 -1
  6. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/fontbro/metadata.py +1 -1
  7. python-fontbro-0.21.0/fontbro/py.typed +0 -0
  8. python-fontbro-0.21.0/fontbro/subset.py +29 -0
  9. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/fontbro/utils.py +17 -4
  10. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/pyproject.toml +5 -0
  11. {python-fontbro-0.19.0 → python-fontbro-0.21.0/python_fontbro.egg-info}/PKG-INFO +9 -5
  12. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/python_fontbro.egg-info/SOURCES.txt +1 -0
  13. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_vertical_metrics.py +21 -4
  14. python-fontbro-0.19.0/fontbro/subset.py +0 -22
  15. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/LICENSE.txt +0 -0
  16. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/MANIFEST.in +0 -0
  17. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/fontbro/__init__.py +0 -0
  18. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/fontbro/data/features.json +0 -0
  19. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/fontbro/data/unicode-blocks.json +0 -0
  20. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/fontbro/data/unicode-scripts.json +0 -0
  21. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/fontbro/exceptions.py +0 -0
  22. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/python_fontbro.egg-info/dependency_links.txt +0 -0
  23. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/python_fontbro.egg-info/requires.txt +0 -0
  24. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/python_fontbro.egg-info/top_level.txt +0 -0
  25. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/setup.cfg +0 -0
  26. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/setup.py +0 -0
  27. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_characters.py +0 -0
  28. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_clone.py +0 -0
  29. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_close.py +0 -0
  30. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_collection.py +0 -0
  31. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_context_manager.py +0 -0
  32. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_family_name.py +0 -0
  33. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_features.py +0 -0
  34. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_filename.py +0 -0
  35. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_fingerprint.py +0 -0
  36. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_format.py +0 -0
  37. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_glyphs.py +0 -0
  38. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_image.py +0 -0
  39. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_init.py +0 -0
  40. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_instantiation.py +0 -0
  41. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_issues.py +0 -0
  42. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_italic_angle.py +0 -0
  43. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_names.py +0 -0
  44. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_rename.py +0 -0
  45. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_sanitize.py +0 -0
  46. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_save.py +0 -0
  47. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_str.py +0 -0
  48. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_style_flags.py +0 -0
  49. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_style_name.py +0 -0
  50. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_subset.py +0 -0
  51. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_unicode_blocks_and_scripts.py +0 -0
  52. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_update_unicode_data.py +0 -0
  53. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_variable.py +0 -0
  54. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_version.py +0 -0
  55. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_weight.py +0 -0
  56. {python-fontbro-0.19.0 → python-fontbro-0.21.0}/tests/test_width.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-fontbro
3
- Version: 0.19.0
3
+ Version: 0.21.0
4
4
  Summary: friendly font operations on top of fontTools.
5
5
  Author-email: Fabio Caccamo <fabio.caccamo@gmail.com>
6
6
  Maintainer-email: Fabio Caccamo <fabio.caccamo@gmail.com>
@@ -589,7 +589,9 @@ version = font.get_version()
589
589
  Gets the font vertical metrics.
590
590
 
591
591
  :returns: A dictionary containing the following vertical metrics:
592
- "ascent", "cap_height", "x_height", "descent", "descender"
592
+ "units_per_em", "y_max", "y_min", "ascent", "descent", "line_gap",
593
+ "typo_ascender", "typo_descender", "typo_line_gap", "cap_height", "x_height",
594
+ "win_ascent", "win_descent"
593
595
  :rtype: dict
594
596
  """
595
597
  metrics = font.get_vertical_metrics()
@@ -866,10 +868,12 @@ font.set_style_name(name="Bold Italic")
866
868
  """
867
869
  Sets the vertical metrics.
868
870
 
869
- :param metrics: Keyword arguments representing the vertical metrics to set,
870
- valid keys: "ascent", "cap_height", "x_height", "descent", "descender"
871
+ :param metrics: Keyword arguments representing the vertical metrics that can be set:
872
+ "units_per_em", "y_max", "y_min", "ascent", "descent", "line_gap",
873
+ "typo_ascender", "typo_descender", "typo_line_gap", "cap_height", "x_height",
874
+ "win_ascent", "win_descent"
871
875
  """
872
- font.set_vertical_metrics(ascent=1000, cap_height=750, x_height=500, descent=-250, descender=-500)
876
+ font.set_vertical_metrics(units_per_em=2000, y_max=2102, y_min=-533, ascent=1800, descent=-400, line_gap=0, typo_ascender=1800, typo_descender=-400, typo_line_gap=0, cap_height=1400, x_height=1080, win_ascent=2160, win_descent=540)
873
877
  ```
874
878
 
875
879
  #### `subset`
@@ -527,7 +527,9 @@ version = font.get_version()
527
527
  Gets the font vertical metrics.
528
528
 
529
529
  :returns: A dictionary containing the following vertical metrics:
530
- "ascent", "cap_height", "x_height", "descent", "descender"
530
+ "units_per_em", "y_max", "y_min", "ascent", "descent", "line_gap",
531
+ "typo_ascender", "typo_descender", "typo_line_gap", "cap_height", "x_height",
532
+ "win_ascent", "win_descent"
531
533
  :rtype: dict
532
534
  """
533
535
  metrics = font.get_vertical_metrics()
@@ -804,10 +806,12 @@ font.set_style_name(name="Bold Italic")
804
806
  """
805
807
  Sets the vertical metrics.
806
808
 
807
- :param metrics: Keyword arguments representing the vertical metrics to set,
808
- valid keys: "ascent", "cap_height", "x_height", "descent", "descender"
809
+ :param metrics: Keyword arguments representing the vertical metrics that can be set:
810
+ "units_per_em", "y_max", "y_min", "ascent", "descent", "line_gap",
811
+ "typo_ascender", "typo_descender", "typo_line_gap", "cap_height", "x_height",
812
+ "win_ascent", "win_descent"
809
813
  """
810
- font.set_vertical_metrics(ascent=1000, cap_height=750, x_height=500, descent=-250, descender=-500)
814
+ font.set_vertical_metrics(units_per_em=2000, y_max=2102, y_min=-533, ascent=1800, descent=-400, line_gap=0, typo_ascender=1800, typo_descender=-400, typo_line_gap=0, cap_height=1400, x_height=1080, win_ascent=2160, win_descent=540)
811
815
  ```
812
816
 
813
817
  #### `subset`
@@ -1,4 +1,10 @@
1
- def get_flag(bits, bit):
1
+ from __future__ import annotations
2
+
3
+
4
+ def get_flag(
5
+ bits: int,
6
+ bit: int,
7
+ ) -> bool:
2
8
  """
3
9
  Gets the flag value.
4
10
 
@@ -13,7 +19,11 @@ def get_flag(bits, bit):
13
19
  return bool(bits & (1 << bit))
14
20
 
15
21
 
16
- def set_flag(bits, bit, value):
22
+ def set_flag(
23
+ bits: int,
24
+ bit: int,
25
+ value: bool,
26
+ ) -> int:
17
27
  """
18
28
  Sets the flag value.
19
29