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.
- {ManimPango-0.4.1 → ManimPango-0.4.2}/ManimPango.egg-info/PKG-INFO +1 -1
- {ManimPango-0.4.1 → ManimPango-0.4.2}/PKG-INFO +1 -1
- {ManimPango-0.4.1 → ManimPango-0.4.2}/manimpango/_version.py +1 -1
- {ManimPango-0.4.1 → ManimPango-0.4.2}/manimpango/cmanimpango.pyx +5 -3
- {ManimPango-0.4.1 → ManimPango-0.4.2}/manimpango/enums.pyx +3 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/manimpango/pango.pxd +3 -1
- {ManimPango-0.4.1 → ManimPango-0.4.2}/manimpango/register_font.pyx +3 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/pyproject.toml +2 -1
- {ManimPango-0.4.1 → ManimPango-0.4.2}/requirements-dev.txt +1 -1
- {ManimPango-0.4.1 → ManimPango-0.4.2}/setup.py +1 -1
- {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/svg_tester.py +16 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/.coveragerc +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/CODE_OF_CONDUCT.md +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/LICENSE +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/MANIFEST.in +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/ManimPango.egg-info/SOURCES.txt +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/ManimPango.egg-info/dependency_links.txt +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/ManimPango.egg-info/not-zip-safe +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/ManimPango.egg-info/top_level.txt +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/README.md +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/docs/RELEASE.rst +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/docs/_static/favicon.ico +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/docs/_templates/autosummary/class.rst +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/docs/_templates/autosummary/module.rst +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/docs/conf.py +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/docs/index.rst +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/docs/make.bat +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/docs/reference.rst +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/manimpango/__init__.py +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/manimpango/cairo.pxd +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/manimpango/cmanimpango.pxd +1 -1
- {ManimPango-0.4.1 → ManimPango-0.4.2}/manimpango/glib.pxd +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/manimpango/register_font.pxd +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/manimpango/utils.py +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/setup.cfg +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/__init__.py +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/_manim.py +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/conftest.py +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/fonts/AdobeVFPrototype.ttf +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/fonts/BungeeColor-Regular_colr_Windows.ttf +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/fonts/BungeeOutline-Regular.ttf +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/fonts/LICENSE.txt +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/fonts/MaShanZheng-Regular.ttf +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/test_colors.py +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/test_fonts.py +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/test_list_fonts.py +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/test_markup.py +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/test_utils.py +0 -0
- {ManimPango-0.4.1 → ManimPango-0.4.2}/tests/test_version.py +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
|
-
__version__ = "0.4.
|
|
2
|
+
__version__ = "0.4.2"
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import typing
|
|
2
|
+
import warnings
|
|
1
3
|
from xml.sax.saxutils import escape
|
|
2
|
-
|
|
4
|
+
|
|
3
5
|
from .enums import Alignment
|
|
4
|
-
import
|
|
5
|
-
|
|
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."""
|
|
@@ -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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|