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

Enable mainfont in default.yaml #134

Merged
merged 2 commits into from
Feb 16, 2023
Merged

Conversation

Skeeve
Copy link
Contributor

@Skeeve Skeeve commented Feb 15, 2023

This change allows the main font to be set via default.yaml as proposed in #131

@Skeeve Skeeve mentioned this pull request Feb 16, 2023
Comment on lines 228 to 230
if (docMeta.mainfont === undefined) {
out.metadata.mainfont = '-apple-system, BlinkMacSystemFont, Segoe UI, sans-serif';
out.metadata.mainfont = extMeta.mainfont || '-apple-system, BlinkMacSystemFont, Segoe UI, sans-serif';
}
Copy link
Owner

@mb21 mb21 Feb 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! that indeed seems to be bug... If I remember correctly, I added this line so that the HTML export via pandoc uses the same font as the preview. These fonts won't ever work with pdflatex... so probably the better fix would be the following?

  if (docMeta.mainfont === undefined && toFormat === 'html') {
    out.metadata.mainfont = '-apple-system, BlinkMacSystemFont, Segoe UI, sans-serif';
  }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll try.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And maybe the background color in the following lines can also be skipped for non-HTML?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. It works.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great, thanks!

@mb21 mb21 merged commit 2579a58 into mb21:master Feb 16, 2023
@Skeeve Skeeve deleted the feature/default-mainfont branch February 16, 2023 17:59
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