-
Notifications
You must be signed in to change notification settings - Fork 481
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
Monospace font "faux" bolding causing alignment issues in some cases #1780
Comments
Cool detective work! I wish I understood all this stuff better. One thing I don't get - how is Federico managing to get bold and italic monospaced markup into Documenter .md files? I'd quite like bold keywords ... 😃 |
Probably this is just a result of #1441. I think before that, (but after switching to JuliaMono) this wasn't a problem. See #618 which was closed by using JuliaMono as the default font. |
Yeah, it looks like But on that topic, is there an easy way to apply custom CSS to a Documenter.jl-generated site? Because for this particular issue, it seems like the fixes would either be:
I'd be happy to help implement whatever approach seems best; I'd just need some pointers for making option 1 work, because I'm not very familiar with Documenter.jl yet. |
While Chrome seems to do the faux-bolding correctly on Linux, I can replicate the problem with Firefox. Switching to Since the switch to JuliaMono predates the ANSI printing, I think that is why this went unnoticed until now. I think the argument to use @mostol, would you like to make the PR updating the URL? While we're at it, we could probably bump the JuliaMono version to |
A nice idea in theory, but the months of work involved make my arm hurt just thinking about it... :)
I would have thought you want to use only JuliaMono-Regular, JuliaMono-Bold, JuliaMono-RegularItalic, and JuliaMono-BoldItalic (3Mb), rather than download the whole set ("only" 11Mb)? Adding custom CSS is easy (well you know what I mean). In Luxor.jl ’s documentation I added an asset to the make.jl file here to enable ligatures in code. |
I am pretty sure you're right in that this would be sufficient to fix the issue, but it would mean maintaining the relevant |
Previous CSS file only supported JuliaMono Regular, which could create some spacings issues (see #1780). Now light/bold/italic font variations should use the proper font files, instead of faux-bolding/italicizing.
Hi! I was looking into some alignment issues with the docs for the Term.jl, package which uses Documenter.jl. From what I can tell, the source of the problem is that (in some browsers, at least,) when the default JuliaMono typeface is bolded, it uses the browser's "faux"-bolding technique, which can mess up the alignment on what should be a universally-monospace font. See my comment on that issue if you want a more detailed description of what I'm running into.
It looks like Documenter.jl is using a small
@font-family
ruleset as defined in the JuliaMono repo, but is only usingJuliaMono-Regular
(see #1569):Documenter.jl/src/Writers/HTMLWriter.jl
Line 525 in bffc866
Would it be a good idea to change this to use the
juliamono.css
file instead ofjuliamono-regular.css
to ensure all font weights are properly monospaced across browsers/devices?The text was updated successfully, but these errors were encountered: