מתחילים לעבוד עם הגופנים של Google ל-Android
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
הוספנו תמיכה ב-Android O וב-AndroidX Library
גופנים להורדה.
שירות Google Fonts שולח ספק גופנים בשירותי Google Play. כלומר
Google Fonts זמין לאפליקציות מקוריות במכשירי Android!
באילו גופנים אפשר להשתמש?
כל האוסף של Google Fonts בקוד פתוח! כניסה לאתר
https://fonts.google.com כדי לעיין באתר.
אילו גרסאות של Android נתמכות?
הספק שלנו תומך ב-Jenlly Bean (API ברמה 16) ומעלה. הנתון הזה מייצג יותר מ-95%
של מכשירי Android בעולם
(מרכז הבקרה של הפלטפורמה).
אפשר לגשת לאפליקציה באמצעות ממשקי API בספריית AndroidX
(androidx.core)
או Android O (רמת API 26).
איך אני יכול להתחיל!
כדי לבקש גופן מספק הגופנים של Google, יש להשתמש בפורמט השאילתה הבא:
פרמטר |
חובה? |
טווח |
סוג הנתונים |
ערך ברירת מחדל |
שם |
כן |
כל משפחה שמגיעה מ-Font.google.com |
מחרוזת |
|
רוחב |
לא |
> 0 |
מספר ממשי (float) |
100 |
משקל |
לא |
(0, 1000) בלעדי |
int |
400 |
נטוי |
לא |
[0, 1] כולל |
מספר ממשי (float) |
0 |
הטוב ביותר |
לא |
נכון/לא נכון |
בוליאני |
true |
אם הטוב ביותר הוא נכון והשאילתה שלך מציינת שם משפחה חוקי, אבל
הערך המבוקש של רוחב/משקל/נטו לא נתמך, נחזיר את הערך הטוב ביותר
התאמה שאנחנו יכולים למצוא במשפחה. לדוגמה, בקשה עבור
Oswald במשקל 900 יחזיר
אוסוולד במשקל 700
שאילתות לדוגמה:
name=Lobster # Lobster, 400 weight
name=Lato&weight=100 # Lato, 100 weight
name=Open Sans&weight=800&italic=1 # Open Sans, 800 weight, italic
אבטחה
מטעמי אבטחה, עליך לציין את החתימה של האפליקציה שחושפת את
הספק שממנו רוצים לבקש גופנים. הוספה של Android Studio
היא החתימה המתאימה. צפייה
הוספת אישורים.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 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)."]]