Skip to content

Conversation

gordonwoodhull
Copy link
Contributor

fixes

mainfont has not been applied to the title since the implementation of typst brand yml in 1.6.

This fix prefers brand.typography.headings.family but falls back to mainfont

Perhaps we should follow the same precedence for brand.typography.base.family vs mainfont a few lines up

$if(mainfont)$
font: ("$mainfont$",),
$elseif(brand.typography.base.family)$
font: $brand.typography.base.family$,
$endif$

Filing this made me wonder if we should handle mainfont in typst-brand-yaml.lua instead, so filing this as draft and I think I prefer the next PR over this one.

@posit-snyk-bot
Copy link
Collaborator

posit-snyk-bot commented Sep 30, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Licenses 0 0 0 0 0 issues
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@gordonwoodhull
Copy link
Contributor Author

This stays closer to the Pandoc partial, and keeps logic there.

It's slightly messier logic than treating mainfont exactly like brand.typography.base.family as tried in

but probably easier to maintain anyway.

Will merge after #13470

@gordonwoodhull gordonwoodhull merged commit a672a1a into main Oct 3, 2025
51 checks passed
@gordonwoodhull gordonwoodhull deleted the bugfix/13474 branch October 3, 2025 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants