[rustdoc] Add sans-serif font setting by GuillaumeGomez · Pull Request #133636 · rust-lang/rust (original) (raw)
I realized I was kind of terse. Here's a slightly more detailed opinion, along with the reason why I hold it:
- If you choose a body font, you need to choose a code font that goes with it, because Rustdoc mixes them freely in layouts like this one:
before after If you're not sure why I think "before" looks better, focus on the phrase "or target". - If we change something, we need to address the reasons why it was done that way originally. It's fine if the reason seems to be "nobody thought of it," but the choice of a serif font here was definitely deliberate.
As a user with bad enough vision that they won't let me drive a car, Fira Sans doesn't seem significantly more readable than Source Serif. This adds up, since, even though it's a serif font, Source Serif is supposed to be usable as a screen font. On the other hand, cataracts, astigmatism, and amblyopia are all "bad eyesight," but they have totally different effects. Just because it WorksForMe(tm) doesn't mean it works for anybody else.
I think this is why even relatively un-customizable apps like Apple Books have multiple font packs built in. It's few enough that they can make sure every one of them looks good, but diverse enough to satisfy the most common problems someone might have with extended reading.
I think we should add an option to the Settings panel to change the font, just like Pocket and Firefox's Reader Mode. This is because, when you consider the "bikeshedding effect," there really aren't that many people complaining about Source Serif.
Now that CSS Variables are being used, implementing this shouldn't actually be that hard.