-
Notifications
You must be signed in to change notification settings - Fork 310
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
Add LaTeX Support for ligatures #59
Comments
@tonsky Do you know if Fira Code needed to implement any special OTF features to get contextual glyphs to work with the |
I have no idea but Fira Code repo has this wiki page https://github.com/tonsky/FiraCode/wiki/LaTeX-instructions. Maybe it can be useful |
I know this is a slightly old issue, but I’ve just stumbled on it after finding a solution on my own. I’ve been using this in my preamble:
With files named |
Ligatures are working out of the box for JetBrains Mono in TeX Live 2021. The ligatures in the following LaTeX file correctly appear in the PDFs produced by \documentclass{standalone}
\usepackage{fontspec}
\setmainfont{JetBrains Mono}
\begin{document}
=> #? <=
\end{document} They also work within However, copy-pasting and searching text with ligatures from the PDF does not properly work. For example, copying the arrow \documentclass{standalone}
\usepackage{fontspec}
\begin{document}
\begin{tabular}{ll}
JetBrains Mono & \fontspec{JetBrains Mono} => \\
Fira Code & \fontspec{Fira Code} =>
\end{tabular}
\end{document} Here is the generated PDF. I am using the latest stable version of JetBrains Mono (v2.242). PD: This copy-paste problem can be solved with |
At least for completeness, I write some findings about the copy and search issue:
This might be however not a problem of the font but of the LaTeX engines. In LuaLaTeX, if the JetBrains Mono font is loaded with the |
I can confirm that ligatures now work as expected. I am using
For anyone writing Kotlin, I prefer |
Fira Code supports contextual substitutions for rendering ligatures in LaTeX documents using the
verbatim
environment. Although the font renders correctly, ligatures do not appear to work out of the box with JetBrains Mono (or at least using the same configuration described by Fira Code).Tested on the following versions:
The text was updated successfully, but these errors were encountered: