Skip to content
This repository was archived by the owner on Oct 21, 2026. It is now read-only.

Fix #47 — let the preview use the machine's installed fonts - #48

Merged
sbeitzel merged 2 commits into
mainfrom
feature/fix_47
Oct 8, 2026
Merged

sbeitzel merged 2 commits into
mainfrom
feature/fix_47

Conversation

@sbeitzel

@sbeitzel sbeitzel commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Fix #47

Summary

The preview now lets font directives find the machine's installed fonts. Before, %%wordsfont Courier-Bold 16 fell back to CeolKit's bundled Libertinus Serif, because SVGRenderConfig.systemFonts defaults to off. A monospaced font came out proportional, so columns lined up in the source (W: lines padded out to a |) didn't line up on the page.

Tests

New namedFontResolvesToInstalledFace: with %%ceolkit:fontlist resolved, the words font resolves to Courier-Bold. All 123 tests pass locally against CeolKit 2.0.0.

⚠️ Depends on a CeolKit bump

SVGRenderConfig.systemFonts first appears in CeolKit 2.0.0, and this branch still pins 1.9.1, so CI will fail until Tuist/Package.swift is bumped. Draft until then. The bump should go to the CeolKit release carrying sbeitzel/CeolKit#219 and sbeitzel/CeolKit#220 (beam fixes found with the same tune), then mise run get_licenses.

🤖 Generated with Claude Code

sbeitzel and others added 2 commits October 3, 2026 18:42
A font directive such as `%%wordsfont Courier-Bold 16` fell back to the
bundled Libertinus Serif, because the preview never turned on
SVGRenderConfig.systemFonts — so a monospaced font came out
proportional and columns lined up in the source did not line up on the
page.

The preview's config is now one shared `previewRenderConfig`, with
systemFonts on, used by the app and by the tests that track it.  Text is
still drawn as outlines, so the SVG still needs no fonts to display
(#33).  Needs CeolKit 2.0.0 or later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sbeitzel
sbeitzel marked this pull request as ready for review October 8, 2026 02:38
@sbeitzel
sbeitzel merged commit 60d4e2c into main Oct 8, 2026
1 check passed
@sbeitzel
sbeitzel deleted the feature/fix_47 branch October 8, 2026 02:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use the machine's installed fonts for text in the preview

1 participant