-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Adding a variable romanfont #4665
Conversation
It would be nice to have a possibility to set the romanfont in xelatex/lualatex over a variable since mainfont actually oversets sansfont in headings
Changed stupid mistake
MANUAL.txt should also be updated (search for |
@OvidiusCicero Would you mind providing an example of how you're using this? I can't reproduce the situation that you describe in the original commit, and am wondering if there is a better way to solve it. There is no documentation of pandoc -o test.pdf --pdf-engine=xelatex << EOT
---
title: Font Family Test
fontsize: 12pt
mainfont: Helvetica
romanfont: Palatino
sansfont: Gill Sans
monofont: Courier
---
# Fonts
The quick fox --- \the\fontdimen6\font\relax
\normalfont
The quick fox --- \the\fontdimen6\font\relax
\rmfamily
The quick fox --- \the\fontdimen6\font\relax
\sffamily
The quick fox --- \the\fontdimen6\font\relax
\ttfamily
The quick fox --- \the\fontdimen6\font\relax
EOT |
@adunning if you think this was a misguided change, then (after getting clarification from @OvidiusCicero) it would be good to open a new issue or PR, so this doesn't get lost. |
@adunning @jgm You're right in so far that the problem seems to be burried in the pandoc template and not within fontspec which is what I seemingly misunderstood 9 months ago Giving the whished result: test.tex
Hopefully reproducible minimum example: test2.md
Compile with
I ended up hardcoding it in my own temlpate I'm on a Windows 10 machine. The fonts are installed on the system. Probably using old version of pandoc
|
You're seeing that because the pandoc -o libertine.pdf -V mainfont="Linux Libertine" -V sansfont="Linux Biolinum" -V documentclass="scrartcl" --pdf-engine=xelatex << EOT
# Test should be in Linux Biolinum
Text, should be in Linux Libertine
EOT If that solves your problem, I hope you wouldn't have any objections to removing the |
Ah okay, that makes sense I find |
Thank you! This will prevent it from unexpectedly changing the font size on someone. There's no question that |
Simplify the approach of #5212, ensuring that `mainfont` is used as the base font for scaling and that LuaLaTeX does not display the mono font with TeX ligatures (as it does not use the `Mapping=tex-ansi` option). With a modified version of `\defaultfontfeatures`, fontspec will continue to report scaling against the old default font in the log, but it nonetheless displays main font at the specified size. Using this rather than setting `Scale=MatchLowercase` for each family individually means that users will not lose scaling when upgrading to the new template if they were using other font options. Scaling can be disabled for an individual family by adding the option `Scale=1` to `sansfontoptions`, `monofontoptions`, etc. Remove the `\setromanfont` command added in #4665, as this is not documented in the fontspec manual and appears to be a deprecated alias for `\setmainfont`. For the release notes, I should also add that one can imitate the previous appearance with `-V mainfontoptions="Scale=MatchLowercase"`.
It would be nice to have a possibility to set the romanfont in xelatex/lualatex over a variable since mainfont actually oversets sansfont in headings