Skip to content

v0.36.2 — The converter your browser can actually reach

Choose a tag to compare

@donkanishka donkanishka released this 03 Sep 05:12
· 18 commits to main since this release
0d2cc9b

If you installed 0.36.1 and found conversion still broken, this is why. The converter in 0.36.1 was
correct. Your browser never loaded it.

Fixed

Nothing in the converter's directory carried a cache key. The worker, the Emscripten glue and the binary are
a matched set — the glue holds the import table the binary declares — and none of the three was versioned, so a
browser that had run an earlier release kept whichever copies it already had. Measured on a real install after
0.36.1: a current 815,926-byte binary paired with an 11,437-byte glue from 0.35.0, which cannot boot.

All three now carry the binary's own modification time. The panel puts it on the worker URL and the worker
forwards the same query to importScripts() and to locateFile() — necessary, because resolving a bare
filename against the worker's own URL drops the query. Versioning only the worker was tested and still failed
with module[entry] is not a function.

Reinstall could quietly take weights away. The install replaces a family's variant list rather than
merging into it, while the Google Fonts card chose its own defaults from the catalogue: the variable cut
whenever one existed, and weights 400 and 700. A family installed as five static weights therefore opened with
Variable ticked, and pressing Reinstall replaced all five files with one — silently. An installed family
now opens on what it actually has, so Reinstall means the same again, and changing the selection asks first
and names the variants that would go.

An upload whose file name the server rewrote never got a family. The panel adopted each file by the name it
sent rather than the name that was written. sanitize_file_name() turns spaces into dashes, so
Acme Sans Regular.ttf lands as Acme-Sans-Regular.ttf, and the adopt step skips a name it cannot find
without saying so. The font uploaded, appeared under Font files, and no family was ever created — which is why
only some uploads seemed to work.

Add variant scrolled away from the row it had just made. Generated CSS sits above the variants table and
grows with each face until it reaches its 320px cap, pushing the table down by however much it gained — 278px on
a family with one variant. Nothing moves once that block is capped, which is why smaller families did this and
larger ones never did.

Changed

  • Google Fonts opens on Latin rather than Auto, so families in different scripts are compared against the
    same sample. The library keeps Auto, where each family previewing in its own script is what makes a missing
    subset visible. Applied only until you touch the script row, and remembered after that.
  • The Font files toolbar drops its Format label, kept as the group's accessible name. Weights and
    Subsets keep theirs, where the tokens mean nothing alone.
  • A WOFF2 upload says it was left alone instead of passing without comment.

Also

CI now runs no-undef over the panel and the worker. It would have caught both runtime breaks this project has
shipped: 0.34.0's read-before-assignment and 0.36.0's reference to a variable the same release removed. Neither
node --check nor the boot check can see those.

Verified

The shipped pair was checked before this was written: booted in a real browser worker with both entry points
present, and Source Code Pro converted 210,312 → 73,816 bytes, 65% smaller, signature wOF2.