Skip to content

README: note that Pillow built with Raqm already shapes (reshaping corrupts it) - #103

Open
genviz-ai wants to merge 1 commit into
mpcabd:masterfrom
genviz-ai:readme-raqm-note
Open

README: note that Pillow built with Raqm already shapes (reshaping corrupts it)#103
genviz-ai wants to merge 1 commit into
mpcabd:masterfrom
genviz-ai:readme-raqm-note

Conversation

@genviz-ai

Copy link
Copy Markdown

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 belongs
to. It does not change the example itself, which remains correct for Pillow without Raqm.

Measured before writing this (5 strings × 3 fonts per path):

path no preprocessing with reshape() + get_display()
Pillow with Raqm 15/15 identical 0/15 — 14 broken, 1 recognisable
Pillow without Raqm 0/15 — 15 broken 0/15 — 9 recognisable, 6 still broken

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant