Skip to content
This repository has been archived by the owner on Nov 21, 2018. It is now read-only.

Font used for the website, to accomodate all languages #166

Open
AntouanK opened this issue Feb 11, 2015 · 19 comments
Open

Font used for the website, to accomodate all languages #166

AntouanK opened this issue Feb 11, 2015 · 19 comments

Comments

@AntouanK
Copy link
Contributor

The font currently used, Lato, does not have character subsets needed from other languages ( greek for example ).
So those languages will default to Sans-Serif and the text in the page will be a mix of two fonts.
Not cool.

Maybe we should choose another font? One that can have the characters we need for a proper i18n website.

@therebelrobot
Copy link
Contributor

I would suggest possibly a language specific style sheet that is included in the build for that language? Then they can @font-face include whatever font they want? I would probably want to restrict it to CDN'd fonts like Google Fonts to avoid the massive headache of font conversion and upkeep.

@silverwind
Copy link
Contributor

There are versions of Lato with the full glyph set available:

http://www.latofonts.com/lato-free-fonts/#download

These are quite heavy though, 300kB before gzip.

@Fishrock123
Copy link
Contributor

Hmm, well we can probably do locale+english for each i18n locale, that might work.

@AntouanK
Copy link
Contributor Author

@silverwind You're right. I'm wondering why they are not in the google fonts website.

@Fishrock123 Yeah, each i18n team will make a font with english + the subset they need.
So in CSS you can include that font only.
Or we can inline them with base64, to avoid making that extra call ( if you want to be performant for some reason )

@Fishrock123
Copy link
Contributor

Or we can inline them with base64, to avoid making that extra call ( if you want to be performant for some reason )

That's not guaranteed to be more performant though. :)

it's probably best to have each separate and marked as cacheable for a long time. Gzip actually makes the inital data overhead smaller.

@therebelrobot
Copy link
Contributor

+1 to not base64 encoding it. Though I still would prefer a CDN'd font rather than hosting ourselves. Whatever works for the teams, though.

@AntouanK
Copy link
Contributor Author

@Fishrock123 the inlined text will also be Gzipped, right? :P
Well, difference is really small anyway.

@silverwind
Copy link
Contributor

Google does offer a Latin Extended (latin-ext) subset, not sure if that's enough:

@import url(http://fonts.googleapis.com/css?family=Lato&subset=latin,latin-ext);

@Fishrock123
Copy link
Contributor

@silverwind definitely not enough, considering we have active Chinese / Japanese / greek / etc translations. :)

@silverwind
Copy link
Contributor

Lato-Regular.woff goes from 323172 to 312473 bytes after gzipping, so not much gains there. Converting to woff2 might shave off another 20%, but overall you're looking at 250kB gzipped per font weight :(

@Fishrock123
Copy link
Contributor

@silverwind woff is already compressed. :)

@silverwind
Copy link
Contributor

Yeah, probably not worth gzipping it at all.

@AntouanK
Copy link
Contributor Author

Forget the gzipping part.

All we (you) have to do is give the ability to every team, to include their font.
It's up to them to make a Lato font with English+whatever they need.

Then we can fight over perf stuff. :)

@aravindet
Copy link

Google’s Noto Sans fonts (http://www.google.com/get/noto/) provide a remarkably consistent look for many languages (similar stroke weights, for example). Localized sites in other languages may still need to include English for technical terms, and consistency between the fonts used for different scripts will be important.

These fonts are also available via the Google Fonts CDN.

@laosb
Copy link
Contributor

laosb commented Feb 16, 2015

One thing I need to say is, we shouldn't use web fonts on Chinese since the font files are very big (usually 2MB+). Since then, we need a lot fallback font family rules to make it looks nice on every platform and every browser. What's more, people in Mainland China can't use any Google services, including Google Fonts & APIs. It's not a good idea to choose Google for CDN service in this way.

@AntouanK
Copy link
Contributor Author

So, do we have any updates on the font issue? @therebelrobot

@silverwind
Copy link
Contributor

Just to weigth in on Noto: The chinese variants are like 20MiB each, so definitely out of question to serve these directly. I think a font stack of local "nice looking" fonts it the only way to go.

@AntouanK
Copy link
Contributor Author

@silverwind Sounds good. Waiting for the build step though so we can add a font...

@therebelrobot
Copy link
Contributor

Sorry, I've had an enormously busy week. I'll be looking into a build step for this today, though it may need to hold off until we begin the rebuild off the new website design #181

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants