Erste Schritte mit Google Fonts für Android
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Android O und die AndroidX-Bibliothek unterstützen jetzt
Herunterladbare Schriftarten:
Google Fonts bietet in den Google Play-Diensten einen Schriftartenanbieter an. Das bedeutet,
Google Fonts ist für systemeigene Apps auf Android-Geräten verfügbar.
Welche Schriftarten kann ich verwenden?
Die gesamte Open-Source-Sammlung von Google Fonts! Besuchen Sie
https://fonts.google.com.
Welche Android-Versionen werden unterstützt?
Unser Anbieter unterstützt Jelly Bean (API-Level 16) und höher. Dies entspricht mehr als 95%der
der Android-Geräte weltweit
(Plattform-Dashboard)
Der Zugriff ist über APIs in der AndroidX-Bibliothek möglich.
(androidx.core)
oder Android O (API-Level 26).
Was sind die ersten Schritte?
Verwenden Sie das folgende Abfrageformat, um eine Schriftart vom Google Fonts-Anbieter anzufordern:
Parameter |
Erforderlich? |
Bereich |
Datentyp |
Standardwert |
Name |
Ja |
Für jede Familie auf fonts.google.com |
String |
|
Breite |
Nein |
> 0 |
float |
100 |
Gewicht |
Nein |
Exklusiv (0, 1.000) |
int |
400 |
kursiv |
Nein |
[0, 1] (einschließlich) |
float |
0 |
Besteffort |
Nein |
Wahr/Falsch |
boolean |
wahr |
Wenn besteffort wahr ist und Ihre Abfrage einen gültigen Familiennamen angibt, aber das Feld
Der angeforderte Wert für Breite/Gewichtung/Kursiv wird nicht unterstützt. Wir geben den besten Wert zurück.
die wir in der Familie finden können. Eine Anfrage für
Oswald mit einer Gewichtung von 900
Oswald bei einem Gewicht von 700.
Beispielabfragen:
name=Lobster # Lobster, 400 weight
name=Lato&weight=100 # Lato, 100 weight
name=Open Sans&weight=800&italic=1 # Open Sans, 800 weight, italic
Sicherheit
Aus Sicherheitsgründen müssen Sie die Signatur der Anwendung angeben,
von dem Sie Schriftarten anfordern möchten. Android Studio fügt
die richtige Signatur für Sie. Weitere Informationen finden Sie unter
Zertifikate hinzufügen
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-25 (UTC).
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-07-25 (UTC)."],[[["\u003cp\u003eAndroid now supports downloadable fonts, including the entire Google Fonts collection, via Android O and AndroidX Library.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Fonts are readily available for native Android apps through a Font Provider in Google Play Services, supporting Android Jelly Bean (API level 16) and above.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can access Google Fonts declaratively or programmatically and easily customize font attributes like width, weight, and italic style.\u003c/p\u003e\n"],["\u003cp\u003eA built-in "best effort" feature ensures the closest font match if the specific requested style is unavailable within the chosen font family.\u003c/p\u003e\n"],["\u003cp\u003eFor security, applications utilizing the Google Fonts provider must specify the provider's signature, a process simplified within Android Studio.\u003c/p\u003e\n"]]],[],null,["# Get Started with the Google Fonts for Android\n\nAndroid O and AndroidX Library add support for\n[Downloadable Fonts](https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts.html).\n\nGoogle Fonts is shipping a Font Provider in Google Play Services. This means\nGoogle Fonts are available to native apps on Android devices!\n\nWhich fonts can I use?\n----------------------\n\nThe entire Google Fonts Open Source collection! Visit\n\u003chttps://fonts.google.com\u003e to browse.\n\nWhat versions of Android are supported?\n---------------------------------------\n\nOur provider supports Jelly Bean (API level 16) and up. This represents 95%+ of\nof Android devices in the wild\n([platform dashboard](https://developer.android.com/about/dashboards/index.html#Platform)).\nIt can be accessed using APIs in AndroidX Library\n([androidx.core](https://developer.android.com/jetpack/androidx/releases/core))\nor Android O (API level 26).\n\nHow can I get started!\n----------------------\n\n- Check out the [demo app](https://github.com/android/user-interface-samples/tree/main/DownloadableFonts).\n- Try it in Android Studio 3.0 ([walkthrough with screenshots](https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts.html#via-android-studio))\n- Use Google Fonts declaratively or programmatically as shown in [Downloadable Fonts](https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts.html).\n\nQuery Format\n------------\n\nTo request a font from the Google Fonts provider use the following query format:\n\n| Parameter | Required? | Range | Data Type | Default value |\n|------------|-----------|----------------------------------|-----------|---------------|\n| name | Yes | Any family from fonts.google.com | string | |\n| width | No | \\\u003e 0 | float | 100 |\n| weight | No | (0, 1000) exclusive | int | 400 |\n| italic | No | \\[0, 1\\] inclusive | float | 0 |\n| besteffort | No | true/false | boolean | true |\n\nIf besteffort is true and your query specifies a valid family name but the\nrequested width/weight/italic value is not supported we will return the best\nmatch we can find within the family. For example, a request for\n[Oswald](https://fonts.google.com/specimen/Oswald) at weight 900 would return\nOswald at weight 700.\n\nSample queries: \n\n name=Lobster # Lobster, 400 weight\n name=Lato&weight=100 # Lato, 100 weight\n name=Open Sans&weight=800&italic=1 # Open Sans, 800 weight, italic\n\nSecurity\n--------\n\nFor security you must specify the signature of the application exposing the\nprovider you want to request fonts from. Android Studio will add\nthe correct signature for you. See\n[adding certificates](https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts.html#adding-certificates)."]]