by err4nt · 10y ago · 0 comments
I use web fonts everywhere and can't imagine trying to build any kind of layout relying on system fonts alone. When doing CSS I have to use a giant wishlist like this to try to target a 'nice' font on each system:
font-family: "Source Sans Pro", "Open Sans", Roboto, "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", "Myriad Pro", "Segoe UI", Myriad, Helvetica, "Lucida Grande", "DejaVu Sans Condensed", "Liberation Sans", "Nimbus Sans L", Tahoma, Geneva, Arial, sans-serif;
Or I could supply the font via @fontface and know it looks identical everywhere :)Your fonts and even colors could change. Webfonts are great and all til the idiot designer picks some "nice" ultra-thin that, while probably looked real sweet on his/her fancy Retina Cinema Display, looks like ass on mine.
> Your fonts and even colors could change. Webfonts are great and all til the idiot designer picks some "nice" ultra-thin that, while probably looked real sweet on his/her fancy Retina Cinema Display, looks like ass on mine.
A colleague made a comment: she's a Chinese speaker with great English. I'm an English speaker with pretty functional Chinese.
"Why are the letters so small. I don't even want to look at it."
This was a default setting. So we increased it to 16px. It was good. It is a pain reading in a script you're familiar with, but not intimately so you've read 1000s-10000s of thousands of words in it per day since childhood. Everyone in the office (in China) appreciated the change.
Then I got the reverse shock, of a colleague releasing an internal website in all I can describe as thin font, grey, light blue background, and around 10px. Chinese characters at 10px are a pain. A massive pain. And I felt the pain that my colleague experienced. He: "Oh, I see. But it looks cool." Me: "Look at how everyone in the office [native Chinese readers] bends their neck when they read this site."
This was an extreme difference, but also should be considered. If you're creating something for an international audience, accommodate those that may have grown up with a different script, and simply read differently. Not a different language - a different script.
[1] I credit this metaphor to http://idlewords.com/talks/website_obesity.htm
However, the web is more than just text articles, and the precise positioning and display of text is quite important for web applications. It's important for me to know if the text on a button is wrapping or being cut off, and even more important for me know that my application will look the same on every screen.
I set a 13px minimum font size in my browser (the smallest size I can read comfortably on my screen) and I constantly run into web applications that try to go for the level of control you describe and totally fail because they think 10ps fonts are a good idea. Of course my usual response is to close that tab and never use that web application again if I can help it.
Ultimately, web applications (particularly enterprise and other B2B services) are designed to replace a lot of functionality normally relegated to native applications. While it is important to present a nice, clean interface, material design UIs with nice, large fonts and generous margins won't let me show what I need to show without making the user search through menus or scroll across a massive page.
That's my whole point. It's a superfluous concern.
I tell my browser what font to use. I want it to render correctly. I know what does. You probably choose something that doesn't.
* website navigation often contains text
* User-Interface controls often contain text
I'm less concerned about trying to have my lines break in the same place or having the perfect kerning, but if giving the browser some good fonts to work with can cut down a whole ton of tricky, ongoing, hard-to-debug, hard-to-test edge cases then it's a no-brainer!
I still give the whole wishlist, so if for some reason there's no access to google it still does the best it can - my argument is that a professional/commercial web design in 2016 can't lack web fonts because it will co$t more not to have them in developer time. I am that guy that gets paid hourly to track down those bugs.
The other bit of CSS that ought to be on every website EVER, is:
*,
*:before,
*:after {
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-kerning: auto;
}
That bit of CSS is a little bit of magic that makes fonts look the same everywhere, and better than default. This means `font-weight: 500` looks the same in Safari, Chrome, and Firefox, on Windows, on iOS, everywhere. I almost always use `font-weight: 400` as my lightest weight.I've got a bunch more of my snippets here: https://gist.github.com/tomhodgins/27c29ecb4aceaefe5cdf
> Do you also use a fixed width div holding everything? One no wider than a VGA screen?
Also got a giggle out of this one - I specialize in responsive web layouts, my job is making fixed-width layouts work on phones and tablets, hundreds of devices to make more $$$ :)
My websites would fare a lot better unstyled than most websites built on top of frameworks like Bootstrap and their 'classy' HTML, but it's still not going to look good without CSS and no online business is going to make more money without CSS than with it.
I'm a big fan of terse, straightforward HTML, plus nice CSS on top of that. I've made (and get a lot of use out of) a basic.css stylesheet I built that supports a few basic themes: http://staticresource.com/basic-test.html
Let's see some of your HTML J_Darnley :)
http://alanhogan.com/bookmarklets#subpixel
(Note: my idiotic web host broke my SSL and this bookmarklet isn't working on HTTPS pages at present. I hope to fix this within the next month.)
http://stackoverflow.com/a/12430050
Some of the problems I listed there are less important now that Windows XP is increasingly just a bad memory but I'd strongly recommend using the standard CSS font-features flags to enable whatever your design depends on.
And using a fixed-width DIV -- or cramming everything into a TABLE cell in the old days -- has been recognized as a remedy to one of the Web's most glaring typographical bugs: the tendency to expand the text flow to the width of the browser, which fucks with a human reader's ability to scan the text.
Graphic designers who don’t get the web need new jobs.
We still live in this world. Chrome isn't even internally consistent, hitting reload in the same browser will sometimes give you different kerning.
HTML+CSS is not pdf, even with webfonts.
If that is what one wants, use PDF. Seriously.
I expect that User Agents will continue to give the user the option of overriding any and all styling the fetched web page wishes to apply until long after I am dead.
Where is the option to disable CSS in Chrome on Android?
Which then get reintroduced when the font doesn't load or it gets replaced by local fontconfig. Even though many people like to pretend otherwise, the web is semantic markup, not a precise layout tool. The client controls the rendering - CSS (and the markup) is only a suggestion.
The truth is, some fonts like Source Sans Pro, Open Sans, Source Code Pro, and PT Serif are actually of better quality than most system fonts as well - so not only are you moving toward a font that is going to show up better, but you get the same font everywhere - making sizing and spacing a LOT more predictable.
> the web is semantic markup, not a precise layout tool
Yes, this is how I introduce it to others: http://codepen.io/tomhodgins/post/an-introduction-to-html
I get paid lot to fix these problems so really it's in my be$t intere$t to tell you NOT to use web fonts, and to hire me over and over again fixing sizing and spacing bugs that pop up like whack-a-mole for $$$/hour … but I'd rather be building new things than duct-taping old solutions. If you don't want to have to hire me, use web fonts from the start. It's how I'm going to come in and $olve the problem for you, so why not $ave your$elf the trouble :)
Which means you're ignoring the people that either block GA specifically or don't run javascript.
> how could you even possibly keep track of what system fonts they all have available?
You don't. That's why you design for em/ex/rem units, or use designs that don't care.
> are actually of better quality than most system fonts as well
That's personal opinion.
> but you get the same font everywhere
No, you don't. For example, I have a long list of entries like this in my ~/.fonts.conf
<match target="pattern" >
<test name="family" qual="any">
<string>Helvetica Neue</string>
</test>
<edit name="family" mode="assign_replace">
<string>Ubuntu</string>
</edit>
</match>
You also don't know if the CSS or webfont actually loaded - you shouldn't ignore network errors.CSS declares special pseudo fontnames like serif, sans-serif, monotype that you can set as a backup font. They should work in all browsers.
> I get paid lot to fix these problems so really it's in my be$t intere$t to tell you NOT to use web fonts, and to hire me over and over again fixing sizing and spacing bugs
It only means the person that programmed original CSS code was not qualified enough to do this properly. Why "fix" this by adding multikilobyte download instead of fixing the code?
I think a good layout/design that works with system fonts alone ought to be considered a greater success than a pixel-tight layout that only works with 1 forced-download font that eats up bandwidth, or a questionably "cheaper to support" layout that has a 275-character-long font-family rule.
Simpler, yes. Cheaper, no, not if you're a business that makes money from their website.
> I think a good layout/design that works with system fonts alone ought to be considered a greater success than a pixel-tight layout that only works with 1 forced-download font that eats up bandwidth
Me too from a technical standpoint, however there is no system font in the same quality as the web fonts I use available on most systems. I'm supplying a font that fixes font issues, it would be amazing if I could install better fonts on every system in the world so I didn't need to supply it.
> a questionably "cheaper to support" layout that has a 275-character-long font-family rule.
Oh that font rule still goes in there in case there's any issue with the webfont. That wishlist I posted is right out of my own CSS files, that's what I use. I can guarantee you that using that font stack with Source Sans supplied via fontface _will_ look better on every system than whatever system font would display from that list if Source Sans is missing. It's literally the best produced font I've ever used (in a technological way, I'm not even considering style here) which makes it very versatile.
I design things all the time that don't include webfonts, it's called my non-professional work. In 2016 if you're paying a professional to create a web layout and they aren't supplying you with a professional-level typeface to work with inside layout, they aren't giving you a complete frontend solution.
They are, but they are opinions based on a decade and a half of working with these technologies, and being currently employed as a specialist in responsive CSS. I'm not just giving you my opinions, I've been linking directly to open-source solutions I get paid to provide for clients. No pitch, I've done the opposite—I've given you the jewels. You won't need to hire me to fix these things now if you use my code for free ;)
> Yet you continue to deliver these rationalizations as if they're incontrovertible facts.
Based on hundreds of hours of testing across different browsers and devices, you're going to have to trust me that what I have left is thoroughly tested and proven to work.
I have nothing to gain or lose from what I've said here, but some of the insight and code samples I've provided might help people avoid or fix a whole class of common website bugs - the kind that are hard to reproduce, and hard to test because they usually pop up on exotic hardware or software configurations.
I Hope my opinions, tested code, and experience have helped some professionals in this thread :)
I'm curious how you would approach building a website that isn't broken when viewed on dozens of devices and browsers. Do you have any opinions, code, or suggestions to contribute to the discussion?
By the way I think downloadable fonts should not be used on technical sites and manuals. As a user I would like to get information as fast as possible and custom fonts make page display slower - browser doesn't render text until font is loaded. It would be nice if Chromium allowed to disable loading fonts on a per-site basis as it does with javascript (which I have disabled by default).
German vs Japanese makes a bigger difference than a font with half a pixel more kerning.