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

Bidirectional text rendering and complex text shaping #210

Closed
skyjake opened this issue Mar 15, 2021 · 4 comments
Closed

Bidirectional text rendering and complex text shaping #210

skyjake opened this issue Mar 15, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request priority High-priority issue

Comments

@skyjake
Copy link
Owner

skyjake commented Mar 15, 2021

Lagrange's text renderer needs to support both LTR and RTL scripts.

The text draw function already gets information about the available horizontal bounds, so that can be used for aligning to the right.

Additional fonts need to made available, too (see #195).

For reference: Unicode Bidirectional Algorithm

@skyjake skyjake added enhancement New feature or request priority High-priority issue labels Mar 16, 2021
@skyjake skyjake changed the title Right-to-left text rendering Bidirectional text rendering Mar 28, 2021
@skyjake
Copy link
Owner Author

skyjake commented Mar 28, 2021

An Arabic font is now available (4756b0a).

@skyjake skyjake changed the title Bidirectional text rendering Bidirectional text rendering and complex text shaping Jun 9, 2021
@skyjake
Copy link
Owner Author

skyjake commented Jun 9, 2021

Upon reflection, if I go ahead and try to write my own bidirectional layout algorithm and text shaping, it'll be at best a partially correct solution. That would be insufficient. The best approach with complex subjects like Unicode is to rely on existing, widely used libraries. I've decided to try to build a solution on top of GNU FriBidi (LGPL) and HarfBuzz (Old MIT). At least the former has no additional dependencies, and hopefully the latter can be used without GLib/Freetype as well.

@skyjake skyjake self-assigned this Jun 9, 2021
@skyjake
Copy link
Owner Author

skyjake commented Jul 3, 2021

Making progress: https://skyjake.fi/@jk/106511014377919143

@skyjake skyjake added this to the v1.6 milestone Jul 11, 2021
@skyjake skyjake closed this as completed Jul 14, 2021
@skyjake
Copy link
Owner Author

skyjake commented Jul 14, 2021

Landed in the dev branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority High-priority issue
Projects
None yet
Development

No branches or pull requests

1 participant