This repository was archived by the owner on Oct 21, 2026. It is now read-only.
Repository navigation
Fix #47 — let the preview use the machine's installed fonts - #48
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #47
Summary
The preview now lets font directives find the machine's installed fonts. Before,
%%wordsfont Courier-Bold 16fell back to CeolKit's bundled Libertinus Serif, becauseSVGRenderConfig.systemFontsdefaults 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.previewRenderConfig = SVGRenderConfig(pageSize: .letter, systemFonts: true), used byrenderABCand byPreviewFontIndependenceTests.Tests
New
namedFontResolvesToInstalledFace: with%%ceolkit:fontlist resolved, the words font resolves to Courier-Bold. All 123 tests pass locally against CeolKit 2.0.0.SVGRenderConfig.systemFontsfirst appears in CeolKit 2.0.0, and this branch still pins 1.9.1, so CI will fail untilTuist/Package.swiftis 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), thenmise run get_licenses.🤖 Generated with Claude Code