Repository navigation
Fix Kurdish letter forms, test on Python 3.15, bump to 3.1.0 - #106
Merged
Merged
Conversation
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>
Code reviewNo 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>
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.
Follow-up to #104. I checked every entry in
LETTERS_KURDISHagainst 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
هHEH U+0647FBAB×40647, 06BE, FBAB, FEEAFBABis the fonts' medial glyph, so an initial or final heh had a stray connecting stroke (e.g.هەولێر,هەڵبژاردن)حHAH U+062D, isolatedFEA1062DFEA1, so nothing was drawnێYEAH U+06CE, isolatedE00406CEE004is the final form, so an isolated yeah had a joining tailڕREH WITH SMALL V BELOW U+06950695, —, —, E001E001ى(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 inLETTERS_KURDISHplus the Sorani alphabet, so a letter missing from the table also fails. It needsfonttoolsanduharfbuzz, and Kurdish fonts that use the private-use convention underfonts/(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.0uv.lock: was still at 3.0.0__version__was still3.0.0and defined in both__init__.pyand__version__.py.__init__.pynow 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