Commit graph

104 commits

Author SHA1 Message Date
YishiMichael
11af9508f2
add back get_parts_by_text, get_part_by_text methods 2022-03-03 20:38:15 +08:00
YishiMichael
a227ffde05
PEP8: reorder imports 2022-03-02 20:28:26 +08:00
YishiMichael
e0b0ae280e
Allow passing strings to local_configs 2022-03-02 19:59:14 +08:00
YishiMichael
fce38fd8a5
Modify default value of apply_space_chars 2022-03-02 19:52:45 +08:00
YishiMichael
52a99a0c49
Add global_config, local_configs params 2022-03-02 19:34:56 +08:00
YishiMichael
956e3a69c7
Refactor Text 2022-03-02 18:38:24 +08:00
YishiMichael
b06a5d3f23
Refactor Text 2022-02-26 20:31:26 +08:00
TonyCrane
4fbe948b63
style: insert an empty line after import 2022-02-16 21:08:25 +08:00
TonyCrane
9f3b404df6
resolve conflict and add type hints for it 2022-02-16 11:46:55 +08:00
YishiMichael
0cab23b2ba
Reorganize inheriting order of SVGMobject 2022-02-15 20:16:15 +08:00
TonyCrane
773e013af9
chore: add type hints to manimlib.mobject.svg 2022-02-14 22:55:41 +08:00
YishiMichael
67f5b10626
Attempt to refactor SVGMobject with svgelements (#1731)
* Some small refactors

* Refactor MTex

* Implement TransformMatchingMTex

* Some refactors

* Some refactors

* Some small refactors

* Strip strings before matching

* Implement get_submob_tex

* Use RGB color mode

* Some small refactors

* Try refactoring SVGMobject with svglib

* Refactor SVGMobject using svgelements

* Refactor SVGMobject using svgelements

* Use functions instead of func names as dict values

* style: modify import order to conform to PEP8

* Set default values to None

* modify import order

* Remove unused import

Co-authored-by: TonyCrane <tonycrane@foxmail.com>
2022-02-11 07:53:21 -08:00
Grant Sanderson
8a29de5ef0 Override style for Text 2022-01-26 08:21:00 -08:00
TonyCrane
19778e405a
some cleanups 2022-01-26 19:55:47 +08:00
Grant Sanderson
f3ecebee43 Remove unnecessary import 2021-11-16 17:37:45 -08:00
Grant Sanderson
2753beb7bb Merge branch 'master' of github.com:3b1b/manim into quintic 2021-10-03 10:28:14 -07:00
Grant Sanderson
788775e419 Larger spacing between Text lines 2021-10-01 12:32:38 -07:00
TonyCrane
add1daf500 change CRLF to LF 2021-09-15 20:02:57 +08:00
Michael W
9e563ae3b4
Add Code mobject and rewrite Text.text2settings() 2021-09-15 15:55:19 +08:00
Grant Sanderson
fd8904ec83
Merge pull request #1557 from naveen521kk/add-markuptext
Add MarkupText
2021-07-28 07:45:50 -07:00
Wallbreaker5th
2ed78c6e0f Rewrite earclip_triangulation 2021-07-28 17:06:43 +08:00
Naveen M K
5986d0e7d2
Add MarkupText
This would use a Pango specific markup which looks like html.

There are some specific implementation here about `<color>`
and `<gradient>`
Pango doesn't support `<gradient>`  or `<color> ` instead it works
with `color` attribute and gradient isn't supported.
Since, `SVGMobject` doesn't know about parsing colors from SVG image
and implmentation of `<color>` and `<gradient>` is added.

Co-authored-by: Philipp Imhof <52650214+PhilippImhof@users.noreply.github.com>
Signed-off-by: Naveen M K <naveen@syrusdark.website>
2021-06-20 01:13:13 +05:30
Grant Sanderson
8aedb8f33e
Merge branch 'master' into master 2021-06-19 09:48:53 -07:00
TonyCrane
663c57ba74 a little fix to TEXT_MOB_SCALE_FACTOR 2021-06-19 19:33:53 +08:00
Wallbreaker5th
a99ccea02c Add some comments about the temporary hack 2021-06-19 16:00:39 +08:00
鹤翔万里
d14f22c5ba
Revert "Fixed the default size of Text" 2021-06-19 13:11:36 +08:00
Grant Sanderson
128178b46e
Merge branch 'master' into master 2021-06-18 12:25:00 -07:00
Naveen M K
5765ab9055
Move 0.3 constant to DEFAULT_LINE_SPACING_SCALE 2021-06-19 00:43:01 +05:30
Naveen M K
6eb7edc664
Scale Text Correctly
Change TEXT_MOB_SCALE_FACTOR value
Also deprecate `size` parameter

Also, now text isn't scaled when increasing font size
instead it is passed to the underlying enging
for handling. Though always a Text object is scaled
with a default value so that it fits the screen.

Signed-off-by: Naveen M K <naveen@syrusdark.website>
2021-06-18 17:59:15 +05:30
Wallbreaker5th
e836c3bb42 Temporary hack for showing text correctly 2021-06-18 14:43:09 +08:00
TonyCrane
17d75bd336 Fixed the size of Text on different machines 2021-06-15 18:14:06 +08:00
Grant Sanderson
fd18e4a21f Fixed missing arg in self.get_parts_by_text 2021-03-19 10:55:04 -07:00
Grant Sanderson
15f3b359ae Added Text.get_parts_by_text 2021-03-18 17:34:57 -07:00
Naveen M K
ba3bb64bce
register_font is available for macOS
https://github.com/ManimCommunity/ManimPango/pull/26
2021-02-19 00:49:50 +05:30
Tony031218
c9e223485c fix Text incorrect coloring 2021-02-13 17:51:43 +08:00
Grant Sanderson
8f502f2790 Small style changes 2021-02-12 13:34:16 -08:00
Syrus Dark
ad332c5863
Use manimpango for Text rendering 2021-02-12 12:28:08 +05:30
Grant Sanderson
68a8114d7a Remove unused Rectangle import 2021-01-18 08:13:18 -10:00
Tony031218
453ccc2765 remove unnecessary comment 2021-01-16 10:23:11 +08:00
Tony031218
3d118a5bb6 change the method of reset submobjects 2021-01-16 10:20:41 +08:00
Tony031218
7f27e926f2 replace single quotes with double quotes 2021-01-16 09:37:54 +08:00
Tony031218
5f6b653803 improve Text's handling of non-display characters 2021-01-16 09:35:13 +08:00
Grant Sanderson
b423a423b5 Make customization more accessible 2021-01-15 10:16:37 -10:00
Tony031218
7c04edcced improve Text's size 2021-01-15 23:39:24 +08:00
Tony031218
f696ba4100 add an example for Text 2021-01-15 21:11:17 +08:00
Tony031218
1d1706039e remove an unnecessary import 2021-01-15 20:25:17 +08:00
Tony031218
79b8136330 fix Text in shaders 2021-01-15 20:21:17 +08:00
Grant Sanderson
ddfc3a6567 Replace lingering .points references 2021-01-12 07:27:32 -10:00
Grant Sanderson
d2518df82c Add deprication warning 2021-01-02 21:32:07 -08:00
鹤翔万里
d83fa90606
Fix Text Class's bugs in shaders branch (the same as #1030) (#1031)
* fix: remove the last M tag in svg files to make Text run in shaders branch

* fix: close the svg path manually to fix the bug of wrong stroke

* fix: remove Space mobjects in Text to fix the bug of TransformText

* feat: make Text and TextMobject equal in size

* this will lead to more bugs of setting color, so I delete it

* fix typo in text_mobject.py

* fix conflict of default size and height
2020-05-07 01:21:43 -07:00