ManimCommunity / ManimPango

Binding for Pango, to use with Manim.
https://manimpango.manim.community
MIT License
43 stars 13 forks source link

Add option to Justify #34

Closed naveen521kk closed 3 years ago

naveen521kk commented 3 years ago

It isn't that great that we can't justify a Paragraph of Text directly in Manim using MarkupText. Also, there is a Paragraph Mobject but it does things manually which Pango does for us. Also, we should make Paragraph object use these rather than implementing it by hand, as it is done currently. these are the link to docs which we should implement https://developer.gnome.org/pango/stable/pango-Layout-Objects.html#pango-layout-set-justify https://developer.gnome.org/pango/stable/pango-Layout-Objects.html#pango-layout-set-indent https://developer.gnome.org/pango/stable/pango-Layout-Objects.html#pango-layout-set-spacing https://developer.gnome.org/pango/stable/pango-Layout-Objects.html#pango-layout-set-line-spacing https://developer.gnome.org/pango/stable/pango-Layout-Objects.html#pango-layout-set-auto-dir https://developer.gnome.org/pango/stable/pango-Layout-Objects.html#pango-layout-set-alignment This should be done after https://github.com/ManimCommunity/ManimPango/issues/30 cc @PhilippImhof

naveen521kk commented 3 years ago

I have done some in https://github.com/ManimCommunity/ManimPango/commit/942f2f68fe0cef448287b3359de207dd444ca1ea where I could create things like, center justified image or like this, right justified image or with an indent in the start image or justified image