README: note that Pillow built with Raqm already shapes (reshaping corrupts it) - #103
Open
genviz-ai wants to merge 1 commit into
Open
README: note that Pillow built with Raqm already shapes (reshaping corrupts it)#103genviz-ai wants to merge 1 commit into
genviz-ai wants to merge 1 commit into
Conversation
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.
Follows #102.
The README currently tells every reader that "PIL Image does not support reshaping out of the box,
so ... you would need to reshape the text for sure." That was true when it was written, and is now
false whenever Pillow is built with Raqm — which recent wheels are by default. In that
configuration the example produces corrupted Arabic rather than correct Arabic.
This adds the
features.check("raqm")test and states which branch the existing example belongsto. It does not change the example itself, which remains correct for Pillow without Raqm.
Measured before writing this (5 strings × 3 fonts per path):
reshape()+get_display()Note the second row: where the recipe IS needed it is a partial rescue rather than a fix. I have
deliberately kept that out of the README, since it is a separate discussion from "does this
example apply to me" — but it is why the wording says the example is "needed" rather than
"sufficient".
Data and reproduction: https://huggingface.co/datasets/syamjithnk/arshape (CC BY 4.0)