Fix #191 — probe available and resolved fonts - #205
Merged
Merged
Conversation
- CeolKitFonts.availableFaces(config:): registered, system (when enabled) and bundled faces, in search order; system faces described through CoreText, with the base-14 stand-in families probed by name since macOS hides some from enumeration. - RenderedDocument.fonts: per tune, what each kind of text asked for and got. - %%ceolkit:fontlist [resolved|available]: reports as info diagnostics at the directive, for the scope it is written in. - ckprobe: --fonts, --system-fonts, --font-file, and a per-tune fonts: section. 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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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 #191
Library
CeolKitFonts.availableFaces(config:) -> [FontFaceInfo](PostScript name, family, weight, style, origin, format, embeddable), in search order: registered → system (only withsystemFonts) → bundled.OS/2table rather than parsed (parsing every installed file took minutes; this takes ~3.5 s for ~880 faces). The Times/Helvetica/Courier stand-in families are also probed by name, because macOS hides Courier and Times from its font collection while a lookup by name still finds them.RenderedDocument.fonts: [TuneFontReport]— per tune, per drawn role: the requestedFontSpec, the directive's source, theFontResolutionused, the size, and a one-linesummary.%%ceolkit:fontlist [resolved|available]resolved; a bad keyword is a warning (invalidFontDirective) and the directive is dropped..infodiagnostics (new codefontList) at the directive's line; the page is unchanged.ckprobe
--fonts(no ABC file needed),--system-fonts,--font-file <path>(repeatable), and a per-tunefonts:section in the report and--json.Tests
availablelists, page unchanged).swift testpasses on macOS; the Linux leg (swift:6.3 Docker) passes with 1451 tests.🤖 Generated with Claude Code