From 1c060e3801fc366afe597e72e74385fe2e094b12 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Thu, 27 Aug 2026 11:46:53 +0200 Subject: [PATCH] Read the letters those languages use, and settle three other things pdffont v0.2.0 -> v0.3.0, reader v0.4.1 -> v0.4.2. A form is filled in with text, and read back as text. Glyph names covering Czech, Polish, Slovak, Hungarian, Turkish, Romanian, Latvian and Lithuanian letters mapped to nothing at all, and names spelling more than one character -- a letter and its accent, a Hebrew cluster -- were refused. An appearance is drawn from those names, so a value this could not spell was a value nobody could see. The same pdffont release bounds how many codes one /ToUnicode map may name: 10 655 bytes of it used to produce 13 million entries, 1 054 MB and about ten seconds, per font, per page. reader v0.4.2 fixes InlineImage.Expanded, which let Go's randomised map iteration order decide between both spellings of a key -- /W beside /Width -- so the same file read five different ways in eight runs. A .gitignore comes with it. This is the only module of the family without one, which is how a coverage profile nearly went in with this commit; the other five all ignore exactly this file. --- .gitignore | 1 + go.mod | 4 ++-- go.sum | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2d83068 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +coverage.out diff --git a/go.mod b/go.mod index d6b9f60..5b37eb2 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,6 @@ go 1.26.4 require ( github.com/go-opentype/fonts v0.9.0 github.com/go-opentype/opentype v0.9.0 - github.com/go-pdfkit/pdffont v0.2.0 - github.com/go-pdfkit/reader v0.4.1 + github.com/go-pdfkit/pdffont v0.3.0 + github.com/go-pdfkit/reader v0.4.2 ) diff --git a/go.sum b/go.sum index a86701e..588ff3e 100644 --- a/go.sum +++ b/go.sum @@ -2,7 +2,7 @@ github.com/go-opentype/fonts v0.9.0 h1:slB6OB3riLyUPrOxqXe0s6/AzdenF1TDvCN8N87hh github.com/go-opentype/fonts v0.9.0/go.mod h1:C6yQL2apHItfEZ5hztpsHF0S5mlX/hklLlq/Z5fRG/g= github.com/go-opentype/opentype v0.9.0 h1:GFgcJ3nwTDp4NJr5O+Paw7lhZx5Jv/R+noZwvhYDlkM= github.com/go-opentype/opentype v0.9.0/go.mod h1:AOixevJf7XQaH7+WG+OMIOZEbYPXfMqklVk26Y6YTUU= -github.com/go-pdfkit/pdffont v0.2.0 h1:yAp/oR5Z2kkqs4r0GWMalZMC7rc7XSCZXgwIypbpMWM= -github.com/go-pdfkit/pdffont v0.2.0/go.mod h1:y4vo5DgT95e57C3XxIWfA/xss+x6RwZwyj6KWdJc86s= -github.com/go-pdfkit/reader v0.4.1 h1:pRxFqRjsn7H/VsGfWb9nYWyFuDgTU2Pjmoq/f5mgVq4= -github.com/go-pdfkit/reader v0.4.1/go.mod h1:fQFOVfCMUui1AdvD4qhimdyvvNr9KvvJ1S7IuKZjyV8= +github.com/go-pdfkit/pdffont v0.3.0 h1:G5DKcAmsZJ0e17QhSrcUaL7PKEXKjUx4P/iGMl7bAbI= +github.com/go-pdfkit/pdffont v0.3.0/go.mod h1:bfmNLna1l1CljNX/Utg55YzFylovfmI7sJnvgA3bzKI= +github.com/go-pdfkit/reader v0.4.2 h1:0/qPShLzdG/roH4i13dwDTHnS7mEBVTaCBGwCZQhOH0= +github.com/go-pdfkit/reader v0.4.2/go.mod h1:fQFOVfCMUui1AdvD4qhimdyvvNr9KvvJ1S7IuKZjyV8=