Load font character sets on demand, based on language setting #24

Closed
lancewillett opened this Issue Apr 18, 2012 · 1 comment

Comments

Projects
None yet
1 participant
Collaborator

lancewillett commented Apr 18, 2012

We can optimize loading the Open Sans Google font files by only loading character sets needed for the current language, based on the current site's setting.

See http://www.google.com/webfonts/specimen/Open+Sans

"Includes the standard ISO Latin 1, Latin CE, Greek, Cyrillic, and Vietnamese"

We'd inspect the site's interface language setting, and then change the font call depending on the language

Possible options:

?family=Open+Sans&subset=latin'
?family=Open+Sans&subset=latin,latin-ext'
?family=Open+Sans&subset=latin,cyrillic'
?family=Open+Sans&subset=latin,cyrillic,cyrillic-ext'
?family=Open+Sans&subset=latin,greek'
?family=Open+Sans&subset=latin,greek,greek-ext'
?family=Open+Sans&subset=latin,vietnamese'

Or, we just only load "latin" for English, and load the full stack for anything else.

@ghost ghost assigned lancewillett May 23, 2012

Collaborator

lancewillett commented Jul 6, 2012

I'm not sure what the exact performance savings would be to do this—for now I'm recommending just loading the full files for everyone.

We can revisit later once in core.

lancewillett added a commit that referenced this issue Jul 6, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment