Skip to content

v0.23.0 — Review fixes: glyph-fallback weight, Korean breaking, error typing

Choose a tag to compare

@edadma edadma released this 25 Jul 03:29

A minor release: the fixes from a whole-codebase review. Two of them are user-visible, and one removes a public type.

Breaking change

ParserException is gone, folded into TexishException (io.github.edadma.texish). Catch that instead. The two types encoded one concept — differing only in whether a source position was known yet, which is a field and not a type — and the name was a leftover from when the parser was a separate library, reading oddly on an error about a font.

Fixed: bold and italic were dropped on Cyrillic and Greek

A codepoint the current face has no glyph for is set from the fallback face (New Computer Modern). That substitution always used the fallback's regular cut, so Cyrillic or Greek inside a bold or italic run silently lost its weight and slant — in a single \bold{Привет Bold} the Cyrillic set regular while the Latin beside it set bold, breaking the weight mid-phrase.

The fallback now resolves the cut matching the surrounding text, and the bold, italic and bold-italic cuts of New Computer Modern are bundled so there is one to resolve to. The family role is deliberately not carried over: the fallback stands in for a face's coverage, not its family, so Cyrillic inside \mono is set in the fallback's roman rather than being sent to the typewriter family, which is no likelier to have the glyph.

Fixed: unspaced Korean ran off the page

Korean breaks at its interword spaces like Latin, which is right for prose but left no escape hatch: a run with no space in it — a long compound, a spaceless title, a very narrow column — had no legal breakpoint at all and overflowed the measure.

A break between two Hangul syllables is now offered at a heavy penalty, so the breaker takes one only when no break at a space can be made to fit, the same bargain TeX strikes with hyphenation. Ordinary Korean prose is untouched: at a normal measure it breaks on exactly the same words as before.

Fixed: a bug in texish was reported as a mistake in your document

Every failure used to arrive as the same thing. The processor caught RuntimeException indiscriminately and reported whatever it found at the current token's position, so a null dereference in layout was presented to the author exactly as a misspelled font name was — and the original exception was dropped, taking with it the stack trace that would have located the bug.

TexishException now marks the errors texish raises on purpose, where the document is at fault. Anything else escaping the engine is labelled internal error (…), names the exception class, and keeps the original as its cause. For an embedder the two are worth telling apart: one is your user's mistake to fix, the other is a bug report.

Added

  • aliasTypeface(alias, target) — a typeface with a second name (\font hindi, \font korean) now shares the faces its family already opened instead of loading the same files again under the new name.

Docs

The glyph fallback is now documented in the command reference (Cyrillic and Greek set in ordinary text with no setup), and the installation guide describes how errors reach an embedder.

Suites are green at JVM 1398. Native CLI binaries for Linux (x86_64, arm64) and macOS (arm64) attach below; other platforms use the JVM build.