ManimPango 1.0.0a1__cp311-cp311-win32.whl → 1.0.0a2__cp311-cp311-win32.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.
- {ManimPango-1.0.0a1.dist-info → ManimPango-1.0.0a2.dist-info}/METADATA +1 -1
- {ManimPango-1.0.0a1.dist-info → ManimPango-1.0.0a2.dist-info}/RECORD +30 -26
- manimpango/_version.py +1 -1
- manimpango/attributes/attributes.pxi +219 -0
- manimpango/buffer.pxi +15 -0
- manimpango/cmanimpango.c +12 -12
- manimpango/cmanimpango.cp311-win32.pyd +0 -0
- manimpango/enums.c +12 -12
- manimpango/enums.cp311-win32.pyd +0 -0
- manimpango/fonts/_font_desc.c +135 -72
- manimpango/fonts/_font_desc.cp311-win32.pyd +0 -0
- manimpango/fonts/_font_desc.pyx +3 -0
- manimpango/fonts/enums.c +12 -12
- manimpango/fonts/enums.cp311-win32.pyd +0 -0
- manimpango/layout/_layout.c +12 -12
- manimpango/layout/_layout.cp311-win32.pyd +0 -0
- manimpango/layout/layout.pxi +52 -0
- manimpango/register_font.c +12 -12
- manimpango/register_font.cp311-win32.pyd +0 -0
- manimpango/renderer/cairo_utils.pxi +72 -0
- manimpango/renderer/image_renderer.c +12 -12
- manimpango/renderer/image_renderer.cp311-win32.pyd +0 -0
- manimpango/renderer/svg_renderer.c +12 -12
- manimpango/renderer/svg_renderer.cp311-win32.pyd +0 -0
- manimpango/utils/_utils.cp311-win32.pyd +0 -0
- manimpango/utils/utils.c +12 -12
- {ManimPango-1.0.0a1.dist-info → ManimPango-1.0.0a2.dist-info}/LICENSE +0 -0
- {ManimPango-1.0.0a1.dist-info → ManimPango-1.0.0a2.dist-info}/LICENSE.win32 +0 -0
- {ManimPango-1.0.0a1.dist-info → ManimPango-1.0.0a2.dist-info}/WHEEL +0 -0
- {ManimPango-1.0.0a1.dist-info → ManimPango-1.0.0a2.dist-info}/top_level.txt +0 -0
@@ -1,16 +1,17 @@
|
|
1
1
|
manimpango/__init__.py,sha256=ELRxGogKS5uPGatJzGmPAaj068ZOO-Sze88nenz4RE8,1153
|
2
2
|
manimpango/_distributor_init.py,sha256=z3NAjz5oUeNo6Pbk6zuA9Lfi71rB3ucus0XDpZ3nSrk,1233
|
3
|
-
manimpango/_version.py,sha256=
|
4
|
-
manimpango/
|
5
|
-
manimpango/cmanimpango.
|
3
|
+
manimpango/_version.py,sha256=Vq7ueDz68EUGVviee7EKuGy1u4lkrTzFM_-KtqwbrfY,50
|
4
|
+
manimpango/buffer.pxi,sha256=NklqLNZ0462IL9CpZc9AFG8c1N2ULr6JAURJdhegQng,419
|
5
|
+
manimpango/cmanimpango.c,sha256=I70k5es0wpKk27irx7rANAaNUdeVm7L1dQvWWFxCxVs,418073
|
6
|
+
manimpango/cmanimpango.cp311-win32.pyd,sha256=U3Hx-JmBH538V4l5GMgmCFQxwwVcpZSgo_6Oy2dDZ7Q,61952
|
6
7
|
manimpango/cmanimpango.pxd,sha256=Apb6qZMqtkL9ldE_nMxVtdsnTH2tkmYt94lrhsB0Qwc,65
|
7
8
|
manimpango/cmanimpango.pyx,sha256=f3wr3BpOmIsr1yi7jQsaKv9ntyKyzRWJmbNo8JPLqig,10744
|
8
|
-
manimpango/enums.c,sha256=
|
9
|
-
manimpango/enums.cp311-win32.pyd,sha256=
|
9
|
+
manimpango/enums.c,sha256=oioIF1_bIhVCfgwMzxU8uWUqUQLb2KagidBxsfgViU4,149445
|
10
|
+
manimpango/enums.cp311-win32.pyd,sha256=7wy2lGQE061BYeGwCiAWx1py8-cZylIeb9TvmhN4Fwo,23040
|
10
11
|
manimpango/enums.pyx,sha256=5qEKGgt3ueVXJkDKo5f_gyfOcuYCQ_j3sHKuXXkrO14,2370
|
11
12
|
manimpango/exceptions.py,sha256=sg8znK3Yr_Qw_BoACd4sS3ZiWLXgsStAi1tmK-9549o,146
|
12
|
-
manimpango/register_font.c,sha256=
|
13
|
-
manimpango/register_font.cp311-win32.pyd,sha256=
|
13
|
+
manimpango/register_font.c,sha256=hJ4G1WlNZ1bD-Y7jYOYKsk7MVltjwDzaFa0fLMFM_6w,199324
|
14
|
+
manimpango/register_font.cp311-win32.pyd,sha256=lmz8f-uDTiDPLC77yteIKy3EOWDiApfEsY_I24VEgCM,29696
|
14
15
|
manimpango/register_font.pxd,sha256=8iZpMnQenfTdUUxhNdesi21GeGjHX07pvIWiQom6Jio,1653
|
15
16
|
manimpango/register_font.pyx,sha256=H_fe5SLNue6H3vpB01aindxxNQEbtG7jiDhXCk0PZTo,7548
|
16
17
|
manimpango/.libs/CORE_MANIM_cairo-2.dll,sha256=gcguaZqS7ELKV1ge1at322p4BtOe3_1Un8xlO70yC9U,753664
|
@@ -38,14 +39,15 @@ manimpango/.libs/CORE_MANIM_pixman-1-0.dll,sha256=81A_FOT4VAjuYqjQD7GKhWXgJwf5k8
|
|
38
39
|
manimpango/.libs/CORE_MANIM_png16-16.dll,sha256=EK-X1ON8Bm4gZvRqgBAMGr6euNEUWmH64UtQvarkOhs,163840
|
39
40
|
manimpango/.libs/CORE_MANIM_z.dll,sha256=YuxBjO59t-sQ0-jPE-R8ixNHGXcDghbRxObZ1zd9IIA,74752
|
40
41
|
manimpango/attributes/__init__.py,sha256=IqbS6YvnX_5YBcvhhh-jOuqsG26hywrwWxO7rf2eMH4,10777
|
42
|
+
manimpango/attributes/attributes.pxi,sha256=o_EAkxTXVQa-GKXmjqjRpyl3rRM2oxqI2B8nGsCPxoY,6298
|
41
43
|
manimpango/fonts/__init__.py,sha256=ijgoYEfA6oETMQZlb613YSGc7cAuWPyM9-jxgKMMznA,4142
|
42
|
-
manimpango/fonts/_font_desc.c,sha256=
|
43
|
-
manimpango/fonts/_font_desc.cp311-win32.pyd,sha256=
|
44
|
+
manimpango/fonts/_font_desc.c,sha256=JBWffxqT0OSelbMv4dXZgUMwXRG2fCxn3gj_3-0e_ls,306216
|
45
|
+
manimpango/fonts/_font_desc.cp311-win32.pyd,sha256=uxer80YyKzCFrb74twN21osor3abJfQcf-Fr50hgYU4,32256
|
44
46
|
manimpango/fonts/_font_desc.pxd,sha256=f7L1fDqWEqeANGliVzPLAabpsNf_S5hYZfYAHbA0Qjw,104
|
45
47
|
manimpango/fonts/_font_desc.pyi,sha256=5K3qwRygAb6Am9B7I7mg3HhzxSw66UJR_eAnXTc1hBM,670
|
46
|
-
manimpango/fonts/_font_desc.pyx,sha256=
|
47
|
-
manimpango/fonts/enums.c,sha256=
|
48
|
-
manimpango/fonts/enums.cp311-win32.pyd,sha256=
|
48
|
+
manimpango/fonts/_font_desc.pyx,sha256=XWCfWLoWm3v7RHvfC3cmwj6neD89-40KyiKO9FjCpFM,3386
|
49
|
+
manimpango/fonts/enums.c,sha256=yryvG-ZT6qHSDVjw8cm1ij4PiXMQOBeIPjffHJ1X1Ug,145914
|
50
|
+
manimpango/fonts/enums.cp311-win32.pyd,sha256=o_O1SSrByc6aoFjPckDBEhDCZEHeVOMfVuT2o7hUmfk,22016
|
49
51
|
manimpango/fonts/enums.pyi,sha256=F39pBJVtL7i74PkPcMScAWTNsprWg421XzBwrcEMR24,390
|
50
52
|
manimpango/fonts/enums.pyx,sha256=3tpHGD28albK5_xrKMxf4xndyCggGGfBZAgtw9umh-E,2305
|
51
53
|
manimpango/include/cairo.pxd,sha256=IhCmKOEvR8xc36M5Q7SzuQpdv1obgoXO9VjASi5QG3E,1369
|
@@ -53,29 +55,31 @@ manimpango/include/glib.pxd,sha256=-rd7ww83I3unntJ7ZI1NbT25QaoGr7786DqFe5RrY8M,9
|
|
53
55
|
manimpango/include/pango.pxd,sha256=ZEg-P74BE4nEvcafDldeacEpUUpGt33-QF3ZWbidAMQ,6201
|
54
56
|
manimpango/include/pango_attributes.pxd,sha256=cJwiACUQmIAEk-26d-sKpO28Q4Fbd7V8WKJF44tfm4o,5240
|
55
57
|
manimpango/layout/__init__.py,sha256=TPHpFluM2m8WwmBotcI5Ve6uYx3Y3Z_IvYYmnFlo8FY,7841
|
56
|
-
manimpango/layout/_layout.c,sha256=
|
57
|
-
manimpango/layout/_layout.cp311-win32.pyd,sha256=
|
58
|
+
manimpango/layout/_layout.c,sha256=ecy4ebf5uxiYwzFDc0h3mc6qz4nNC6WMpCzW2TrCxWQ,360782
|
59
|
+
manimpango/layout/_layout.cp311-win32.pyd,sha256=EvNoGpyWRDcM9aJIqj89bqfGVSY4QZaR2g_HXcCtSuk,36864
|
58
60
|
manimpango/layout/_layout.pyx,sha256=BYkon6U7KNmWgkvyxB9HfxncjhyPG2xGGLU0VsbfKd8,1784
|
61
|
+
manimpango/layout/layout.pxi,sha256=N902NZq0ILyUnTY43yhP84WBSvQjM3bbCDwMDwStSgE,1389
|
59
62
|
manimpango/renderer/__init__.py,sha256=krRnN0pgAQiyvnabo2Q2dHJgNK9ZpGebW6Al8TD4FIQ,191
|
60
|
-
manimpango/renderer/
|
61
|
-
manimpango/renderer/image_renderer.
|
63
|
+
manimpango/renderer/cairo_utils.pxi,sha256=J-L17N5tiz87fUthMq-RBFFSU9V0_r2w8XepeFOgK0Q,2603
|
64
|
+
manimpango/renderer/image_renderer.c,sha256=CBEYd4zeh_oU30MCalkPESgjQbBc_32MGlYMveQeN_U,521783
|
65
|
+
manimpango/renderer/image_renderer.cp311-win32.pyd,sha256=vttzeMGwGJJGSCImQ-yU_4LFr2Y-BJ9Bsl5j5nvGsfU,59392
|
62
66
|
manimpango/renderer/image_renderer.pxd,sha256=vLbnxD-KYaChrXY1w_FB-iiCJ6cE6U2ArpZHkyjuWCQ,560
|
63
67
|
manimpango/renderer/image_renderer.pyi,sha256=zFir_N8OoPaH6Vn7Eov_E-j0J2eJCt50Icw4deC2Mcc,521
|
64
68
|
manimpango/renderer/image_renderer.pyx,sha256=qRzHCSC8QEQFd16yMo9gOTdwiVP4LJjkX7AFXyyWosc,6757
|
65
|
-
manimpango/renderer/svg_renderer.c,sha256=
|
66
|
-
manimpango/renderer/svg_renderer.cp311-win32.pyd,sha256=
|
69
|
+
manimpango/renderer/svg_renderer.c,sha256=yHIhhJIRcS5W6X6tlvDOG6y5Syyl8Of9amq_jsdQ3LQ,448017
|
70
|
+
manimpango/renderer/svg_renderer.cp311-win32.pyd,sha256=fILfDt2B1TK1PVlR6zxy7JAu3DL9wEwlY-AcS8Ooc2M,49664
|
67
71
|
manimpango/renderer/svg_renderer.pxd,sha256=LcVuCOc4x-8ZR8GLimFLvGG-dxhhcQ3Xx7bFk6wIy1o,562
|
68
72
|
manimpango/renderer/svg_renderer.pyi,sha256=n6NN90qhGQun7Vu1xDgUmYW7rH8PIZ5m-DZHfv4uHBo,418
|
69
73
|
manimpango/renderer/svg_renderer.pyx,sha256=5vf8x88bDDOmlSy62EqO_Dx_dMziujhuv9JtKuIVkic,5284
|
70
74
|
manimpango/utils/__init__.py,sha256=w3VK15PRAEtSnedU9IzOosOi18rCCLDBDs2NPP9_0d0,110
|
71
|
-
manimpango/utils/_utils.cp311-win32.pyd,sha256=
|
75
|
+
manimpango/utils/_utils.cp311-win32.pyd,sha256=le5t945IcM4uKk-m147OrmH3IID_HA79b4zGc7UvEIk,18432
|
72
76
|
manimpango/utils/_utils.pyi,sha256=L4bczjAKJTKbq4FZercUiQEnuVOqTXbfePmp8FWbkrc,112
|
73
|
-
manimpango/utils/utils.c,sha256=
|
77
|
+
manimpango/utils/utils.c,sha256=6vFOGF3PXPxhjZWsZFZcoBqLUCKJ09Ko-2TjLbjQZro,136649
|
74
78
|
manimpango/utils/utils.py,sha256=mYBmmr0bLk72bjcPBoD10q5dIBWdI06m9Tm2J-dEXrc,1699
|
75
79
|
manimpango/utils/utils.pyx,sha256=ydDxtOMbqNexX-IzD6ZuFLfwamsmGqSxGKyRkvZ0nsA,658
|
76
|
-
ManimPango-1.0.
|
77
|
-
ManimPango-1.0.
|
78
|
-
ManimPango-1.0.
|
79
|
-
ManimPango-1.0.
|
80
|
-
ManimPango-1.0.
|
81
|
-
ManimPango-1.0.
|
80
|
+
ManimPango-1.0.0a2.dist-info/LICENSE,sha256=ZB7Op1KnTg-rYuSNFk6dIaWt5fwrfsSWTuJW8Ql55ok,1088
|
81
|
+
ManimPango-1.0.0a2.dist-info/LICENSE.win32,sha256=XJh88_PtJqmEAfFqLLztbIcxPCJaccrFbz1w6ux-9Zg,163586
|
82
|
+
ManimPango-1.0.0a2.dist-info/METADATA,sha256=jpQ6EtG_iXvb9kPdS32XbE2oNGFaf2p06Ds3Zk_JTlk,8600
|
83
|
+
ManimPango-1.0.0a2.dist-info/WHEEL,sha256=4_gqTcsEhdxj3Ssg4q283IXTSwrMvsE7HL9ju9Nna7Q,98
|
84
|
+
ManimPango-1.0.0a2.dist-info/top_level.txt,sha256=_7RXNU2cbck8IbstWHzYv6YV58wtKUDBX-pmUjE6SKs,11
|
85
|
+
ManimPango-1.0.0a2.dist-info/RECORD,,
|
manimpango/_version.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
|
-
__version__ = "1.0.
|
2
|
+
__version__ = "1.0.0a2"
|
@@ -0,0 +1,219 @@
|
|
1
|
+
from pango cimport *
|
2
|
+
from pango_attributes cimport *
|
3
|
+
|
4
|
+
from manimpango.attributes import TextAttribute
|
5
|
+
|
6
|
+
|
7
|
+
cdef PangoAttribute* raise_on_null_attr(PangoAttribute* ptr):
|
8
|
+
if not ptr:
|
9
|
+
raise MemoryError("Could not allocate memory for attribute")
|
10
|
+
return ptr
|
11
|
+
|
12
|
+
cdef set_indexes(PangoAttribute* attr, start_index: int, end_index: int):
|
13
|
+
"""Sets the start and end indexes of a PangoAttribute.
|
14
|
+
|
15
|
+
Parameters
|
16
|
+
----------
|
17
|
+
attr
|
18
|
+
The PangoAttribute to set the indexes for.
|
19
|
+
start_index
|
20
|
+
The start index.
|
21
|
+
end_index
|
22
|
+
The end index.
|
23
|
+
"""
|
24
|
+
if start_index is not None:
|
25
|
+
attr.start_index = start_index
|
26
|
+
if end_index != -1:
|
27
|
+
attr.end_index = end_index
|
28
|
+
|
29
|
+
cdef insert_into_queue(
|
30
|
+
GQueue* queue,
|
31
|
+
PangoAttribute* attr,
|
32
|
+
start_index: int,
|
33
|
+
end_index: int,
|
34
|
+
):
|
35
|
+
"""Inserts a PangoAttribute into a PangoAttrList.
|
36
|
+
|
37
|
+
Parameters
|
38
|
+
----------
|
39
|
+
queue
|
40
|
+
The GQueue to insert the attribute into.
|
41
|
+
attr
|
42
|
+
The PangoAttribute to insert.
|
43
|
+
"""
|
44
|
+
set_indexes(attr, start_index, end_index)
|
45
|
+
g_queue_push_tail(queue, attr)
|
46
|
+
|
47
|
+
cdef GQueue* create_attr_list_for_attribute (
|
48
|
+
attr: TextAttribute,
|
49
|
+
):
|
50
|
+
"""Creates a GQueue from a TextAttribute. The Queue will contain a list
|
51
|
+
of PangoAttributes.
|
52
|
+
|
53
|
+
Multiple PangoAttributes are to be created for a single TextAttribute. That's
|
54
|
+
because for a given `start` and `end` index value, the user can set various
|
55
|
+
attributes like `color`, `font`, `size`, etc. So, we need to create a
|
56
|
+
PangoAttribute for each of these attributes. Finally, we add all these
|
57
|
+
PangoAttributes to a Queue and return it.
|
58
|
+
|
59
|
+
Note: the caller is responsible for freeing the returned GQueue as well as
|
60
|
+
the created attributes.
|
61
|
+
|
62
|
+
Parameters
|
63
|
+
----------
|
64
|
+
attr
|
65
|
+
The TextAttribute to convert.
|
66
|
+
"""
|
67
|
+
cdef PangoAttribute* pango_attr = NULL
|
68
|
+
cdef GQueue* queue = g_queue_new()
|
69
|
+
if not queue:
|
70
|
+
raise MemoryError("Could not allocate memory for GQueue.")
|
71
|
+
|
72
|
+
# allow_breaks
|
73
|
+
if attr.allow_breaks is not None:
|
74
|
+
pango_attr = raise_on_null_attr(
|
75
|
+
pango_attr_allow_breaks_new(attr.allow_breaks))
|
76
|
+
insert_into_queue(
|
77
|
+
queue,
|
78
|
+
pango_attr,
|
79
|
+
attr.start_index,
|
80
|
+
attr.end_index,
|
81
|
+
)
|
82
|
+
|
83
|
+
# background_alpha
|
84
|
+
if attr.background_alpha is not None:
|
85
|
+
pango_attr = raise_on_null_attr(
|
86
|
+
pango_attr_background_alpha_new(attr.background_alpha))
|
87
|
+
insert_into_queue(
|
88
|
+
queue,
|
89
|
+
pango_attr,
|
90
|
+
attr.start_index,
|
91
|
+
attr.end_index,
|
92
|
+
)
|
93
|
+
|
94
|
+
# background_color
|
95
|
+
if attr.background_color is not None:
|
96
|
+
pango_attr = raise_on_null_attr(
|
97
|
+
pango_attr_background_new(
|
98
|
+
attr.background_color[0],
|
99
|
+
attr.background_color[1],
|
100
|
+
attr.background_color[2],
|
101
|
+
),
|
102
|
+
)
|
103
|
+
insert_into_queue(
|
104
|
+
queue,
|
105
|
+
pango_attr,
|
106
|
+
attr.start_index,
|
107
|
+
attr.end_index,
|
108
|
+
)
|
109
|
+
|
110
|
+
# foreground_alpha
|
111
|
+
if attr.foreground_alpha is not None:
|
112
|
+
pango_attr = raise_on_null_attr(
|
113
|
+
pango_attr_foreground_alpha_new(attr.foreground_alpha))
|
114
|
+
insert_into_queue(
|
115
|
+
queue,
|
116
|
+
pango_attr,
|
117
|
+
attr.start_index,
|
118
|
+
attr.end_index,
|
119
|
+
)
|
120
|
+
|
121
|
+
# foreground_color
|
122
|
+
if attr.foreground_color is not None:
|
123
|
+
pango_attr = raise_on_null_attr(
|
124
|
+
pango_attr_foreground_new(
|
125
|
+
attr.foreground_color[0],
|
126
|
+
attr.foreground_color[1],
|
127
|
+
attr.foreground_color[2],
|
128
|
+
),
|
129
|
+
)
|
130
|
+
insert_into_queue(
|
131
|
+
queue,
|
132
|
+
pango_attr,
|
133
|
+
attr.start_index,
|
134
|
+
attr.end_index,
|
135
|
+
)
|
136
|
+
|
137
|
+
# fallback
|
138
|
+
if attr.fallback is not None:
|
139
|
+
pango_attr = raise_on_null_attr(
|
140
|
+
pango_attr_fallback_new(attr.fallback))
|
141
|
+
insert_into_queue(
|
142
|
+
queue,
|
143
|
+
pango_attr,
|
144
|
+
attr.start_index,
|
145
|
+
attr.end_index,
|
146
|
+
)
|
147
|
+
|
148
|
+
# family
|
149
|
+
if attr.family is not None:
|
150
|
+
pango_attr = raise_on_null_attr(
|
151
|
+
pango_attr_family_new(
|
152
|
+
attr.family.encode("utf-8")
|
153
|
+
))
|
154
|
+
insert_into_queue(
|
155
|
+
queue,
|
156
|
+
pango_attr,
|
157
|
+
attr.start_index,
|
158
|
+
attr.end_index,
|
159
|
+
)
|
160
|
+
|
161
|
+
# weight
|
162
|
+
if attr.weight is not None:
|
163
|
+
pango_attr = raise_on_null_attr(
|
164
|
+
pango_attr_weight_new(attr.weight.value))
|
165
|
+
insert_into_queue(
|
166
|
+
queue,
|
167
|
+
pango_attr,
|
168
|
+
attr.start_index,
|
169
|
+
attr.end_index,
|
170
|
+
)
|
171
|
+
|
172
|
+
# line height
|
173
|
+
if attr.line_height is not None:
|
174
|
+
pango_attr = raise_on_null_attr(
|
175
|
+
pango_attr_line_height_new(attr.line_height))
|
176
|
+
insert_into_queue(
|
177
|
+
queue,
|
178
|
+
pango_attr,
|
179
|
+
attr.start_index,
|
180
|
+
attr.end_index,
|
181
|
+
)
|
182
|
+
|
183
|
+
return queue
|
184
|
+
|
185
|
+
|
186
|
+
cdef convert_to_pango_attributes(
|
187
|
+
attrs: list[TextAttribute],
|
188
|
+
PangoAttrList* pango_attr_list
|
189
|
+
):
|
190
|
+
"""Converts a list of TextAttributes to a PangoAttribute.
|
191
|
+
|
192
|
+
Note: the caller owns pango_attrlist and is responsible for freeing it.
|
193
|
+
|
194
|
+
Parameters
|
195
|
+
----------
|
196
|
+
attrs
|
197
|
+
The list of TextAttributes to convert.
|
198
|
+
pango_attrlist
|
199
|
+
The PangoAttrList to add the attributes to.
|
200
|
+
"""
|
201
|
+
cdef GQueue* temp_queue = NULL;
|
202
|
+
cdef PangoAttribute* temp_attr = NULL;
|
203
|
+
|
204
|
+
if not pango_attr_list:
|
205
|
+
raise ValueError("pango_attr_list must not be NULL.")
|
206
|
+
|
207
|
+
# Use pango_attr_list_change() to add the attributes to the list.
|
208
|
+
for attr in attrs:
|
209
|
+
temp_queue = create_attr_list_for_attribute(attr)
|
210
|
+
if not temp_queue:
|
211
|
+
raise MemoryError("holy shit")
|
212
|
+
while not g_queue_is_empty(temp_queue):
|
213
|
+
temp_attr = <PangoAttribute*>g_queue_pop_head(temp_queue)
|
214
|
+
pango_attr_list_insert(
|
215
|
+
pango_attr_list,
|
216
|
+
temp_attr
|
217
|
+
)
|
218
|
+
# Don't free the attribute
|
219
|
+
g_queue_free (temp_queue)
|
manimpango/buffer.pxi
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
cdef class ImageBuffer:
|
2
|
+
cdef unsigned char * data
|
3
|
+
cdef int height
|
4
|
+
cdef int stride
|
5
|
+
|
6
|
+
def __getbuffer__(self, Py_buffer *buffer, int flags):
|
7
|
+
buffer.buf = self.data
|
8
|
+
buffer.format = 'B'
|
9
|
+
buffer.len = self.height * self.stride
|
10
|
+
buffer.obj = self
|
11
|
+
buffer.ndim = 1
|
12
|
+
buffer.readonly = 1
|
13
|
+
|
14
|
+
def __releasebuffer__(self, Py_buffer *buffer):
|
15
|
+
pass
|
manimpango/cmanimpango.c
CHANGED
@@ -17,28 +17,28 @@
|
|
17
17
|
"C:\\cibw\\vendor\\include\\pango-1.0\\pango\\pangocairo.h"
|
18
18
|
],
|
19
19
|
"include_dirs": [
|
20
|
-
"C:/cibw/vendor/include/
|
20
|
+
"C:/cibw/vendor/include/cairo",
|
21
21
|
"C:/cibw/vendor/include/pixman-1",
|
22
|
-
"C:/cibw/vendor/include/harfbuzz",
|
23
|
-
"C:/cibw/vendor/include/freetype2",
|
24
22
|
"C:/cibw/vendor/include/glib-2.0",
|
25
|
-
"C:/cibw/vendor/
|
26
|
-
"C:/cibw/vendor/include/
|
23
|
+
"C:/cibw/vendor/include/harfbuzz",
|
24
|
+
"C:/cibw/vendor/include/pango-1.0",
|
25
|
+
"C:/cibw/vendor/include",
|
27
26
|
"C:/cibw/vendor/include/fribidi",
|
28
|
-
"C:/cibw/vendor/include"
|
27
|
+
"C:/cibw/vendor/include/freetype2",
|
28
|
+
"C:/cibw/vendor/lib/glib-2.0/include"
|
29
29
|
],
|
30
30
|
"libraries": [
|
31
|
-
"
|
32
|
-
"intl",
|
31
|
+
"Gdi32",
|
33
32
|
"gobject-2.0",
|
34
|
-
"
|
33
|
+
"glib-2.0",
|
34
|
+
"fontconfig",
|
35
35
|
"harfbuzz",
|
36
|
+
"pangoft2-1.0",
|
36
37
|
"pangocairo-1.0",
|
37
|
-
"
|
38
|
+
"intl",
|
38
39
|
"freetype",
|
39
40
|
"pango-1.0",
|
40
|
-
"
|
41
|
-
"pangoft2-1.0"
|
41
|
+
"cairo"
|
42
42
|
],
|
43
43
|
"library_dirs": [
|
44
44
|
"C:/cibw/vendor/lib"
|
Binary file
|
manimpango/enums.c
CHANGED
@@ -17,28 +17,28 @@
|
|
17
17
|
"C:\\cibw\\vendor\\include\\pango-1.0\\pango\\pangocairo.h"
|
18
18
|
],
|
19
19
|
"include_dirs": [
|
20
|
-
"C:/cibw/vendor/include/
|
20
|
+
"C:/cibw/vendor/include/cairo",
|
21
21
|
"C:/cibw/vendor/include/pixman-1",
|
22
|
-
"C:/cibw/vendor/include/harfbuzz",
|
23
|
-
"C:/cibw/vendor/include/freetype2",
|
24
22
|
"C:/cibw/vendor/include/glib-2.0",
|
25
|
-
"C:/cibw/vendor/
|
26
|
-
"C:/cibw/vendor/include/
|
23
|
+
"C:/cibw/vendor/include/harfbuzz",
|
24
|
+
"C:/cibw/vendor/include/pango-1.0",
|
25
|
+
"C:/cibw/vendor/include",
|
27
26
|
"C:/cibw/vendor/include/fribidi",
|
28
|
-
"C:/cibw/vendor/include"
|
27
|
+
"C:/cibw/vendor/include/freetype2",
|
28
|
+
"C:/cibw/vendor/lib/glib-2.0/include"
|
29
29
|
],
|
30
30
|
"libraries": [
|
31
|
-
"
|
32
|
-
"intl",
|
31
|
+
"Gdi32",
|
33
32
|
"gobject-2.0",
|
34
|
-
"
|
33
|
+
"glib-2.0",
|
34
|
+
"fontconfig",
|
35
35
|
"harfbuzz",
|
36
|
+
"pangoft2-1.0",
|
36
37
|
"pangocairo-1.0",
|
37
|
-
"
|
38
|
+
"intl",
|
38
39
|
"freetype",
|
39
40
|
"pango-1.0",
|
40
|
-
"
|
41
|
-
"pangoft2-1.0"
|
41
|
+
"cairo"
|
42
42
|
],
|
43
43
|
"library_dirs": [
|
44
44
|
"C:/cibw/vendor/lib"
|
manimpango/enums.cp311-win32.pyd
CHANGED
Binary file
|