Skip to main content

tamil-legacy-fonts

Convert text stored in Bamini and Shree-Lipi legacy, non-Unicode Tamil fonts to Unicode — including the visual-order → logical-order reordering of pre-base vowel signs, and repairs for the common PDF text-layer extraction artefacts (stranded vowel signs, letter-spacing inside aksharas, the + long-u tail).

Pure Python, standard library only, Python 3.10+.

from tamil_legacy_fonts import (
    tamil_bamini_to_unicode,
    tamil_shree_to_unicode,
    encoding_for_font,
)

encoding_for_font("ABCDEF+Kalaham")  # "bamini"
encoding_for_font("SHREE-TAM7-0800")  # "shreelipi"
encoding_for_font("SHREE-TAM-0800")  # None  (older variant — unverified)
encoding_for_font("FMAbhaya")  # None  (Sinhala, not Tamil)

tamil_bamini_to_unicode("md;G")  # "அன்பு"
tamil_bamini_to_unicode("jkpo;")  # "தமிழ்"
tamil_shree_to_unicode("uªÌ")  # "தமிழ்"

Both converters are pure functions: no file, font, PDF or network access. Glyph codes they do not recognise pass through unchanged.

Supported fonts

encoding_for_font(name) strips a PDF subset prefix (ABCDEF+) and returns:

Result Fonts
"bamini" verified: NCTsunami, Kalaham, Geethapria, Baamini; unverified: NCEdisan, Bamini, Tharmini, Baami (name prefixes)
"shreelipi" SHREE-TAM7-0800, -0803, -0805, -1316, each optionally suffixed -SC<n> — verified variants only
None anything else, including unverified SHREE-TAM* variants

The Bamini family all share one keyboard layout; only the verified prefixes have been checked against rendered output. For Shree-Lipi only the listed variants have been checked — other SHREE-TAM* names return None rather than risk wrong conversion. See docs/supported-fonts.md.

The encodings, briefly

Both fonts store glyph codes, not characters, and encode pre-base vowel signs before their consonant (visual order). Bamini follows the font's typewriter keyboard (n/N/i markers + consonant + suffix glyphs); Shree-Lipi lays consonants out in sequential 6-7 slot blocks with ö/÷/ø markers. See docs/encoding.md.

Limitations

  • Only the fonts above are supported; other legacy encodings convert wrongly.
  • A handful of legacy-decoder quirks are deliberately reproduced for compatibility (e.g. \+ → 10, xs → ஒள); see docs/encoding.md — they may change in a future release.
  • Conversion can leave residual Latin glyphs or produce incorrect output on malformed input; it is not a validator.

Acknowledgements

Originally written for MurphyLearn.

Licence

MIT

Metadata

Release files for tamil-legacy-fonts 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tamil-legacy-fonts 0.1.0
File Size Uploaded Provenance Actions
tamil_legacy_fonts-0.1.0.tar.gz 54.7 kB Without provenance Details for tamil_legacy_fonts-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tamil-legacy-fonts 0.1.0
File Interpreter ABI Platform Actions
tamil_legacy_fonts-0.1.0-py3-none-any.whl Python 3 none any Details for tamil_legacy_fonts-0.1.0-py3-none-any.whl

Total release size: 70.4 kB

Release files / tamil_legacy_fonts-0.1.0.tar.gz

Download URL tamil_legacy_fonts-0.1.0.tar.gz
Size 54.7 kB
Tags Source
SHA-256 checksum
How to use checksums
afc5be8c0487b033a6547db3ba8b76d0e4aa81762ca670f8d0d0b441c9d1b472
BLAKE2b-256 checksum
How to use checksums
641e7dab5155ff8383419839c2d8f3e2391f8134c1cb4a575141bf06163cab4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.9

Release files / tamil_legacy_fonts-0.1.0-py3-none-any.whl

Download URL tamil_legacy_fonts-0.1.0-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3ac9d5db4c3cf9b7fc2b2446844138695f6fcbaad339685fb813fe3c490ad3a6
BLAKE2b-256 checksum
How to use checksums
275a1d850270f05135c2efb80f5c4400d094cae301f3f5442fffd94e1607af44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.9

Security for tamil-legacy-fonts 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page