Skip to content

Add Kurdish script support#154

Open
mr-baz wants to merge 3 commits into
pnarimani:masterfrom
mr-baz:kurdish-script-support
Open

Add Kurdish script support#154
mr-baz wants to merge 3 commits into
pnarimani:masterfrom
mr-baz:kurdish-script-support

Conversation

@mr-baz

@mr-baz mr-baz commented May 10, 2026

Copy link
Copy Markdown
  1. Changes in RTLTextMeshPro.cs and RTLTextMeshPro3D.cs

    • Replaced the bool farsi field with an AramaicScript enum. This allows proper handling of Arabic, Persian, and Kurdish scripts, each with its own characteristics, and makes it easy to add support for additional languages in the future.
    • Implemented ISerializationCallbackReceiver to handle existing components that used the old farsi boolean. In OnAfterDeserialize, if farsi was previously enabled, the enum is set to Persian; otherwise, it defaults to Arabic.
  2. Changes in RTLTextMeshProEditor.cs and RTLTextMeshProEditor3D.cs

    • Updated the editor panels to use the AramaicScript enum instead of the old farsi boolean.
  3. ArabicGeneralLetters.cs

    • Added Kurdish-specific general letter forms.
  4. ArabicIsolatedLetters

    • Characters added beyond the first two are not true isolated forms. They exist solely to locate the correct positional form of a character (middle = isolated+3, final = isolated+1, initial = isolated+2) because these characters are defined within the Private Use Area.
  5. ConstantLetters.cs (new file)

    • The letters 'ە' (AE) and 'ھ' (HA) may, under certain conditions, use specific Unicode code points in an irregular manner. This new file covers those exceptional cases.
  6. Most important changes in GlyphFixer.cs

    • Fix() method:
      a. Added an optional checkSupportChar parameter. Most Kurdish fonts do not support the isolated Unicode forms of characters, so when an isolated form is required, the general Unicode form should be used instead. This parameter checks that support and is not needed for non-Kurdish scripts.
      b. In the first condition of the main loop, the Kurdish Lam character ڵ is now also checked. When detected, FixLamForm determines and applies the correct form based on the type of Lam used.
      c. In TryGetKurdishException, the irregular cases for Kurdish Ha and Kurdish Ae (mentioned in point 5) are handled.
      d. In CheckKurdishIsolateState, the function described in (a) is used.
      e. All remaining changes involve replacing the outdated farsi variable with the AramaicScript enum.
  7. Sample font

    • Added a sample Kurdish font under the Fonts/Kurdi folder.
  8. Character range definition

    • Added KurdishAll.txt inside the Range folder, containing all characters used in Kurdish-script fonts.

Repository owner deleted a comment from meta-minion-001 May 19, 2026
@mr-baz

mr-baz commented May 29, 2026

Copy link
Copy Markdown
Author

@pnarimani Could you please review my code? or what?

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