coollabsio / fonts Goto Github PK
View Code? Open in Web Editor NEWA privacy-friendly drop-in replacement for Google Fonts
Home Page: https://fonts.coollabs.io
License: Apache License 2.0
A privacy-friendly drop-in replacement for Google Fonts
Home Page: https://fonts.coollabs.io
License: Apache License 2.0
When generating <link>s
for this font, you get a syntax convention that's new to me: "ital@0;1
". 🤷♂️ Seems to fail on Cool's server.
google's:
https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&display=swap
cool's:
https://api.fonts.coollabs.io/css2?family=DM+Serif+Display:ital@0;1&display=swap
{"statusCode":500,"error":"Internal Server Error","message":"undefined is not iterable (cannot read property Symbol(Symbol.iterator))"}
Requesting a font with the slanted attribute (italic) like:
https://api.fonts.coollabs.io/css2?family=Inter:slnt,wght@-10,300
Generates this cdn link: https://cdn.fonts.coollabs.io/inter/italic/300.woff2
Which results in a 404 currently.
Other fonts like Poppins
do seem to work: https://cdn.fonts.coollabs.io/poppins/italic/300.woff2
(Google fonts comparison: https://fonts.googleapis.com/css2?family=Inter:slnt,wght@-10,300)
Hello,
Not sure what is happening, but it appears that any font other than Roboto
is not served from the API. A few days ago, everything was working nicely, but today I noticed the fonts were not loading and visiting the links results in a 404.
https://api.fonts.coollabs.io/css2?family=Roboto
works, but not https://api.fonts.coollabs.io/css2?family=Merriweather
or any other font I can think of.
In any case, thank you for providing this privacy respecting alternative for fonts. 🙂
This is not working for me (works with Google Fonts):
https://api.fonts.coollabs.io/css2?family=Aguafina+Script:400&display=swap
While this is working:
https://api.fonts.coollabs.io/css2?family=Aguafina+Script&display=swap
Is this a bug or is there anything else to consider, when loading font weights?
This is not working:
https://api.fonts.coollabs.io/css2?family=Abril+Fatface:wght@400&family=Aguafina+Script:wght@400&display=swap
Without &display=swap it works as expected:
https://api.fonts.coollabs.io/css2?family=Abril+Fatface:wght@400&family=Aguafina+Script:wght@400
I feel stupid but, how exactly do I do this?
I've read the how to use but I still don't know.
This isn't fully related to this, but Ideally I wanted to block all remote fonts on all websites and have my "locally hosted" (google) fonts take over, but I'm not sure if that's possible? I'm not sure how to "locally host" fonts. If that isn't possible, I would like to set this up instead.
Can someone tell me if I even have the right way of thinking towards this stuff? Thanks.
Very cool! I like your thinking. All your documentation talks about when I am building a site how I can use Coollabs fonts instead of google's which is great.
Something else I would like to do is put an IP address in my hosts file for google fonts:
w.x.y.z fonts.googleapis.com
w.x.y.z fonts.gstatic.com
Is this possible? If yes, what IP address can be used?
Hi!
I'm encountering a problem that when I'm using a font from Coollabs Fonts (exactly Prompt
font), I'm missing Polish characters. I do not have this issue when using G Fonts.
Exact import URL:
@import url("https://api.fonts.coollabs.io/css2?family=Prompt:wght@400;500;600&family=Ubuntu:wght@500;700&display=swap");
And the results:
When using Coolify Fonts:
When using Google Fonts:
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;
/* 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
toapi.fonts.coollabs.io
In your head tags. That's all!
However when doing so:
{"statusCode":500,"message":"undefined is not iterable (cannot read property Symbol(Symbol.iterator))"}
Expected to see the same results from fonts.coollabs as fonts.googleapis
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?
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.
Szia András,
először is big thx ezért a googlefont alternatíváért!
Ami miatt írok, az az, hogy a head-ben kicserélt cdn-url esetén a font-ot betölti ugyan, de a hosszú ő/ű betűk helyén a default font jelenik meg (az eredeti GoogleFont-ban szerepelnek ezek a karakterek).
A kérdésem annyi csak, hogy ez egy limitáció (fizikailag egy más font-file kerül betöltésre), vagy egyszerűen én csinálok valamit rosszul.
Előre is köszi a választ,
üdv
Tamás
Regardless - love this project! I was looking for something like this exactly when you were writing it, it seems. :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.