You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Better web font for I (capital i) and l (small L) #933
The two "I" in the two red boxes are different. The first one is capital i, and the second one is small L. However, they look the same in the current font (I'm using Microsoft Edge on macOS. Not sure what they look like on other web browsers and platforms).
Should we switch to a better web font? Does the current theme "sphinx_rtd_theme" support custom web fonts?
I agree with you. I think it would just involve changing a couple lines in doc/build/_static/style.css. For example, this is the output for the vector example with this css style (which is currently set to open sans):
Good point, probably not. We can include multiple fonts in the font-family property as a fall-back and/or find an open source alternative to Tahoma that still makes those characters more distinct.
Agreed! I'd be happy w/ this and don't mind the zero with the slash. One concern I have is that it's on the smaller side, I'd suggest we bump up the font size a bit if we use this (easy).
Agreed! I'd be happy w/ this and don't mind the zero with the slash. One concern I have is that it's on the smaller side, I'd suggest we bump up the font size a bit if we use this (easy).
Increasing the font size sounds good, I'll look into the style.css file.
Also, should we/do we need a list of fallback font types if we serve the font directly? I.e. do something like font-family: "Atkinson Hyperlegible", "Tahoma", sans-serif;?
Thanks, @weiji14. I think having a slightly heavier font is fine and might even be better for small screens. Plus, then we don't have to serve the "light" font or whatever.
I think this looks great, adds a bit more style to our site, and hopefully makes it more readable too. But I think we should check with other @GenericMappingTools/python folks too!
Activity
maxrjones commentedon Feb 19, 2021
I agree with you. I think it would just involve changing a couple lines in
doc/build/_static/style.css. For example, this is the output for the vector example with this css style (which is currently set to open sans):I like Tahoma because it is sans-serif but still has differences between those two characters.
seisman commentedon Feb 19, 2021
Looks good. Does Linux support it?
maxrjones commentedon Feb 19, 2021
Good point, probably not. We can include multiple fonts in the font-family property as a fall-back and/or find an open source alternative to Tahoma that still makes those characters more distinct.
seisman commentedon Feb 19, 2021
It would be better if you can open a PR so that we can preview what the new font settings look like.
weiji14 commentedon Feb 20, 2021
Ok, here's 3 open PRs with new web fonts to preview:
Any other candidates 😆?
maxrjones commentedon Feb 20, 2021
The Atkinson Hyperlegible font looks great IMO
liamtoney commentedon Feb 21, 2021
Agreed! I'd be happy w/ this and don't mind the zero with the slash. One concern I have is that it's on the smaller side, I'd suggest we bump up the font size a bit if we use this (easy).
weiji14 commentedon Feb 21, 2021
Increasing the font size sounds good, I'll look into the style.css file.
Also, should we/do we need a list of fallback font types if we serve the font directly? I.e. do something like
font-family: "Atkinson Hyperlegible", "Tahoma", sans-serif;?liamtoney commentedon Feb 21, 2021
I think that it's best practice to include a fallback font regardless. I'd suggest just falling back to generic
sans-seriffrom Atkinson though.weiji14 commentedon Feb 21, 2021
Ok, done at f14a8e1. See https://pygmt-git-docs-fonts-legible-gmt.vercel.app/gallery/line/vector-heads-tails.html#sphx-glr-gallery-line-vector-heads-tails-py, compare with https://www.pygmt.org/dev/gallery/line/vector-heads-tails.html.
Font size looks better now. But maybe should tweak the font-weight down a little bit? Or is it ok?
liamtoney commentedon Feb 21, 2021
Thanks, @weiji14. I think having a slightly heavier font is fine and might even be better for small screens. Plus, then we don't have to serve the "light" font or whatever.
I think this looks great, adds a bit more style to our site, and hopefully makes it more readable too. But I think we should check with other @GenericMappingTools/python folks too!
seisman commentedon Feb 21, 2021
Looks good to me.