-
Notifications
You must be signed in to change notification settings - Fork 482
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
Use DejaVu fonts in PDF builds #1066
Conversation
We also have missing Unicode symbols in the plain text part.
I also changed the sans-serif font to DejaVu Sans, since Lato is missing a lot of the necessary Unicode characters too. I would say that it looks good enough and my current feeling is that decent Unicode coverage is more important than having the most beautiful font. Here is an example of the main manual compiled with the DejaVu fonts: TheJuliaLanguage.pdf Just a note for future: Tex, unfortunately, does not seem to support fallback fonts (i.e. that if a particular character is missing, it would render it from a different font). The closest you have is ucharclasses for XeTeX, but it has two issues: (1) we are using LuaTex and it's XeTeX-only, and (2) it only allows setting different fonts for classes of characters but does not provide fallbacks for individual characters. |
DejaVu Sans Mono does not render the \xor symbol, so we actually create our own fallback system for this case where instances of this character get replaced by the \unicodeveebar command in the TeX source. \unicodeveebar then renders this character with DejaVu Sans. In principle, this is pretty easily extensible to other missing Unicode characters as well, should they come up.
DejaVu Sans Mono does not render the ⊻ symbol, so I actually created our homebrew fallback system for this case. Instances of that character get replaced by the In principle, this is pretty easily extensible to other missing Unicode characters as well, should they come up. Here is an example build which shows off all the Unicode characters reported in #803: Unicodetest.pdf @fredrikekre Any thoughts about this hack? |
Hello @mortenpi, I noticed that in PDF manual version 1.2, some characters aren't appearing, like: Function composition and piping The symbol: ∘ (sqrt ∘ +)(3, 6) Repeated Evaluation: Loops The symbol: ∈ for s ∈ ["foo","bar","baz"]
println(s)
end Is it resolved? Why new manual's version doesn't include the solution? Thanks. |
The 1.2.0 manual was still built with an older Documenter, so it did not have these fixes. With the latest Documenter, they render fine: We could potentially backport JuliaLang/julia#32376 to 1.2.1. Otherwise, 1.3.0 will definitely have this fixed. |
DejaVu Sans Mono seems to be available out of the box on Linux (at least on Ubuntu), so no need to worry about installing it on the Docker image etc. It provides good Unicode coverage in my experience -- this is the fallback font on Ubuntu and I have not noticed any missing symbols. From a font quality perspective, I don't actually see much difference between it and Roboto Mono.
Fix #803. Once downstreamed will fix JuliaLang/julia#31048.