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
Rust docs should at least have the option of using sans-serif fonts #52449
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.
Reacted by Nick Korsakov, Koutheir A., Kiryl Dziamura, simonla, Gaurav Kumar, Yury Gorishniy, runiq and Danny Kim
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).
On Jul 19, 2018, at 2:21 AM, Jake Lucas ***@***.***> 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.
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.)
Is there any progress made here ? Choosing a non-serif font optionally would be as important to me or more important than choosing between two different dark themes (though i love and use ayu).
Its incredibly uncomfortable to read the time new roman style fonts on the site interspersed with non-serif fonts.
Activity
scottmcm commentedon Jul 17, 2018
Maybe just use the default font in the user's browser? Though personally I just override all fonts anyway...
hellow554 commentedon Jul 18, 2018
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 commentedon Jul 18, 2018
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. :)
steveklabnik commentedon Jul 19, 2018
lolbinarycat commentedon Nov 6, 2024
triage: headings use Fira Sans, but the body text still uses serifs.
playbahn commentedon Nov 10, 2024
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 commentedon Nov 10, 2024
the font stack used by rustdoc's css is "Source Serif 4",NanumBarunGothic,serif
matthiasg commentedon Nov 29, 2024
Is there any progress made here ? Choosing a non-serif font optionally would be as important to me or more important than choosing between two different dark themes (though i love and use ayu).
Its incredibly uncomfortable to read the time new roman style fonts on the site interspersed with non-serif fonts.
also it would be nice to offer some built-in options to make the comments more lively (within reason). Similar to badges or e.g https://vitepress.dev/guide/markdown#custom-containers
GuillaumeGomez commentedon Nov 29, 2024
Completely forgot about it. Gonna use the fonts used in mdBook as they seem to be appreciated here.
GuillaumeGomez commentedon Nov 29, 2024
Opened #133636.
Rollup merge of rust-lang#133636 - GuillaumeGomez:sans-serif, r=rustdoc
Rollup merge of rust-lang#133636 - GuillaumeGomez:sans-serif, r=rustdoc
Rollup merge of rust-lang#133636 - GuillaumeGomez:sans-serif, r=rustdoc
Unrolled build for rust-lang#133636
Rollup merge of #133636 - GuillaumeGomez:sans-serif, r=rustdoc