[GH-ISSUE #2796] persian letter that are not exist in Arabic dont show correctly #698

Closed
opened 2026-11-02 15:41:13 +07:00 by bsakaguchi · 6 comments
Owner

Originally created by @RaekonEK on GitHub (Oct 27, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/2796

Image in the image the letters "گ" and "چ" and "ژ" and "پ" doesn't join see they suposed to look like that "پگچژ" not "پ گ چ ژ"
Originally created by @RaekonEK on GitHub (Oct 27, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/2796 <img width="324" height="34" alt="Image" src="https://github.com/user-attachments/assets/64458cbf-8b7a-4310-9fc7-52c2c7ab526b" /> in the image the letters "گ" and "چ" and "ژ" and "پ" doesn't join see they suposed to look like that "پگچژ" not "پ گ چ ژ"
Author
Owner

@socksprox commented on GitHub (Oct 27, 2026):

🤖 Agent: The Persian letters گ چ ژ پ not joining is a font-shaping gap — they're outside Arabic's base set so they fall back to unjoined glyphs. Confirmed rendering gap; leaving to the maintainer.

<!-- gh-comment-id:6443433315 --> @socksprox commented on GitHub (Oct 27, 2026): 🤖 Agent: The Persian letters گ چ ژ پ not joining is a font-shaping gap — they're outside Arabic's base set so they fall back to unjoined glyphs. Confirmed rendering gap; leaving to the maintainer.
Author
Owner

@sirrayi commented on GitHub (Oct 27, 2026):

🤖 Agent: Comment by sirrayi's AI agent (Devin), not by sirrayi themselves. For triage: this looks like vanilla behaviour that Horizon copies on purpose. crates/horizon-client/src/bidi.rs follows vanilla's text path (FormattedBidiReorder → ICU4J ArabicShaping(LETTERS_SHAPE)). ICU only maps the basic Arabic letters (U+0622–U+064A) to Presentation Forms-B. The extended letters پ چ ژ گ (U+0679–U+06D3) have their joined forms only in Presentation Forms-A, and ICU leaves them as they are. That's what the comment above FORMS in bidi.rs says. Joining them would be a Horizon-only improvement on vanilla (an option, per docs/design-system.md), not a parity fix. Worth comparing a screenshot from vanilla 26.3 with the same text to confirm.

<!-- gh-comment-id:6445377515 --> @sirrayi commented on GitHub (Oct 27, 2026): 🤖 Agent: Comment by sirrayi's AI agent (Devin), not by sirrayi themselves. For triage: this looks like vanilla behaviour that Horizon copies on purpose. `crates/horizon-client/src/bidi.rs` follows vanilla's text path (`FormattedBidiReorder` → ICU4J `ArabicShaping(LETTERS_SHAPE)`). ICU only maps the basic Arabic letters (U+0622–U+064A) to Presentation Forms-B. The extended letters پ چ ژ گ (U+0679–U+06D3) have their joined forms only in Presentation Forms-A, and ICU leaves them as they are. That's what the comment above `FORMS` in `bidi.rs` says. Joining them would be a Horizon-only improvement on vanilla (an option, per docs/design-system.md), not a parity fix. Worth comparing a screenshot from vanilla 26.3 with the same text to confirm.
Author
Owner

@sirrayi commented on GitHub (Oct 31, 2026):

/claim

<!-- gh-comment-id:6537214570 --> @sirrayi commented on GitHub (Oct 31, 2026): /claim
Author
Owner

@sirrayi commented on GitHub (Oct 31, 2026):

/unclaim

<!-- gh-comment-id:6537724992 --> @sirrayi commented on GitHub (Oct 31, 2026): /unclaim
Author
Owner

@mariuslozo-boop commented on GitHub (Oct 31, 2026):

🤖 Agent: This is vanilla behaviour, so Horizon already matches 26.3. Vanilla's FormattedBidiReorder.shape calls new ArabicShaping(8).shape(text) (LETTERS_SHAPE). Running that call against the ICU4J 78.3 jar that 26.3 ships with: basic Arabic letters shape (U+0628 becomes FE91/FE92/FE90), but پ (U+067E), چ (U+0686), ژ (U+0698) and گ (U+06AF) come back unchanged, with no joined forms. Horizon deliberately mirrors that in crates/horizon-client-render/src/bidi.rs (8a5d7bb78, "Leave the extended Arabic letters unshaped, as ICU does"). Joining these letters would go beyond vanilla, so it fits better as a suggestion than as a parity bug; PR #4894 was closed for the same reason.

<!-- gh-comment-id:6549684802 --> @mariuslozo-boop commented on GitHub (Oct 31, 2026): 🤖 Agent: This is vanilla behaviour, so Horizon already matches 26.3. Vanilla's `FormattedBidiReorder.shape` calls `new ArabicShaping(8).shape(text)` (`LETTERS_SHAPE`). Running that call against the ICU4J 78.3 jar that 26.3 ships with: basic Arabic letters shape (U+0628 becomes FE91/FE92/FE90), but پ (U+067E), چ (U+0686), ژ (U+0698) and گ (U+06AF) come back unchanged, with no joined forms. Horizon deliberately mirrors that in `crates/horizon-client-render/src/bidi.rs` (8a5d7bb78, "Leave the extended Arabic letters unshaped, as ICU does"). Joining these letters would go beyond vanilla, so it fits better as a suggestion than as a parity bug; PR #4894 was closed for the same reason.
Author
Owner

@rdbtCVS commented on GitHub (Oct 31, 2026):

🤖 Agent: This matches vanilla. 26.3's FormattedBidiReorder shapes Arabic with ICU's ArabicShaping(LETTERS_SHAPE), which leaves U+067E, U+0686, U+0698 and U+06AF (پ چ ژ گ) unshaped. This was checked against the ICU4J 78.3 jar that 26.3 ships, and bidi.rs mirrors it on purpose (see also #4894, closed for the same reason).

<!-- gh-comment-id:6550611246 --> @rdbtCVS commented on GitHub (Oct 31, 2026): 🤖 Agent: This matches vanilla. 26.3's `FormattedBidiReorder` shapes Arabic with ICU's `ArabicShaping(LETTERS_SHAPE)`, which leaves U+067E, U+0686, U+0698 and U+06AF (پ چ ژ گ) unshaped. This was checked against the ICU4J 78.3 jar that 26.3 ships, and `bidi.rs` mirrors it on purpose (see also #4894, closed for the same reason).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#698
No description provided.