Skip to content

v0.8.7 — canonical Kruti Dev 010 legacy Devanagari recovery

Latest

Choose a tag to compare

@Detective-XH Detective-XH released this 30 Jun 16:30
· 20 commits to master since this release
v0.8.7
fbb9b61

Added

  • GoPDF now recovers real, searchable Unicode Devanagari from a canonical-coded simple Kruti Dev 010 font — a legacy non-Unicode font common in South Asian (Hindi) statistical PDFs whose bytes otherwise decode to Latin gibberish (for example fodk instead of विका, or ,u-;w-,y-,e- instead of एन.यू.एल.एम.). Where the previous release only flagged such garble, Page.Words(), Page.Lines(), Page.Blocks(), Page.Tables(), and Reader.GetPlainText() now emit the intended script for these fonts. The remap uses a built-in byte→Unicode transducer ported from the SIL wsresources mapping data (MIT — see NOTICE); no font files or external dependencies are bundled, and zero-width joiners are omitted so the recovered text stays searchable. The legacy_font_text warning no longer fires on text that is cleanly recovered.
  • The remap is deliberately conservative: it fires only for a strict-legacy-named, simple, canonical-coded font whose current decode is non-Indic. Composite (Type0) Kruti, subsetted Walkman-Chanakya, and DevLys fonts are not remapped — they still decode to gibberish and still warn. Extraction output for every non-matched font is byte-identical to before. One edge case: on a page that overlaps a text column with a table in the same vertical band, a recovered table label's leading glyphs can bucket into an adjacent row; the numeric data and surrounding prose are unaffected.

Verify this release

This tag is signed with an ED25519-SK FIDO2 hardware key:

256 SHA256:duCP4h22hb2oNAZMaFhUlpq0j8+qBbZuaXnS99yUhkY (ED25519-SK)

All of the maintainer's trusted keys are published on the GitHub account, so the recipe below works for any release regardless of which key signed it:

curl -s https://api.github.com/users/Detective-XH/ssh_signing_keys \
  | python3 -c "import json,sys; [print('*', k['key']) for k in json.load(sys.stdin)]" > allowed_signers
git -c gpg.ssh.allowedSignersFile=./allowed_signers tag -v v0.8.7
# expect: Good "git" signature for * with ED25519-SK key SHA256:duCP4h22hb2oNAZMaFhUlpq0j8+qBbZuaXnS99yUhkY

Module integrity is independently guaranteed by the Go checksum database:

go mod download github.com/Detective-XH/gopdf@v0.8.7 && go mod verify