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]: Accessing Material Symbols causes 500 error #13

Open WillsterJohnson opened 1 year ago

WillsterJohnson commented 1 year ago

Overview

Google Fonts' Icons page links to their Developer Guide which has a section on web usage which states that the following URL is how users should access Material Symbols;

https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined

/* fallback */
@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 400;
  src: url(https://fonts.gstatic.com/s/materialsymbolsoutlined/v110/kJF1BvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oDMzByHX9rA6RzaxHMPdY43zj-jCxv3fzvRNU22ZXGJpEpjC_1v-p_4MrImHCIJIZrDCvHOej.woff2) format('woff2');
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -moz-font-feature-settings: 'liga';
  -moz-osx-font-smoothing: grayscale;
}
  

According to fonts.coollabs.io:

Change fonts.googleapis.com to api.fonts.coollabs.io In your head tags. That's all!

However when doing so:

https://api.fonts.coollabs.io/css2?family=Material+Symbols+Outlined

{"statusCode":500,"message":"undefined is not iterable (cannot read property Symbol(Symbol.iterator))"}
  

Expected Behavior

Expected to see the same results from fonts.coollabs as fonts.googleapis

Actual Behavior

500 error - tried to iterate undefined


This isn't resolved changing /css2 to /icons (it would be odd, but nice, if it was). Are Material Symbols supported/possible to support?

andrasbacsai commented 12 months ago

Yeah, I will add these.

(link and link for future me)