finnandtonic / googlefontdirectory

Automatically exported from code.google.com/p/googlefontdirectory
0 stars 0 forks source link

Multiple fonts requests don't work with subset arguments #151

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Request e.g.: URL 
http://fonts.googleapis.com/css?family=Neucha&subset=cyrillic|Reenie+Beanie

What is the expected output? What do you see instead?
I expect same output as I get with URL 
http://fonts.googleapis.com/css?family=Reenie+Beanie|Neucha&subset=cyrillic
I get 404 instead.

Original issue reported on code.google.com by jakub.st...@czechgeeks.cz on 17 Jul 2012 at 10:47

GoogleCodeExporter commented 9 years ago
Use http://fonts.googleapis.com/css?family=Reenie+Beanie|Neucha&subset=cyrillic 
:)

The URL 
http://fonts.googleapis.com/css?family=Neucha&subset=cyrillic|Reenie+Beanie 
can't be made to work, because of the way URL parameter encoding works 
fundementally:

protocol://server/page?key=value&anotherkey=anothervalue 

The important part here is that the URL parameters are in key=value pairs, 
separated by & characters. 

So you can'd intermingle the key=value pairs; you have family=Neucha and then 
after that there can't be any more family names, because any family name values 
will be paired to some other key. In this case, subset=cyrillic|Reenie+Beanie 
means subsets are 'cyrillic' and 'Reenie Beenie' and since that isn't a valid 
subset, you get a 404 :-)

I hope that explains! 

Original comment by dcrossland@google.com on 18 Jul 2012 at 9:47