manimpango 0.4.1__tar.gz → 0.4.2__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 (49) hide show
  1. {ManimPango-0.4.1 → ManimPango-0.4.2}/ManimPango.egg-info/PKG-INFO +1 -1
  2. {ManimPango-0.4.1 → ManimPango-0.4.2}/PKG-INFO +1 -1
  3. {ManimPango-0.4.1 → ManimPango-0.4.2}/manimpango/_version.py +1 -1
  4. {ManimPango-0.4.1 → ManimPango-0.4.2}/manimpango/cmanimpango.pyx +5 -3
  5. {ManimPango-0.4.1 → ManimPango-0.4.2}/manimpango/enums.pyx +3 -0
  6. {ManimPango-0.4.1 → ManimPango-0.4.2}/manimpango/pango.pxd +3 -1
  7. {ManimPango-0.4.1 → ManimPango-0.4.2}/manimpango/register_font.pyx +3 -0
  8. {ManimPango-0.4.1 → ManimPango-0.4.2}/pyproject.toml +2 -1
  9. {ManimPango-0.4.1 → ManimPango-0.4.2}/requirements-dev.txt +1 -1
  10. {ManimPango-0.4.1 → ManimPango-0.4.2}/setup.py +1 -1
  11. {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/svg_tester.py +16 -0
  12. {ManimPango-0.4.1 → ManimPango-0.4.2}/.coveragerc +0 -0
  13. {ManimPango-0.4.1 → ManimPango-0.4.2}/CODE_OF_CONDUCT.md +0 -0
  14. {ManimPango-0.4.1 → ManimPango-0.4.2}/LICENSE +0 -0
  15. {ManimPango-0.4.1 → ManimPango-0.4.2}/MANIFEST.in +0 -0
  16. {ManimPango-0.4.1 → ManimPango-0.4.2}/ManimPango.egg-info/SOURCES.txt +0 -0
  17. {ManimPango-0.4.1 → ManimPango-0.4.2}/ManimPango.egg-info/dependency_links.txt +0 -0
  18. {ManimPango-0.4.1 → ManimPango-0.4.2}/ManimPango.egg-info/not-zip-safe +0 -0
  19. {ManimPango-0.4.1 → ManimPango-0.4.2}/ManimPango.egg-info/top_level.txt +0 -0
  20. {ManimPango-0.4.1 → ManimPango-0.4.2}/README.md +0 -0
  21. {ManimPango-0.4.1 → ManimPango-0.4.2}/docs/RELEASE.rst +0 -0
  22. {ManimPango-0.4.1 → ManimPango-0.4.2}/docs/_static/favicon.ico +0 -0
  23. {ManimPango-0.4.1 → ManimPango-0.4.2}/docs/_templates/autosummary/class.rst +0 -0
  24. {ManimPango-0.4.1 → ManimPango-0.4.2}/docs/_templates/autosummary/module.rst +0 -0
  25. {ManimPango-0.4.1 → ManimPango-0.4.2}/docs/conf.py +0 -0
  26. {ManimPango-0.4.1 → ManimPango-0.4.2}/docs/index.rst +0 -0
  27. {ManimPango-0.4.1 → ManimPango-0.4.2}/docs/make.bat +0 -0
  28. {ManimPango-0.4.1 → ManimPango-0.4.2}/docs/reference.rst +0 -0
  29. {ManimPango-0.4.1 → ManimPango-0.4.2}/manimpango/__init__.py +0 -0
  30. {ManimPango-0.4.1 → ManimPango-0.4.2}/manimpango/cairo.pxd +0 -0
  31. {ManimPango-0.4.1 → ManimPango-0.4.2}/manimpango/cmanimpango.pxd +1 -1
  32. {ManimPango-0.4.1 → ManimPango-0.4.2}/manimpango/glib.pxd +0 -0
  33. {ManimPango-0.4.1 → ManimPango-0.4.2}/manimpango/register_font.pxd +0 -0
  34. {ManimPango-0.4.1 → ManimPango-0.4.2}/manimpango/utils.py +0 -0
  35. {ManimPango-0.4.1 → ManimPango-0.4.2}/setup.cfg +0 -0
  36. {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/__init__.py +0 -0
  37. {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/_manim.py +0 -0
  38. {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/conftest.py +0 -0
  39. {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/fonts/AdobeVFPrototype.ttf +0 -0
  40. {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/fonts/BungeeColor-Regular_colr_Windows.ttf +0 -0
  41. {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/fonts/BungeeOutline-Regular.ttf +0 -0
  42. {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/fonts/LICENSE.txt +0 -0
  43. {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/fonts/MaShanZheng-Regular.ttf +0 -0
  44. {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/test_colors.py +0 -0
  45. {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/test_fonts.py +0 -0
  46. {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/test_list_fonts.py +0 -0
  47. {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/test_markup.py +0 -0
  48. {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/test_utils.py +0 -0
  49. {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/test_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ManimPango
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: Bindings for Pango for using with Manim.
5
5
  Home-page: https://manimpango.manim.community/
6
6
  Author: Naveen M K
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ManimPango
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: Bindings for Pango for using with Manim.
5
5
  Home-page: https://manimpango.manim.community/
6
6
  Author: Naveen M K
@@ -1,2 +1,2 @@
1
1
  # -*- coding: utf-8 -*-
2
- __version__ = "0.4.1"
2
+ __version__ = "0.4.2"
@@ -1,8 +1,10 @@
1
+ import typing
2
+ import warnings
1
3
  from xml.sax.saxutils import escape
2
- from .utils import *
4
+
3
5
  from .enums import Alignment
4
- import warnings
5
- import typing
6
+ from .utils import *
7
+
6
8
 
7
9
  class TextSetting:
8
10
  """Formatting for slices of a :class:`manim.mobject.svg.text_mobject.Text` object."""
@@ -1,5 +1,8 @@
1
1
  from enum import Enum
2
+
2
3
  from pango cimport *
4
+
5
+
3
6
  class Style(Enum):
4
7
  """
5
8
  An enumeration specifying the various slant styles possible for a font.
@@ -1,5 +1,7 @@
1
- from glib cimport *
2
1
  from cairo cimport *
2
+ from glib cimport *
3
+
4
+
3
5
  cdef extern from "pango/pangocairo.h":
4
6
  int PANGO_SCALE
5
7
  int pango_units_from_double(double d)
@@ -1,7 +1,10 @@
1
1
  from pathlib import Path
2
+
2
3
  from pango cimport *
4
+
3
5
  import os
4
6
 
7
+
5
8
  cpdef bint fc_register_font(str font_path):
6
9
  """This function registers the font file using ``fontconfig`` so that
7
10
  it is available for use by Pango. On Linux it is aliased to
@@ -1,5 +1,6 @@
1
1
  [build-system]
2
- requires = ["setuptools", "wheel", "Cython>=0.27"]
2
+ build-backend = "setuptools.build_meta"
3
+ requires = ["Cython>=0.29.25,<3.0", "setuptools>=59.2.0", "wheel"]
3
4
 
4
5
  [tool.isort]
5
6
  # from https://black.readthedocs.io/en/stable/compatible_configs.html
@@ -1,4 +1,4 @@
1
1
  pytest-cov==2.12.0
2
2
  pytest==6.2.4
3
- Cython==0.29.24
3
+ Cython==0.29.32
4
4
  coverage==5.5
@@ -43,7 +43,7 @@ MANIMPANGO_VERSION = get_version()
43
43
  MINIMUM_PANGO_VERSION = "1.30.0"
44
44
  DEBUG = False
45
45
 
46
- if sys.platform == "win32" and sys.version_info >= (3, 10):
46
+ if sys.platform == "win32" and sys.version_info >= (3, 12):
47
47
  import atexit
48
48
 
49
49
  atexit.register(
@@ -16,6 +16,8 @@ class SVGUtils:
16
16
  pass
17
17
 
18
18
  def parse_color_string(self, color_spec: str) -> str:
19
+ if color_spec == "none":
20
+ return "none"
19
21
  # copied from Manim's SVG parser.
20
22
  if color_spec[0:3] == "rgb":
21
23
  # these are only in integer form,
@@ -114,6 +116,20 @@ class SVGStyleTester(SVGUtils):
114
116
  if name == "g":
115
117
  if "style" in attrs:
116
118
  styles.append(self.parse_style(attrs["style"]))
119
+ if (
120
+ "fill" in attrs
121
+ or "fill-opacity" in attrs
122
+ or "stroke" in attrs
123
+ or "stroke-opacity" in attrs
124
+ ):
125
+ styles.append(
126
+ self.parse_style(
127
+ f"fill:{attrs.get('fill', self.SVG_DEFAULT_ATTRIBUTES['fill'])};" # noqa: E501
128
+ f"fill-opacity:{attrs.get('fill-opacity', self.SVG_DEFAULT_ATTRIBUTES['fill-opacity'])};" # noqa: E501
129
+ f"stroke:{attrs.get('stroke', self.SVG_DEFAULT_ATTRIBUTES['stroke'])};" # noqa: E501
130
+ f"stroke-opacity:{attrs.get('stroke-opacity', self.SVG_DEFAULT_ATTRIBUTES['stroke-opacity'])};" # noqa: E501
131
+ )
132
+ )
117
133
  if styles:
118
134
  # need to think of better way than this.
119
135
  exec(f"self.{final_setter} += [styles]")
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,3 +1,3 @@
1
- from glib cimport *
2
1
  from cairo cimport *
2
+ from glib cimport *
3
3
  from pango cimport *
File without changes
File without changes
File without changes
File without changes