mdBook
mdBook copied to clipboard
Specific ligatures not working
Problem
In rust-by-practice code block i found that some ligatures of MonoLisa won't render and make the dots in ..= and .= invisible, where it should render like that
Steps
- Go on rust by practice
- Use monolisa font (or maybe some others)
- write
..=inside a code block
Possible Solution(s)
No response
Notes
it does work in monolisa playground and typst online editor, so i fugured it might come from here It does render inside of code block, but not input code block
Version
Could not figure out from the github repo
Thanks for the report! I'm not sure what monalisa is, but the fonts are defined by the book's CSS. In particular, code blocks use "Source Code Pro", which is a different font. If you are overriding the fonts, you will need to make sure they are overridden for all places fonts are defined.
sry, monolisa font*
Also, it's overriden everywhere on the page cause other ligatures work like arrows
to be more specific, it works everywhere here, except on line 7, where ".." disappears
and as you can see this specific ligature does work on the page, just inside those specific input code blocks
Hm, I don't see anything at https://github.com/sunface/rust-by-practice/tree/master/en that indicates that the font is being overridden, and the fonts are the normal fonts when I open the given link. Are you using a local override?
Regardless, we have noted issues in the past (like #1061) where the ACE editor is sensitive to the font that is used, and the CSS was adjusted to prevent those overrides.
yeah i'm locally overriding this
Have you tried enabling more font features?
Took a bit of searching but when you scroll down far enough, the specimens page of MonoLisa lists the font feature needed for each ligature set. For your case it seems to be SS17.