Skip to content

Read the letters those languages use, and stop two ways of hanging - #3

Merged
tannevaled merged 1 commit into
mainfrom
bump-pdfkit-deps
Aug 27, 2026
Merged

Read the letters those languages use, and stop two ways of hanging#3
tannevaled merged 1 commit into
mainfrom
bump-pdfkit-deps

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

Measurements are being run now and will be added to this body before review.

pdffont v0.1.0 -> v0.3.0 and reader v0.4.0 -> v0.4.2.

Four measured defects were being shipped by this package:

  - Glyph names covering Czech, Polish, Slovak, Hungarian, Turkish,
    Romanian, Latvian and Lithuanian letters mapped to nothing at all, so a
    word came back a letter short and still looked like a word. Names
    spelling more than one character were refused outright.
  - A /ToUnicode map of 10 655 bytes could name 13 million codes: 1 054 MB
    and about ten seconds, per font, per page.
  - A 219-byte file with no trailer and an object numbered 2 147 483 647
    took 21.2 s to open while allocating nothing, so no memory limit
    stopped it.
  - InlineImage.Expanded walked the image dictionary in one pass, so a
    dictionary carrying both spellings of a key -- /W beside /Width -- had
    its winner picked by Go's randomised map iteration order. This package
    reads inline images, and Images therefore did not agree with itself
    from one run to the next.

The first and the last of the four change what this package hands back,
which is the whole of what it is for.
@tannevaled
tannevaled merged commit 13085bd into main Aug 27, 2026
1 check 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