coollabsio / fonts

A privacy-friendly drop-in replacement for Google Fonts
https://fonts.coollabs.io
Apache License 2.0
405 stars 14 forks source link

Bug in some multiple requests #7

Closed jeff-at-livecanvas closed 1 year ago

jeff-at-livecanvas commented 1 year ago

First of all. Your project is fantastic and very useful. I'm trying to use it in our Picostrap Theme
There is a lot of GDPR compliance concern regarding usage of Google Fonts on the web. Your solution is really clever and so much easier to implement, compared to locally hosting the fonts.

Tinkering with your service I think I've found a bug. Some requests dealing with multiple fonts, when not including weights, apparently fail.

One example: https://api.fonts.coollabs.io/css2?family=Playfair+Display&family=Josefin+Sans&display=swap

Returns Playfair Display (correctly) and Montserrat(?)

To compare, the corresponding Google URL, https://fonts.googleapis.com/css2?family=Playfair+Display&family=Josefin+Sans&display=swap works as expected.

Thanks so much again for your project, and for your time looking into this.

jeff-at-livecanvas commented 1 year ago

One more interesting case:

https://api.fonts.coollabs.io/css2?family=Barlow+Semi+Condensed:wght@700&family=Abhaya+Libre&display=swap

Here, removing the weight fixes the issue apparently.

andrasbacsai commented 1 year ago

Nice findings! I will check them!

andrasbacsai commented 1 year ago

Sorry for the late answer. I think this is already solved, I just forgot to write here (oops). Could you please check?

jeff-at-livecanvas commented 1 year ago

Hello Andras, looks like it's working fine now. Amazing! Thank you again for your effort in maintaining this useful project.