Skip to content

Say whether the document gave a width, or whether it did not - #2

Merged
tannevaled merged 1 commit into
mainfrom
said-widths
Aug 25, 2026
Merged

Say whether the document gave a width, or whether it did not#2
tannevaled merged 1 commit into
mainfrom
said-widths

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

One of the fourteen standard faces is written with no widths at all — every reader is expected to know Times and Helvetica and Courier by heart. Of 113 140 unembedded fonts in the corpus, 39 431 are written that way.

A reader that draws a stand-in for such a font has to take the advances from the stand-in too, and it cannot do that without knowing which widths were the document's own. Width returns half an em for a code the document did not mention, and half an em for every letter reads as a typewriter — which is not what the page says.

HasWidth tells the two apart.

100% statement coverage.

One of the fourteen standard faces is written with no widths at all — every
reader is expected to know Times and Helvetica and Courier by heart. A reader
that draws a stand-in for such a font has to take the advances from the
stand-in too, and it cannot do that without knowing which widths were the
document's own.

Half an em for every letter reads as a typewriter, which is not what the page
says.
@tannevaled
tannevaled merged commit cb0a529 into main Aug 25, 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