svg-ultralight 0.45.1__py3-none-any.whl → 0.45.3__py3-none-any.whl

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.

Potentially problematic release.


This version of svg-ultralight might be problematic. Click here for more details.

@@ -384,7 +384,7 @@ class FTFontInfo:
384
384
  svgd = path_pen.svgd
385
385
  if not dx or not svgd:
386
386
  return svgd
387
- cpts = path_pen.cpts
387
+ cpts = get_cpts_from_svgd(svgd)
388
388
  for i, curve in enumerate(cpts):
389
389
  cpts[i][:] = [(x + dx, y) for x, y in curve]
390
390
  svgd = format_svgd_shortest(get_svgd_from_cpts(cpts))
@@ -6,6 +6,7 @@
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
+ import numbers
9
10
  import re
10
11
  from contextlib import suppress
11
12
  from typing import TYPE_CHECKING, cast
@@ -116,16 +117,16 @@ def new_transformation_matrix(
116
117
  """
117
118
  transformation = transformation or (1, 0, 0, 1, 0, 0)
118
119
 
119
- if isinstance(scale, float):
120
+ if isinstance(scale, (float, int, numbers.Real)):
120
121
  scale_x, scale_y = (scale, scale)
121
122
  elif scale is None:
122
123
  scale_x, scale_y = (1, 1)
123
124
  else:
124
- scale_x, scale_y = cast("tuple[float, float]", scale)
125
+ scale_x, scale_y = scale
125
126
 
126
127
  dx = dx or 0
127
128
  dy = dy or 0
128
- return mat_dot((scale_x, 0, 0, scale_y, dx, dy), transformation)
129
+ return mat_dot((float(scale_x), 0, 0, float(scale_y), dx, dy), transformation)
129
130
 
130
131
 
131
132
  def transform_element(elem: EtreeElement, matrix: _Matrix) -> EtreeElement:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: svg-ultralight
3
- Version: 0.45.1
3
+ Version: 0.45.3
4
4
  Summary: a sensible way to create svg files with Python
5
5
  Author-email: Shay Hill <shay_public@hotmail.com>
6
6
  License: MIT
@@ -11,7 +11,7 @@ svg_ultralight/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  svg_ultralight/query.py,sha256=iFFsK78TuUT6h3iv_V8_fwCggIAdYa97K7oOPhhoPuY,9711
12
12
  svg_ultralight/root_elements.py,sha256=H_J7GMO8yqoie169uDUB1LxWSpc7BgUH6H657ZPRahg,3292
13
13
  svg_ultralight/string_conversion.py,sha256=NWguHAmuKWON7Fh2EkVDfMIwp-jk6k7SW8hAUh72H0o,8850
14
- svg_ultralight/transformations.py,sha256=T3vSxcTWOwWnwu3OF610LHMbKScUIVWICUAvru5zLnU,4488
14
+ svg_ultralight/transformations.py,sha256=q-9GC01fh8vXyddjpDlal9BfebMuMWGl46ubg-0FalU,4510
15
15
  svg_ultralight/unit_conversion.py,sha256=g07nhzXdjPvGcJmkhLdFbeDLrSmbI8uFoVgPo7G62Bg,9258
16
16
  svg_ultralight/bounding_boxes/__init__.py,sha256=qUEn3r4s-1QNHaguhWhhaNfdP4tl_B6YEqxtiTFuzhQ,78
17
17
  svg_ultralight/bounding_boxes/bound_helpers.py,sha256=iCinp_kFsxi29gJEMnDZpKs13Fj1fj8SWqbbWO94UTI,7203
@@ -25,11 +25,11 @@ svg_ultralight/constructors/__init__.py,sha256=XLOInLhzMERWNnFAs-itMs-OZrBOpvQth
25
25
  svg_ultralight/constructors/new_element.py,sha256=kGRaVsT1yugADUCKz3NjFW_14Ts1M8UQeLPTarTXtBY,3529
26
26
  svg_ultralight/font_tools/__init__.py,sha256=NX3C0vvoB-G4S-h1f0NLWePjYAMMR37D1cl_G4WBjHc,83
27
27
  svg_ultralight/font_tools/comp_results.py,sha256=gFxdqY1D5z8MGt1UyWOK8O_t50AHgg-B846uWdzoLco,10687
28
- svg_ultralight/font_tools/font_info.py,sha256=rIoEmEWhNYw04Jos_ETXQ11SkDhi6YlLd3VjZMLETXs,29875
28
+ svg_ultralight/font_tools/font_info.py,sha256=-MEEM8Jslirevocv97RNRaArxaP3xeNiB7ZllKmXRjU,29886
29
29
  svg_ultralight/font_tools/globs.py,sha256=JdrrGMqDtD4WcY7YGUWV43DUW63RVev-x9vWqsQUhxU,119
30
30
  svg_ultralight/strings/__init__.py,sha256=BMGhF1pulscIgkiYvZLr6kPRR0L4lW0jUNFxkul4_EM,295
31
31
  svg_ultralight/strings/svg_strings.py,sha256=FQNxNmMkR2M-gCFo_woQKXLgCHi3ncUlRMiaRR_a9nQ,1978
32
- svg_ultralight-0.45.1.dist-info/METADATA,sha256=_5egao_AkYDDIGZ7iN4anNt2FzM9KeVuK_ZSUvI_UVs,9052
33
- svg_ultralight-0.45.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
34
- svg_ultralight-0.45.1.dist-info/top_level.txt,sha256=se-6yqM_0Yg5orJKvKWdjQZ4iR4G_EjhL7oRgju-fdY,15
35
- svg_ultralight-0.45.1.dist-info/RECORD,,
32
+ svg_ultralight-0.45.3.dist-info/METADATA,sha256=GT8dx7FHssg5EoGcNXRwHOezY4SJILTn6NQgv-MhWX0,9052
33
+ svg_ultralight-0.45.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
34
+ svg_ultralight-0.45.3.dist-info/top_level.txt,sha256=se-6yqM_0Yg5orJKvKWdjQZ4iR4G_EjhL7oRgju-fdY,15
35
+ svg_ultralight-0.45.3.dist-info/RECORD,,