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

fix: replace wrong attribute in XCharter fontspec #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

FantasqueX
Copy link

I tried to compile resume.tex by myself. However, I met an error.

mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; ; nonstopmode; input XCharter' failed to make XCharter.tfm.
kpathsea: Appending font creation commands to missfont.log.

(/usr/share/texmf-dist/tex/latex/xcharter/XCharter.fontspec)

! LaTeX3 Error: The key 'fontspec-opentype/RomanFont' is unknown and is being
(LaTeX3)        ignored.

For immediate help type H <return>.
 ...                                              
                                                  
l.81 }

It looks like that an attribute in XCharter fontspec is wrong.

I noticed that XCharter package provides an official fontspec to allow users to use the font directly. So, I copied the content and made it available in this PR. Now it works fine.

One thing I'm still worried about is my texlive distribution doesn't think that XCharter font is available even if XCharter package is installed locally. I think the reason is that xelatex can only find fonts shipped with tex distribution by name, like "Xcharter-Bold.otf". Xelatex can also find a "general" font like "XCharter" if there is a fontspec file, while IfFontExistsTF cannot. If I want to use the system font XCharter, I have to link those otf files to my global font directory to make them available to the whole system.

I think a better way is to just use XCharter font but not check availability, because TexLive and MikTeX both ship XCharter package. I'm not sure whether I should open a new issue.

Some system information: This is XeTeX, Version 3.141592653-2.6-0.999994 (TeX Live 2022/Arch Linux) (preloaded format=xelatex).

Thanks for creating this awesome template!

@badcodebuilder
Copy link

Yes, you are right. There is, and was no key called RomanFont in key-value definition file, you can check that with git log -p fontspec-code-keyval.dtx | grep RomanFont

However, Github Action can really build it with RomanFont. Maybe it use some -ignore flags. so odd.

@matchy233
Copy link
Owner

Thanks for the fix! (And I'm sorry for the late reply)

I included local fonts hoping that people who did not install the XCharter package would also be able to compile without issues. But I guess this brings more trouble than convenience (as I have seen multiple people having difficulty with setting up fonts).

As you have suggested, I'll change the template to require XCharter.

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.

None yet

3 participants