Google Webfonts – Informationen zur Klassifikation der Schrift

Google stellt mit seiner Google Fonts API bzw. der dazugehörigen Webseite ein großartiges Werkzeug bereit, um Webschriften sehr komfortabel nutzen zu können. Nutzer der API erhalten dabei auch eine Menge Informationen, mit deren Hilfe man die Fonts in Webseiten oder Apps integrieren kann. Was allerdings fehlt ist die Klassifikation der Schrift, also ob es sich um eine serifenlose Schrift, eine Schreibschrift oder etwas anderes handelt. Dieses Problem konnte ich mit einer kleinen Bastelei lösen.

(English version below.)

Während Google die Informationen zur Klassifikation der Schriften nicht in der API ausliefert, findet sich im Google Fonts Repository auf github zu jeder aufgeführten Schrift auch eine Datei namens METADATA.pb. Diese Datei enthält Informationen zum Ersteller der Schrift, der Lizenz und weiterem mehr und eben auch der Klassifikation, in der Datei „category“ genannt.

Ich habe ein Skript geschrieben, dass das genannte Repository durchforstet und die Metadaten zu jedem Font ausliest. Die gefundenen Informationen werden schließlich aufbereitet und in ein gitlab-Repository geschrieben. Von dort können sie dann komfortabel abgerufen und in einer Webseite oder App verwendet werden.

Das Schöne an dieser Sache ist, dass mein Skript das Repository regelmäßig auf Änderungen prüft (alle 2 Stunden) und diese dann sofort in das gitlab-Repository übernimmt. Somit ist die Liste mit den Kategorien jeweils auf dem aktuellsten Stand.


Google does a great job with their Google Fonts API and the corresponding webpage to make the use of webfonts much easier. API users get quite a lot information which you can use to integrate fonts in websites or apps. But the API misses information regarding the classification of the font, so whether it is a sans-serif font, a handwriting font or something else. I have fixed this problem with a little script.

While Google does not deliver the information regarding the font classification via the API, the Google Fonts Repository on github contains a file named METADATA.pb for every listed font. This file contains information regarding the author of the font, the license and lots more and also information regarding the classification, called „category“ in the file.

So I wrote a script which scrapes the mentioned repository and reads the metadata for each font. The information is then prepared and written to a gitlab repository. From there you can fetch it comfortably and use it in your website or app.

The nice part about the script is, that it checks the repository regularly (every 2 hours), and copies changes immediately. So you will always have a up-to-date list with the classification information.


Über mich

Ich bin gelernter Mediengestalter, studierter Druck- und Medientechniker und leidenschaftlicher Tüftler und Bastler.

Beruflich beschäftige ich mich mit der digitalen Transformation von Unternehmen, sowie der Automatisierung von Unternehmensprozessen, in der Druck- und Medienbranche. Mehr dazu findet sich im Lebenslauf.

Privat interessieren mich Kaffee(maschinen), Themen rund um Webentwicklung, das Internet im Allgemeinen und Speziellen und vieles, vieles mehr.

Ich freue mich auf Feedback per E-Mail unter kontakt@flomei.de, einen Euro für die Kaffeekasse oder etwas von meiner Amazon Wunschliste.