Repository navigation
feat(dsl): set the theme body and heading fonts from Presentation - #484
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
A deck could only set a font on each Text, so its charts kept the theme's Calibri. Presentation fonts calls setPresentationFonts, which text, tables and charts without a font inherit, and keeps the theme's East Asian fonts, unlike a chart textStyle.font.
baseballyama
force-pushed
the
feat/dsl-presentation-fonts
branch
from
October 25, 2026 05:36
2f21a6b to
9347b57
Compare
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.
Summary
<Presentation fonts={{ minorLatin, majorLatin, ... }}>sets the theme font scheme through the existingsetPresentationFonts, so text, tables and charts that name no font follow the deck's body font. Before, the DSL had no way to set theme fonts, and charts kept the theme's Calibri while everyTextwas written in another font.Motivation
In a slide-generation benchmark every deck set
font="Arial"on eachTextand left charts alone, so chart labels were Calibri next to Arial body text (a reviewer flagged it once, but it happens in every deck). Two possible fixes were considered:textStyle.fontto the body font: rejected.ChartTextStyle.fontwrites the same typeface into<a:latin>and<a:ea>, so Japanese chart text would be pinned to Arial instead of the theme's East Asian /Jpanscript font.minorLatin(what chart text inherits): correct, but the coresetPresentationFontswas only reachable from the DSL throughRaw.So this exposes the existing core capability on
Presentation, next totheme(colors), instead of adding a parallel chart-level default.Checked with LibreOffice on a benchmark deck: with the theme's
minorLatin/majorLatinset to Arial, the combo chart's axis, data labels and legend render in the Arial substitute (Liberation Sans) instead of Carlito, and the Japanese text is unchanged.Changes
PresentationProps.fonts?: PresentationFontsInput, applied afterthemewithsetPresentationFonts(first-theme semantics, same astheme).packages/dsl/README.mdandskill/references/tsx.mddocument it and recommend setting the body font there so charts follow.Testing
test/dsl-presentation-fonts.test.ts: compiles a deck withfontsand a chart; the theme reads backminorLatin/majorLatin= Arial, the East Asian slot is untouched, the chart names no font of its own; omittedfontsleaves the theme as created.test/dsl.test.ts, neutral-wording tests pass.Breaking changes
None. New optional prop.
Checklist
flagged it above.