-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use sans-serif fonts in rustdoc #16207
Conversation
Rustdoc was previously using a serif font, Source Serif Pro. Sans-serif fonts are generally considered better for the web, so this changes rustdoc to use Source Sans Pro instead.
Personally, I like the current serif font. But I'm not sure if I like it because it's actually better or just because that's what I'm used to. |
Big 👎 from me. I like the serifs. |
Big 👍 👍 to make up for the previous two comments. |
👍 I never liked the font in the docs but I couldn't put my finger on why. But now I see that it's the serifs, looks much cleaner and more readable without them! |
👍 |
eeh i don't really like this. I've thought about sans serif text with serif headers, but it looks better the way it is. |
Really? Let’s see what typographers have to say here:
http://ia.net/blog/responsive-typography-the-basics/
So...?
Again: so what? The Racket Docs do and they were conceived by a professional typographer and type designer, Matthew Butterick (@mbutterick). Actually, he also did a redesign mockup of the Python docs with an extensive explanation; I would advise you to check that out to learn more.
Designers sometimes lack a proper knowledge of type and typography (which is sad because it's a core element of design). Now what do typographers say?
http://practicaltypography.com/body-text.html Now reading the original issue, I came across weird things, like this for example:
?? "But bad habits don’t become good habits through repetition."
http://blog.weare1910.com/post/72755990718/grids-from-typography The guys up here are designers but they know about type. They start on a grid and define the typeface before anything else happens. BTW, it’s always good to cc the person who added something when you’re removing it. Bottom line: if we are doing this here, I’d at least want it to be for good reasons (reason, reasoning… same root), not just “hey look, the websites I browse usually use a 14px sans-serif font…”. |
I’m not talking about readability here, I’m talking about style. Rust’s documentation shouldn’t have a style that seems too formal and (perhaps to some people) old-fashioned, it needs to look modern. In general I do actually prefer serif typefaces, however I consider sans-serif more appropriate for Rust’s documentation.
I mentioned that very redesign in the original thread: #16173 (comment). It uses sans-serif fonts. That’s not necessarily saying that we should definitely go with sans-serif, but it’s still a point. (Although your point that the Racket docs that the same person designed use serif fonts is equally valid.)
In reflection I’m not really sure what I was saying there. I suppose it has precedent, and people are used to it. These websites have at least some sense of design (MDN & GitHub, at least). But I do certainly agree that sticking with bad habits is a bad idea. This discussion is really about whether or not it is a bad habit. (I think there are some places where more serifs would be good, just maybe not docs.)
Sorry about that; it completely slipped my mind to notify you.
I agree wholeheartedly. I suppose my reason[ing] is something along these lines:
But design isn’t about hard-and-fast rules, it’s about opinions and ‘looking right’. The real question is whether or not it ‘looks right’ to everyone. |
I've seen other people on IRC agree that this particular font renders badly on linux. |
Let's see what people think. I see that the bold weight of Source Serif Pro got corrupted again… thought I had disabled git newline normalization but I don't know what could be causing it still. |
What is your OS and screen specifications, also browser? |
Arch Linux, 1366x768, chromium. |
Maybe try to install Bohoomil's Infinality bundle, it improves things for me when I'm on Ubuntu. Through it's way better than the on the pic you posted from the beginning (well I'm on a 1080p (22") monitor). EDIT: instructions are here. |
I'm not going to install Infinality just because this one font looks bad. First of all: infinality is buggy, leaks memory, and causes urxvt{,d} to crash. Second of all: Infinality is not a strict improvement over freetype2 in terms of font rendering. 15" |
Well the base infinality package has been unmaintained for over a year unlike Bohoomil's.
Saw better crispiness under Ubuntu, noticeably for the font-families having custom fontconfig settings.
Okay so that's not bad, it should be as bad as what you posted. Then again I've never used Arch so I can't really tell. |
Alternatively you can disable webfonts under chromium it seems: https://code.google.com/p/chromium/issues/detail?id=9633 |
I'm not sure how to do that and I doubt that an issue from 2009 is still relevant today. Either way: You chose to use this font for a reason I guess. Do you think it worked? |
I was not the person who chose to use Source Code Pro. But it's produced by Adobe and used in a lot of websites over the internet and it's the first time I see such botches. |
Really? I can't remember seeing it ever before.
Other people have reported similar problems with this font on linux. If this font was chosen to create a uniform, predictable, and good look, then it failed. Looking at this thread and the other one, its neither uniform nor predictable nor good looking. It even varies when you switch between chromium and fx on the same system. |
Okay.
On Arch Linux?
It failed for you on your system, you're making your particular case into a generality.
Because there are different font renderers out there, this is not an issue per se. When I switch to Windows font rendering get crispier because it blurs fonts less. In comparison Mac OS blurs a lot fonts, more than GNU+Linux. So even across platforms, it varies. |
Who knows.
The thing about uniformity and predictability is that they fail if there is even one case where the predictions don't hold.
Then don't try to do the impossible and let the user choose the font he likes best. |
Good thing they didn't do any promise about that.
No one has been willing to do that. |
The other thread makes this sound quite different:
|
Consistent does not mean displayed exactly the same. If your system's render displays fonts generally thicker, it will display the webfont the same way. You have consistency across what you see on your platform and so across fonts since all of them are displayed the same on your platform – given that your platform has software that works properly. |
FWIW: Some googleing suggests that ubuntu ships a patched freetype2 that makes Source Sans Pro look better. |
Looks like Arch has a package: https://aur.archlinux.org/packages/freetype2-ubuntu/ |
Does rustdoc not support vanilla freetype2? |
I do not know. But I don't remember of any problems using Ubuntu and webfonts, so this might help solving your problem, otherwise it should be reported to the Freetype developers. |
Sure.
Again: I can solve "my problem" by disabling this particular font. |
One of my primary complaints about the text is actually that the color for the text is dark gray instead of black and the resulting loss of contrast decreases readability for me. Especially at the small font size the text is at, contrast is essential. |
Too much contrast kiils it, most websites use #333 nowadays instead of #000 (talking abt doing like others…). Only headlines use #000. |
See also #16372 |
Closing due to inactivity, but please feel free to reopen! |
Rustdoc was previously using a serif font, Source Serif Pro. Sans-serif fonts are generally considered better for the web, so this changes rustdoc to use Source Sans Pro instead.
The reason I have made this change is that sans-serif fonts are significantly more common on the web than serif ones. Looking at Python’s docs, MDN, Java’s docs, and practically any random website I come across, I see nothing but sans-serif fonts for the body text. Many websites seem to recommend using sans-serif fonts for the web. (It should be noted that all of those sites themselves use sans fonts for the main body text!) Sans-serif fonts also give a more ‘modern’ feel, which certainly fits with the rest of rustdoc’s design and Rust in general.
This is a controversial change; any opinions would be appreciated.
cc #16173