You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rendering text is a somewhat common operation. This issue summarizes what needs to be done and how it can be achieved. Text support will not be actively worked on until someone tells me they actually need it.
I've checked and imagemagick's label: command does not support shaping, so anything complex (e.g. Arabic “سلام”) will simply be ignored because their simple built-in text engine cannot handle it. Presumably we will have to emulate this limited behavior. There is a variety of Rust libraries that meet these requirements (rusttype, ab_glyph, fontdue, ...)
The pango: command does support complex shaping, and renders the Arabic word above correctly. Fortunately there is a complete, pure-Rust text stack that does support all these complex features: cosmic-text. There is ongoing experimentation in bridging cosmic-text and image in https://github.com/bschwind/image-text
Pango has an entire markup language, which we will presumably also have to implement. It is XML-based, so roxmltree should come in handy for that.
The text was updated successfully, but these errors were encountered:
Rendering text is a somewhat common operation. This issue summarizes what needs to be done and how it can be achieved. Text support will not be actively worked on until someone tells me they actually need it.
I've checked and
imagemagick
'slabel:
command does not support shaping, so anything complex (e.g. Arabic “سلام”) will simply be ignored because their simple built-in text engine cannot handle it. Presumably we will have to emulate this limited behavior. There is a variety of Rust libraries that meet these requirements (rusttype, ab_glyph, fontdue, ...)The
pango:
command does support complex shaping, and renders the Arabic word above correctly. Fortunately there is a complete, pure-Rust text stack that does support all these complex features: cosmic-text. There is ongoing experimentation in bridgingcosmic-text
andimage
in https://github.com/bschwind/image-textPango has an entire markup language, which we will presumably also have to implement. It is XML-based, so
roxmltree
should come in handy for that.The text was updated successfully, but these errors were encountered: