Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minard mainfont not taking properly #114

Open
jimjam-slam opened this issue Oct 29, 2024 · 8 comments
Open

Minard mainfont not taking properly #114

jimjam-slam opened this issue Oct 29, 2024 · 8 comments
Assignees
Labels
ready-for-review A PR has been implemented and is ready for review and merge

Comments

@jimjam-slam
Copy link
Collaborator

Something I observed polishing up the YAML options is that the mainfont option appears to be escaped differently to how our font options are. It's causing the custom font for the Minard example not to take properly:

image

vs.

image

In the doc root, you can observe the variables:

--cr-narrative-font-family: et-book, Palatino, “Palatino Linotype”, “Palatino LT STD”, “Book Antiqua”, Georgia, serif;

[...]

--bs-body-font-family: et-book, Palatino, "" Palatino Linotype "", "" Palatino LT STD "", "" Book Antiqua "", Georgia, serif;

Not really sure why this is, or if I'm escaping improperly in the YAML 🤔

@andrewpbray
Copy link
Contributor

Good catch. Something we should be able to figure out with some sleuthing! I'll go ahead and move this to post-contest (or at least post-announcement), since it's non-urgent.

@jimjam-slam jimjam-slam self-assigned this Nov 1, 2024
@jimjam-slam
Copy link
Collaborator Author

I'm actually staring to suspect, based on the HTML reference, that the mainfont option is not designed to take a full comma-separated list of fallback fonts.

Following this up with the Quarto team!

@jimjam-slam
Copy link
Collaborator Author

Have filed as quarto-dev/quarto-cli#11268 (not an issue because I'm not sure whether it's intended behaviour from Quarto)

@jimjam-slam
Copy link
Collaborator Author

jimjam-slam commented Nov 1, 2024

I think the short-term might just be to list mainfont: et-book alone, though! Since it's hosted locally, it seems unlikely that the page would be available but not the font.

@andrewpbray
Copy link
Contributor

When I try this, I'm getting the navbar in et-book; it's overwriting cosmo, which makes sense. Should we just return to calling the font in the css file?

@jimjam-slam
Copy link
Collaborator Author

jimjam-slam commented Nov 20, 2024

This is now fixed in the latest Quarto pre-release: it turns out that they do the quoting for you, and if you quote font names yourself, they were doubling them up. The solution was to simply leave the quotes out and let Quarto add them, but as of v1.6.34 this is fixed.

That said, as you say, specifying mainfont on the doc overwrites the font for the navigation chrome too, not just the article. So I agree: let's return to specifying the custom font in the CSS :)

@andrewpbray
Copy link
Contributor

Ahhh, interesting. Well good to know!

jimjam-slam added a commit that referenced this issue Nov 20, 2024
@jimjam-slam jimjam-slam added the ready-for-review A PR has been implemented and is ready for review and merge label Nov 20, 2024
@jimjam-slam
Copy link
Collaborator Author

Fix in #146 — it's pretty small!

jimjam-slam added a commit that referenced this issue Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-review A PR has been implemented and is ready for review and merge
Projects
None yet
Development

No branches or pull requests

2 participants