JuliaDynamics / DynamicalSystems.jl

Award winning software library for nonlinear dynamics and nonlinear timeseries analysis

Home Page:https://juliadynamics.github.io/DynamicalSystemsDocs.jl/dynamicalsystems/dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FYI: font glitches - a very minor issue and probably slightly off-topic...

cormullion opened this issue Β· comments

Hi George!

I love reading your excellent documentation! (Even with all the Purple! 😈)

Just the other day, I spotted this little phrase, which took my interest:

Screenshot 2022-06-14 at 17 14 13

I think what's happening here is that, in the browser, your font stack looks to be font-family: "Source Code Pro", monospace. Unfortunately, Source Code Pro doesn't have the Braille characters at 0x2800-0x2831. So on my computer (MacOS), the first available font that has these characters is chosen. That's Apple Braille. Unfortunately the Apple Braille characters aren't the same width as the Source Code Pro characters, so the slight error accumulates along the line.

In VS-Code on MacOS, the default is to pick up one of the alternative Apple Braille fonts, with the blank spaces shown as well:

Screenshot 2022-06-14 at 17 11 59

Here, the font is Menlo (Apple's tweaked version of Deja Vu), which also doesn't have Braille characters. But the folks working on the xterm.js terminal have fixed this problem of the incompatible widths (here, I think!.

I don't know what happens on Linux or Windows - font substitution probably does similar things though...

So one solution to this might be to have a font that has Braille characters in the font stack of your CSS definitions. Two that spring to mind are Cascadia Code (also the default on Windows Terminal I think), and Iosevka. Everson and Pragmata cost money...

Thanks a lot! Purple is the best color in the universe hahahahaha

Okay, so I need to test adding Cascadia Code to this list: https://github.com/JuliaDynamics/DynamicalSystems.jl/blob/master/docs/make.jl#L54 . I'll try it out on the next PR and let you know if it works.

looks different but fonts are still misbehaving a bit:

image