Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text support #3

Open
Shnatsel opened this issue Oct 19, 2024 · 0 comments
Open

Text support #3

Shnatsel opened this issue Oct 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Shnatsel
Copy link
Owner

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.

@Shnatsel Shnatsel added the enhancement New feature or request label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant