Documenter.jl: Default font for REPL "output" produces poor alignment w/ box-drawing unicode

Created on 6 Apr 2021  Â·  9Comments  Â·  Source: JuliaDocs/Documenter.jl

E.g., using the PrettyTables package leads to unaligned columns, as below (see also examples in PrettyTables' documentation):
image
There's some issues with the font (is it Julia Mono?) not being truly monospace or with it falling back to another font perhaps.

In an ideal world, it would be possible to easily change the various fonts used in documentation (https://github.com/JuliaDocs/Documenter.jl/issues/973) - but having a genuinely monospace font for REPL display would be lovely in the meanwhile.
(If this is just a fallback issue, then #973 may be sufficient for this issue)

Most helpful comment

I would be in favor of using JuliaMono as the default font for code. It looks like JuliaMono is now available from a proper CDN so I assume infrastructure wouldn't be a problem?

It would at least be nice to include some docs on how to change it (e.g. https://github.com/JuliaDiff/ChainRulesCore.jl/pull/293)

All 9 comments

Duplicate of #618.

(is it Julia Mono?)

I hope not... :) If it were, it would look like this (macOS/Safari):

Screenshot 2021-04-15 at 10 57 56

I would be in favor of using JuliaMono as the default font for code. It looks like JuliaMono is now available from a proper CDN so I assume infrastructure wouldn't be a problem?

It would at least be nice to include some docs on how to change it (e.g. https://github.com/JuliaDiff/ChainRulesCore.jl/pull/293)

I've seen the (Google?) CDN for Lato/Roboto fail once (a Sunday morning a few years ago), so no system is going to be perfect... Given how awesome all the Julia package infrastructure people are, perhaps serving a few 800 Kb font files wouldn't be too much of an extra load? 😄

I mean, it seems to be available from https://cdn.jsdelivr.net/gh/cormullion/juliamono/webfonts/JuliaMono-Regular.woff2 so that shouldn't hit any Julia-related infrastructure at all, right?

Yes, that's the current CDN. It's just that that service appears to be intended more for (or mainly for) JavaScript and Node (NPM) packages. Should they ever decide to not support certain types of file, perhaps that would then be a problem. But that's true of most online services anyway, so ¯\_(ツ)_/¯...

I see. Would it be possible to use GH releases for individual files? I imagine GH has some type of CDN-like cache system too.

Actually, we can probably put it on something like https://julialang.org/assets/.... That website uses Fastly CDN I believe, so that should be fine.

Interesting idea - I'll open an issue and see what happens...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

galenlynch picture galenlynch  Â·  6Comments

mforets picture mforets  Â·  3Comments

asinghvi17 picture asinghvi17  Â·  3Comments

SimonEnsemble picture SimonEnsemble  Â·  3Comments

nalimilan picture nalimilan  Â·  4Comments