Skip to content

Fix Kurdish letter forms, test on Python 3.15, bump to 3.1.0 - #106

Merged
mpcabd merged 2 commits into
masterfrom
fix/kurdish-table-font-forms
Nov 2, 2026
Merged

mpcabd merged 2 commits into
masterfrom
fix/kurdish-table-font-forms

Conversation

@mpcabd

@mpcabd mpcabd commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Follow-up to #104. I checked every entry in LETTERS_KURDISH against two Kurdish fonts, Sarchia (85_Sarchia_Soran.ttf) and Unikurd Web (Unikuweb.ttf). For each letter in each position, I let HarfBuzz pick a glyph using the font's own OpenType rules, then compared it with the glyph that arabic_reshaper's output code point draws. Both fonts agree on every fix below.

Table fixes

Letter Before After Problem
ه HEH U+0647 FBAB ×4 0647, 06BE, FBAB, FEEA FBAB is the fonts' medial glyph, so an initial or final heh had a stray connecting stroke (e.g. هەولێر, هەڵبژاردن)
ح HAH U+062D, isolated FEA1 062D Neither font has FEA1, so nothing was drawn
ێ YEAH U+06CE, isolated E004 06CE E004 is the final form, so an isolated yeah had a joining tail
ڕ REH WITH SMALL V BELOW U+0695 missing 0695, —, —, E001 A Sorani letter that was never reshaped. Both fonts put its final form at E001

ى (U+0649) and ھ (U+06BE) also differ from the fonts. But these fonts have no contextual forms for them, so they don't say which form is right, and I left those entries alone. The ArabicV2 table has the same isolated ێ entry; I didn't change it, because it's a different table.

Tests

  • test_005_kurdish.py: exact string tests for each fixed entry, including whole words. 8 of these fail against the old table.
  • test_006_kurdish_font_glyphs.py (new): the font comparison described above. It covers every letter in LETTERS_KURDISH plus the Sorani alphabet, so a letter missing from the table also fails. It needs fonttools and uharfbuzz, and Kurdish fonts that use the private-use convention under fonts/ (git-ignored). It's skipped otherwise, which means it is skipped in CI. Locally, with both fonts present, it passes; before Add Kurdish letter lam with small v to the Kurdish table #104 it also caught the missing ڵ.

Python 3.15

Adds 3.15 to the CI and release test matrices and to the classifiers. The full suite passes locally on 3.14 and 3.15.2.

Version 3.1.0

3.0.1 is already released, so this bumps the version to 3.1.0: a minor release, since it adds letters (ڵ from #104, ڕ here) and Python 3.15, and changes some Kurdish output.

  • pyproject.toml: 3.0.1 → 3.1.0
  • uv.lock: was still at 3.0.0
  • __version__ was still 3.0.0 and defined in both __init__.py and __version__.py. __init__.py now imports it from __version__.py, so there is one copy to bump.

Publishing still only happens when a GitHub release is created.

🤖 Generated with Claude Code

Check LETTERS_KURDISH against the Sarchia and Unikurd Web fonts and fix
the entries where they disagree with the glyphs the fonts pick through
their own OpenType rules:

- HEH (U+0647) used U+FBAB, the fonts' medial glyph, for every form, so
  an initial or final heh got a stray connecting stroke. It now uses
  U+0647, U+06BE, U+FBAB and U+FEEA.
- Isolated HAH (U+062D) used U+FEA1, which these fonts lack, so nothing
  was drawn. It now uses U+062D.
- Isolated YEAH (U+06CE) used U+E004, the fonts' final form. It now uses
  U+06CE.
- REH WITH SMALL V BELOW (U+0695) was missing. It is right-joining, with
  its final form at U+E001.

Add test_006_kurdish_font_glyphs.py, which shapes each Kurdish letter in
every position with HarfBuzz using a font's own rules and compares the
glyph with the one arabic_reshaper's output maps to. It runs on Kurdish
fonts placed under fonts/ and is skipped otherwise. Add string tests for
the fixed entries so CI covers them without the fonts.

Add Python 3.15 to the CI and release test matrices and the classifiers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claude

claude Bot commented Nov 2, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

3.0.1 is released. Since then the Kurdish table gained lam with small v
and reh with small v below, several Kurdish forms changed, and Python
3.15 is supported, so this is a minor release.

- pyproject.toml: 3.0.1 -> 3.1.0
- uv.lock: was still at 3.0.0, now 3.1.0
- __version__ was still 3.0.0 and defined twice; __init__ now imports it
  from __version__.py so there is one copy to bump.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mpcabd mpcabd changed the title Fix Kurdish letter forms to match Kurdish fonts, test on Python 3.15 Fix Kurdish letter forms, test on Python 3.15, bump to 3.1.0 Nov 2, 2026
@mpcabd
mpcabd merged commit 57bf684 into master Nov 2, 2026
7 checks passed
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