Hacker News new | ask | show | jobs
by fastball 3221 days ago
You should probably be loading the Roboto font via Google Fonts or similar, because my system does not have Roboto installed by default, so it is defaulting to serif in your comparison.

At least I think that's the issue.

2 comments

Roboto is already being loaded from google fonts (https://github.com/rsms/interface/blob/b91dd3af/docs/lab/ind...) However, I think Chrome might do something weird where it fails to actually load the font files when later the font family "Roboto" is requested (https://github.com/rsms/interface/blob/b91dd3af/docs/lab/ind...) — a common hack for this issue is to have an invisible element in the document that explicitly uses the font and forces the browser to load it at document-load time. Could try that hack here.

Anyhow, the version of Roboto served from google fonts is an older version and a subset of the "real" roboto, as can be fetched from roboto's source code repository. If you have Roboto installed locally, you probably have the more recent and more complete version installed and will likely want to compare with that (rather than what's on google fonts.)

Edit: https://twitter.com/stuartpb/status/900484392472109056 points out that @import must be at the beginning of a style declaration. Website has been updated.

If you have homebrew you can do: brew cask install font-roboto
You got downvoted because the issue is not that fastball doesn’t have Roboto on their computer; it’s the website assumption that everyone has it.
I'd say doubly, because no Cask with this name exists.

(Looks like you have to run

  brew tap caskroom/fonts
first :) )
That’s true; I didn’t try the above command :)