ManimPango 0.4.3__cp311-cp311-win_amd64.whl → 1.0.0a2__cp311-cp311-win_amd64.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.
Files changed (83) hide show
  1. {ManimPango-0.4.3.dist-info → ManimPango-1.0.0a2.dist-info}/METADATA +2 -2
  2. ManimPango-1.0.0a2.dist-info/RECORD +85 -0
  3. {ManimPango-0.4.3.dist-info → ManimPango-1.0.0a2.dist-info}/WHEEL +1 -1
  4. manimpango/__init__.py +5 -7
  5. manimpango/_distributor_init.py +36 -0
  6. manimpango/_version.py +1 -1
  7. manimpango/attributes/__init__.py +324 -0
  8. manimpango/attributes/attributes.pxi +219 -0
  9. manimpango/buffer.pxi +15 -0
  10. manimpango/cmanimpango.c +10025 -0
  11. manimpango/cmanimpango.cp311-win_amd64.pyd +0 -0
  12. manimpango/enums.c +3721 -0
  13. manimpango/enums.cp311-win_amd64.pyd +0 -0
  14. manimpango/enums.pyx +1 -10
  15. manimpango/exceptions.py +5 -0
  16. manimpango/fonts/__init__.py +153 -0
  17. manimpango/fonts/_font_desc.c +7576 -0
  18. manimpango/fonts/_font_desc.cp311-win_amd64.pyd +0 -0
  19. manimpango/fonts/_font_desc.pxd +5 -0
  20. manimpango/fonts/_font_desc.pyi +25 -0
  21. manimpango/fonts/_font_desc.pyx +114 -0
  22. manimpango/fonts/enums.c +3628 -0
  23. manimpango/fonts/enums.cp311-win_amd64.pyd +0 -0
  24. manimpango/fonts/enums.pyi +23 -0
  25. manimpango/fonts/enums.pyx +84 -0
  26. manimpango/{cairo.pxd → include/cairo.pxd} +21 -0
  27. manimpango/include/glib.pxd +36 -0
  28. manimpango/{pango.pxd → include/pango.pxd} +61 -0
  29. manimpango/include/pango_attributes.pxd +184 -0
  30. manimpango/layout/__init__.py +266 -0
  31. manimpango/layout/_layout.c +8630 -0
  32. manimpango/layout/_layout.cp311-win_amd64.pyd +0 -0
  33. manimpango/layout/_layout.pyx +60 -0
  34. manimpango/layout/layout.pxi +52 -0
  35. manimpango/register_font.c +5016 -0
  36. manimpango/register_font.cp311-win_amd64.pyd +0 -0
  37. manimpango/renderer/__init__.py +5 -0
  38. manimpango/renderer/cairo_utils.pxi +72 -0
  39. manimpango/renderer/image_renderer.c +12319 -0
  40. manimpango/renderer/image_renderer.cp311-win_amd64.pyd +0 -0
  41. manimpango/renderer/image_renderer.pxd +23 -0
  42. manimpango/renderer/image_renderer.pyi +21 -0
  43. manimpango/renderer/image_renderer.pyx +219 -0
  44. manimpango/renderer/svg_renderer.c +10671 -0
  45. manimpango/renderer/svg_renderer.cp311-win_amd64.pyd +0 -0
  46. manimpango/renderer/svg_renderer.pxd +23 -0
  47. manimpango/renderer/svg_renderer.pyi +17 -0
  48. manimpango/renderer/svg_renderer.pyx +174 -0
  49. manimpango/utils/__init__.py +3 -0
  50. manimpango/utils/_utils.cp311-win_amd64.pyd +0 -0
  51. manimpango/utils/_utils.pyi +2 -0
  52. manimpango/utils/utils.c +3533 -0
  53. manimpango/{utils.py → utils/utils.py} +3 -1
  54. manimpango/utils/utils.pyx +27 -0
  55. ManimPango-0.4.3.dist-info/RECORD +0 -44
  56. manimpango/glib.pxd +0 -13
  57. {ManimPango-0.4.3.dist-info → ManimPango-1.0.0a2.dist-info}/LICENSE +0 -0
  58. {ManimPango-0.4.3.dist-info → ManimPango-1.0.0a2.dist-info}/LICENSE.win32 +0 -0
  59. {ManimPango-0.4.3.dist-info → ManimPango-1.0.0a2.dist-info}/top_level.txt +0 -0
  60. /manimpango/{CORE_MANIM_cairo-2.dll → .libs/CORE_MANIM_cairo-2.dll} +0 -0
  61. /manimpango/{CORE_MANIM_cairo-gobject-2.dll → .libs/CORE_MANIM_cairo-gobject-2.dll} +0 -0
  62. /manimpango/{CORE_MANIM_cairo-script-interpreter-2.dll → .libs/CORE_MANIM_cairo-script-interpreter-2.dll} +0 -0
  63. /manimpango/{CORE_MANIM_expat.dll → .libs/CORE_MANIM_expat.dll} +0 -0
  64. /manimpango/{CORE_MANIM_ffi-7.dll → .libs/CORE_MANIM_ffi-7.dll} +0 -0
  65. /manimpango/{CORE_MANIM_fontconfig-1.dll → .libs/CORE_MANIM_fontconfig-1.dll} +0 -0
  66. /manimpango/{CORE_MANIM_freetype-6.dll → .libs/CORE_MANIM_freetype-6.dll} +0 -0
  67. /manimpango/{CORE_MANIM_fribidi-0.dll → .libs/CORE_MANIM_fribidi-0.dll} +0 -0
  68. /manimpango/{CORE_MANIM_gio-2.0-0.dll → .libs/CORE_MANIM_gio-2.0-0.dll} +0 -0
  69. /manimpango/{CORE_MANIM_glib-2.0-0.dll → .libs/CORE_MANIM_glib-2.0-0.dll} +0 -0
  70. /manimpango/{CORE_MANIM_gmodule-2.0-0.dll → .libs/CORE_MANIM_gmodule-2.0-0.dll} +0 -0
  71. /manimpango/{CORE_MANIM_gobject-2.0-0.dll → .libs/CORE_MANIM_gobject-2.0-0.dll} +0 -0
  72. /manimpango/{CORE_MANIM_gthread-2.0-0.dll → .libs/CORE_MANIM_gthread-2.0-0.dll} +0 -0
  73. /manimpango/{CORE_MANIM_harfbuzz-gobject.dll → .libs/CORE_MANIM_harfbuzz-gobject.dll} +0 -0
  74. /manimpango/{CORE_MANIM_harfbuzz-subset.dll → .libs/CORE_MANIM_harfbuzz-subset.dll} +0 -0
  75. /manimpango/{CORE_MANIM_harfbuzz.dll → .libs/CORE_MANIM_harfbuzz.dll} +0 -0
  76. /manimpango/{CORE_MANIM_intl-8.dll → .libs/CORE_MANIM_intl-8.dll} +0 -0
  77. /manimpango/{CORE_MANIM_pango-1.0-0.dll → .libs/CORE_MANIM_pango-1.0-0.dll} +0 -0
  78. /manimpango/{CORE_MANIM_pangocairo-1.0-0.dll → .libs/CORE_MANIM_pangocairo-1.0-0.dll} +0 -0
  79. /manimpango/{CORE_MANIM_pangoft2-1.0-0.dll → .libs/CORE_MANIM_pangoft2-1.0-0.dll} +0 -0
  80. /manimpango/{CORE_MANIM_pangowin32-1.0-0.dll → .libs/CORE_MANIM_pangowin32-1.0-0.dll} +0 -0
  81. /manimpango/{CORE_MANIM_pixman-1-0.dll → .libs/CORE_MANIM_pixman-1-0.dll} +0 -0
  82. /manimpango/{CORE_MANIM_png16-16.dll → .libs/CORE_MANIM_png16-16.dll} +0 -0
  83. /manimpango/{CORE_MANIM_z.dll → .libs/CORE_MANIM_z.dll} +0 -0
@@ -1,7 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  import re
3
3
 
4
- from .enums import Style, Weight
4
+ from ..enums import Style, Weight
5
+
6
+ __all__ = ["PangoUtils"]
5
7
 
6
8
 
7
9
  class PangoUtils:
@@ -0,0 +1,27 @@
1
+ from pango cimport *
2
+
3
+
4
+ cpdef str validate_markup(str text):
5
+ cdef GError *err = NULL
6
+ text_bytes = text.encode("utf-8")
7
+ res = pango_parse_markup(
8
+ text_bytes,
9
+ -1,
10
+ 0,
11
+ NULL,
12
+ NULL,
13
+ NULL,
14
+ &err
15
+ )
16
+ if res:
17
+ return ""
18
+ else:
19
+ message = <bytes>err.message
20
+ g_error_free(err)
21
+ return message.decode('utf-8')
22
+
23
+ def covert_hex_to_rbg(color_hex: str):
24
+ cdef PangoColor color
25
+ if not pango_color_parse(&color, color_hex.encode('utf-8')):
26
+ raise ValueError('Invalid color specfied.')
27
+ return color.red, color.green, color.blue
@@ -1,44 +0,0 @@
1
- manimpango/CORE_MANIM_cairo-2.dll,sha256=lttR5-2wVg3Y66a3wa-xOVB8gMPD3Vi1jMT0v7yEXhE,906240
2
- manimpango/CORE_MANIM_cairo-gobject-2.dll,sha256=TtDtutnPozNTT2uzhL40jnSzTXTwQTT1jMywiVdVlzY,27136
3
- manimpango/CORE_MANIM_cairo-script-interpreter-2.dll,sha256=KnfNrOIt9l7jhs1QdxwKR8I-ugBVmg7Cq18Z9cobnB8,132608
4
- manimpango/CORE_MANIM_expat.dll,sha256=caYNgwGfvmPdRf70408MgSfspUKHqZlJXA0qLup6gKk,139776
5
- manimpango/CORE_MANIM_ffi-7.dll,sha256=-AR4rzhVy4_omlrrDC_c_mxaAsj286a2_2qRpz4NF88,27136
6
- manimpango/CORE_MANIM_fontconfig-1.dll,sha256=cyYH5II1gEyAA8UXjokHvvjB6XsoHxUGRPgccciZSIU,280576
7
- manimpango/CORE_MANIM_freetype-6.dll,sha256=8wRw5DsluMR6qHuCjL-2UCBWnXjI6c72DgaAgrnwK6U,634368
8
- manimpango/CORE_MANIM_fribidi-0.dll,sha256=wh0pMSYG85i0so1zYcKBxrvCE5Mb5wVxdbnyBEk5qbI,117760
9
- manimpango/CORE_MANIM_gio-2.0-0.dll,sha256=VdsvhRL1qBOX8BGxcJ6X4uPbwyw-LIy1fh16hmVCaz8,1587712
10
- manimpango/CORE_MANIM_glib-2.0-0.dll,sha256=vH1rnJXFTarQVoHEpBk7B1HBYwZhJ0did3Ce-Y-Qbl0,1501696
11
- manimpango/CORE_MANIM_gmodule-2.0-0.dll,sha256=rFkuuKqoHHjDNUOvIxXTgnpMdLqX1x3I_cQ2QtcqFmE,18432
12
- manimpango/CORE_MANIM_gobject-2.0-0.dll,sha256=yORytG1ldqLOxHDH1O-pfNIyj21giXgdmfbbXgSuQeo,301056
13
- manimpango/CORE_MANIM_gthread-2.0-0.dll,sha256=uX7L-UUZ7NFBORorYsx806n7Lo4JvXeuiW2Xp2z8fxE,10752
14
- manimpango/CORE_MANIM_harfbuzz-gobject.dll,sha256=G_-KeQ40hg1TePxKe0QF8FPO8AWe4H3chVjD_aSKJmk,81920
15
- manimpango/CORE_MANIM_harfbuzz-subset.dll,sha256=ugpKOB9wTg8r3eDshdqRw4ZJe3UuIU6LI4uLnpsGARQ,711680
16
- manimpango/CORE_MANIM_harfbuzz.dll,sha256=se0KeSQ_Au9jq1lxuOoAQNFM_SMmiUKTMMtSnQVKxxk,904192
17
- manimpango/CORE_MANIM_intl-8.dll,sha256=WHJBXbqfjBKCjhbUv6kbqMfUbJkGhjRM8MRklfjpQ_0,10240
18
- manimpango/CORE_MANIM_pango-1.0-0.dll,sha256=vULIkx2V0loztNrRCgFzyD5AkgB0SV65-kaUq9onKy8,357376
19
- manimpango/CORE_MANIM_pangocairo-1.0-0.dll,sha256=mLuUzIIUeVPh6PSVIYVaG2RlODeXF_V7rddhZHGiaX4,53760
20
- manimpango/CORE_MANIM_pangoft2-1.0-0.dll,sha256=VNnK5EvPFYIh92iKCzy07SjxkhhQv2SV2PZ4-Epag1c,76800
21
- manimpango/CORE_MANIM_pangowin32-1.0-0.dll,sha256=dZBf-P9twhp7otB-TauGS36MnnDAj-w4Rl-SUfQQmxo,54272
22
- manimpango/CORE_MANIM_pixman-1-0.dll,sha256=UBZ080EGrc4NYRzRRwwKbzmfGxykSGfKnmjYtJ2jm9k,586752
23
- manimpango/CORE_MANIM_png16-16.dll,sha256=3doABQ79VhdEmLh71UQbhhfdjWJmQN9YTz_BSkXlihc,195072
24
- manimpango/CORE_MANIM_z.dll,sha256=gFJNdWYIKc5V8MCHCYIK-Z95st0LEQuvDFH_z1F8edE,86528
25
- manimpango/__init__.py,sha256=IE33i_mPXcWdXCVag3EAg1nVK-SUwziDxniM28SIiYw,1119
26
- manimpango/_version.py,sha256=fbmXTDu8GLKm7UrkdS2Hryp22TcbdPk3-R-C4hK1TGE,48
27
- manimpango/cairo.pxd,sha256=DOoOjPIVRBQ9Yueayu3MS9UvLdGy3b4dSReAKU9aF6Q,798
28
- manimpango/cmanimpango.cp311-win_amd64.pyd,sha256=0VduP830bPk5NJ84KJ9LY9RPtjWQ9ouZEphyc7YYQhs,72192
29
- manimpango/cmanimpango.pxd,sha256=Apb6qZMqtkL9ldE_nMxVtdsnTH2tkmYt94lrhsB0Qwc,65
30
- manimpango/cmanimpango.pyx,sha256=f3wr3BpOmIsr1yi7jQsaKv9ntyKyzRWJmbNo8JPLqig,10744
31
- manimpango/enums.cp311-win_amd64.pyd,sha256=24HVRFx3qxSgs1tj6V6t7UNzV-rNTOAOw5IMC2X4IL8,26112
32
- manimpango/enums.pyx,sha256=YV3i30Xc4yLADGLgHCBHKhXiFpclDXEa08SGjGEt-mg,2574
33
- manimpango/glib.pxd,sha256=fuA-RFWL8zRH1EmIphOlC2z7qr7OpWUTuU89wXiDODQ,387
34
- manimpango/pango.pxd,sha256=qEA6-paCXMZSJGl711C1bI_bVzMvFhXxnHeFEKLvgVs,4468
35
- manimpango/register_font.cp311-win_amd64.pyd,sha256=0nMzRkkj8TeNz4NRY5rIm-WKE6qaPIaJjkmseq_g7mQ,34304
36
- manimpango/register_font.pxd,sha256=8iZpMnQenfTdUUxhNdesi21GeGjHX07pvIWiQom6Jio,1653
37
- manimpango/register_font.pyx,sha256=H_fe5SLNue6H3vpB01aindxxNQEbtG7jiDhXCk0PZTo,7548
38
- manimpango/utils.py,sha256=posYwcA5m9aj1p24copKIB_MxQY5JQLhsQM8BGxwhq4,1670
39
- ManimPango-0.4.3.dist-info/LICENSE,sha256=ZB7Op1KnTg-rYuSNFk6dIaWt5fwrfsSWTuJW8Ql55ok,1088
40
- ManimPango-0.4.3.dist-info/LICENSE.win32,sha256=XJh88_PtJqmEAfFqLLztbIcxPCJaccrFbz1w6ux-9Zg,163586
41
- ManimPango-0.4.3.dist-info/METADATA,sha256=1qXb6VsK4hss5C3CkNKa67nosU2a-GLfkJd-DcM3DGs,8598
42
- ManimPango-0.4.3.dist-info/WHEEL,sha256=wklNeoByNLhdCl-oEQTdaHIeDl4q9zaQVqAlPxUEgLU,102
43
- ManimPango-0.4.3.dist-info/top_level.txt,sha256=_7RXNU2cbck8IbstWHzYv6YV58wtKUDBX-pmUjE6SKs,11
44
- ManimPango-0.4.3.dist-info/RECORD,,
manimpango/glib.pxd DELETED
@@ -1,13 +0,0 @@
1
- cdef extern from "glib.h":
2
- ctypedef void* gpointer
3
- ctypedef int gint
4
- ctypedef unsigned int guint
5
- ctypedef gint gboolean
6
- ctypedef unsigned short guint16
7
- ctypedef char gchar
8
- ctypedef struct GError:
9
- gint code
10
- gchar *message
11
- void g_error_free (GError *error)
12
- void g_object_unref(gpointer object)
13
- void g_free(gpointer mem)
File without changes