RTL shaping: Pillow direction/language, Kurdish and Arabic examples#811
Open
0xdolan wants to merge 10 commits intoamueller:mainfrom
Open
RTL shaping: Pillow direction/language, Kurdish and Arabic examples#8110xdolan wants to merge 10 commits intoamueller:mainfrom
0xdolan wants to merge 10 commits intoamueller:mainfrom
Conversation
Add text_direction (ltr|rtl|ttb|auto), text_language, and text_features. When direction is auto, derive from Unicode bidirectional class of the word. Pass kwargs through ImageDraw.text and textbbox for consistent layout. Made-with: Cursor
Made-with: Cursor
Exercise Arabic-script Sorani text with bundled fonts when libraqm is available. Made-with: Cursor
Align matplotlib and numpy constraints with legacy requirements (numpy 1.19.3 on Python 3.9). Include cython as a runtime dependency for source installs. Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
…options Read examples/arabicwords.txt, write examples/arabic_example.png, require a bundled or path-resolved Arabic font. Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
text_direction(ltr/rtl/ttb/auto),text_language, andtext_featuresonWordCloud, forwarding them to PillowImageDraw.text/textbboxfor correct RTL shaping when Pillow is built with libraqm. Auto direction uses Unicode bidirectional classes per word.Includes Kurdish Sorani (ckb) and Arabic examples with bundled OFL fonts (Estedad, Noto Naskh Arabic), README updates, and tests.
Testing
pytest test/test_ckb_ku_words_rtl.py(render test skips without libraqm or fonts).Opened from fork branch
0xdolan/word_cloud:feat/rtl-wordcloud-examples.Made with Cursor