rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.92k stars 12.78k forks source link

Rust docs should at least have the option of using sans-serif fonts #52449

Open ghost opened 6 years ago

ghost commented 6 years ago

Edit: When I say "docs" I mean the standard library docs. The font in places like "The Book" is absolutely fine.

I'm sure I've seen this brought up in the issues before, but I don't seem to be able to find those issues anymore because I can't remember what I searched, so I hope you don't mind me creating a new issue for this.

Currently the rust docs only really display all text in a serif style font, which is extremely difficult to read, especially when there are large sections of bold text.

I understand that this may be a deliberate design decision, but unfortunately it makes it hard for people like me (no disabilities, just bad eyesight) to read anything. In my case I don't care about the design, I just want to be able to read the text without straining my eyes.

If the docs can't be changed to a sans-serif font by default, then could an option at least be provided to change the font to a sans-serif one instead?

Even the default font-family: sans-serif; is fine. Anything but serif will do for me.

Currently when I open the docs I have to open the inspector in Chrome and apply font-family: sans-serif; to the entire site just to get anything done. This works but I shouldn't really have to do this in the first place.

A serif font is fine for short pieces of text, like titles for example, but for the main body of text I hope a sans-serif font option can be seriously considered.

I hope I'm not missing anything. If there's already an option to do this then please let me know.

scottmcm commented 6 years ago

Maybe just use the default font in the user's browser? Though personally I just override all fonts anyway...

hellow554 commented 6 years ago

I think we should hear @GuillaumeGomez for his opinion.

IMHO: I really think, that serif fonts are good for large block texts, because they will help you with read flow. This is my opinions and I have the feeling, that it does not suits you. Code and captions are always sanserif. I think the best solution would be a browser plugin, that will give you the option to replace the font (not manually, but you create a rule for a certain website).

GuillaumeGomez commented 6 years ago

I can add a setting to allow the switch if you want? Well, if I find it more comfortable to read, I'll set it as default. :)

ghost commented 6 years ago

@hellow554 I did think of using a plugin for myself, but in general websites use sans-serif because it's more readable for more people in large blocks of text, so I'm sure I can't be the only one that has a problem with the font in the standard library docs.

In that case I thought it would be best if the docs either changed to sans-serif or at least provided an option to change for people who can't read serif fonts easily (like me).

Another minor reason for a font face change could also just be out of consistency. I don't keep up with the development of the Rust language itself too closely, but from what I've seen people seem to value consistency here, so it's strikes me as odd that the docs and the books, which all get lumped together on the initial page after running rustup doc, don't have consistent font faces. It's a bit jarring to jump between them so suddenly (and I prefer the font faces in places like "The Book" anyway).

@GuillaumeGomez If the font can't be sans-serif by default then some kind of option somewhere would be great. As @hellow554 pointed out it would be possible for users to just install a plugin in their browser and customise it themselves, but an option somewhere on the page that sets a cookie to remember font choice would be the best solution since it doesn't require users to know how to customise their browser.

steveklabnik commented 6 years ago

The book is the odd one out here; Fira Sans is used for most things Rust.

On Jul 19, 2018, at 2:21 AM, Jake Lucas notifications@github.com wrote:

@hellow554 I did think of using a plugin for myself, but in general websites use sans-serif because it's more readable for more people in large blocks of text, so I'm sure I can't be the only one that has a problem with the font in the standard library docs.

In that case I thought it would be best if the docs either changed to sans-serif or at least provided an option to change for people who can't read serif fonts easily (like me).

Another minor reason for a font face change could also just be out of consistency. I don't keep up with the development of the Rust language itself too closely, but from what I've seen people seem to value consistency here, so it's strikes me as odd that the docs and the books, which all get lumped together on the initial page after running rustup doc, don't have consistent font faces. It's a bit jarring to jump between them so suddenly (and I prefer the font faces in places like "The Book" anyway).

@GuillaumeGomez If the font can't be sans-serif by default then some kind of option somewhere would be great. As @hellow554 pointed out it would be possible for users to just install a plugin in their browser and customise it themselves, but an option somewhere on the page that sets a cookie to remember font choice would be the best solution since it doesn't require users to know how to customise their browser.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

lolbinarycat commented 3 weeks ago

triage: headings use Fira Sans, but the body text still uses serifs.

playbahn commented 2 weeks ago

What's the name of the exact font? I plan to use it with Dark Reader. (odd one out here, I like the sans font used by docs.rs and the rust library docs, it's just more comfortable for me.)

lolbinarycat commented 2 weeks ago

the font stack used by rustdoc's css is "Source Serif 4",NanumBarunGothic,serif