google / fonts

Font files available from Google Fonts, and a public issue tracker for all things Google Fonts
https://fonts.google.com
18.26k stars 2.62k forks source link

Google Chrome and Chromium ignore subset=all #110

Closed machsna closed 8 years ago

machsna commented 9 years ago

It appears that both Google Chrome and Chromium ignore the query string subset=all when selecting a font from the google font directory. This leads to the somewhat counterintuitive result that the display of a Google font directory font may be significantly worse on a Google browser than on other browsers, including Firefox or Safari.

Compare the following screenshots from http://unifraktur.sourceforge.net/ where Google Chrome and Chromium fail to properly display the character ſ:

OK? Screenshot Browser
No Faulty display on Google Chrome 44/OS X 10.10 Google Chrome 44 on OS X 10.10
Yes Correct display on Firefox 40/OS X 10.10 Firefox 40 on OS X 10.10
Yes Correct display on Safari 8.0/OS X 10.10 Safari 8.0 on OS X 10.10

The character ſ is supposed to be included by requesting the font with subset=all in the corresponding CSS file (see http://unifraktur.sourceforge.net/html-files/unifraktur.css):

@import url('http://fonts.googleapis.com/css?family=UnifrakturMaguntia|UnifrakturCook:bold&subset=all');

PS:

I do not know whether this is related to Chrome/Chromium's unicode-range ability or to #64.

Of course, it does not only affect whacky fraktur fonts, but any font with a wide character range, e.g. the font Judson that is intended to cover characters found in African languages:

OK? Screenshot Browser
No judson,chromium44,ubuntu15.04 Chromium 44 on Ubuntu 15.04
Yes judson,firefox40,ubuntu15.04 Firefox 40 on Ubuntu 15.04
Yes judson,midori0.4,ubuntu15.04 Midori 0.4 on Ubuntu 15.04

Or the font Voces that is intended to cover IPA characters:

OK? Screenshot Browser
No voces,chromium44,ubuntu15.04 Chromium 44 on Ubuntu 15.04
Yes voces,firefox40,ubuntu15.04 Firefox 40 on Ubuntu 15.04
Yes voces,midori0.4,ubuntu15.04 Midori 0.4 on Ubuntu 15.04

Here is a testpage that includes more extensive samples: Google Chrome and Chromium ignore "subset=all".

Kazunekit commented 8 years ago

It's not the browsers that ignore the query string, it seems that the Google Font API handles Chrome/Chromium user-agents differently than the rest. This can be checked by spoofing a Chromium user-agent on Firefox and use the provided test case.

davelab6 commented 8 years ago

subset=all isn't a supported part of the api, so don't use it! :)