Skip to content

Better web font for I (capital i) and l (small L) #933

Closed

Description

@seisman

Description of the problem

See this page as an example: https://pygmt-6lvxfpcmx.vercel.app/gallery/line/vector-heads-tails.html

image

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?

Activity

  1. added
    bug
    on Feb 19, 2021
  2. maxrjones commented on Feb 19, 2021

    @maxrjones
    Member

    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):

    body {
        font-family: "Tahoma", sans-serif;
    }
    
    h1, h2, h3, h4 {
        font-weight: 300;
        font-family: "Tahoma",sans-serif;
    }
    
    image

    I like Tahoma because it is sans-serif but still has differences between those two characters.

  3. seisman commented on Feb 19, 2021

    @seisman
    MemberAuthor

    Looks good. Does Linux support it?

  4. maxrjones commented on Feb 19, 2021

    @maxrjones
    Member

    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.

  5. seisman commented on Feb 19, 2021

    @seisman
    MemberAuthor

    It would be better if you can open a PR so that we can preview what the new font settings look like.

  6. added
    a11y
    documentation
    and removed
    bug
    on Feb 19, 2021
  7. maxrjones commented on Feb 20, 2021

    @maxrjones
    Member

    The Atkinson Hyperlegible font looks great IMO

  8. liamtoney commented on Feb 21, 2021

    @liamtoney
    Member

    The Atkinson Hyperlegible font looks great IMO

    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).

  9. weiji14 commented on Feb 21, 2021

    @weiji14
    Member

    The Atkinson Hyperlegible font looks great IMO

    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;?

  10. liamtoney commented on Feb 21, 2021

    @liamtoney
    Member

    I think that it's best practice to include a fallback font regardless. I'd suggest just falling back to generic sans-serif from Atkinson though.

  11. weiji14 commented on Feb 21, 2021

    @weiji14
    Member
  12. liamtoney commented on Feb 21, 2021

    @liamtoney
    Member

    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!

  13. seisman commented on Feb 21, 2021

    @seisman
    MemberAuthor

    Looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a11ydocumentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions