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

Possible solution to font cannot be found #146

Closed
rikhuijzer opened this issue Jul 30, 2022 · 1 comment
Closed

Possible solution to font cannot be found #146

rikhuijzer opened this issue Jul 30, 2022 · 1 comment

Comments

@rikhuijzer
Copy link
Contributor

The documentation suggests adding the following to LaTeX:

\newfontfamily \JuliaMono {JuliaMono-Regular.ttf}[
    Path      = /Users/me/Library/Fonts/,
    Extension = .ttf
    ]
\newfontface \JuliaMonoMedium{JuliaMono-Regular}
\setmonofont{JuliaMonoMedium}[
    Contextuals=Alternate
]

This does work, but assumes that JuliaMono is installed on the system so throws an The font "JuliaMono-Regular" cannot be found in a GitHub Runner (JuliaBooks/Books.jl#257, rikhuijzer/PlutoStaticHTML.jl#124).

The following does work on systems where the font is not installed globally.

\\usepackage{fontspec}
\\setmonofont{JuliaMono-Regular.ttf}[
    Path = $(juliamono_dir)/,
    Contextuals = Alternate,
    Ligatures = NoCommon
]

\\newfontfamily{\\juliabold}{JuliaMono-Bold.ttf}[
    Path = $(juliamono_dir)/,
    Contextuals = Alternate,
    Ligatures = NoCommon
]

For me this works now. I'm leaving this here for other people who will probably walk into this at a later point in time. Debugging LaTeX is hard.

@cormullion
Copy link
Owner

Thanks!

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

No branches or pull requests

2 participants