با فونت های گوگل برای اندروید شروع کنید
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
Android O و کتابخانه AndroidX پشتیبانی از فونتهای قابل دانلود را اضافه میکنند.
فونت های گوگل یک ارائه دهنده فونت را در سرویس های Google Play ارسال می کند. این بدان معناست که فونت های گوگل برای برنامه های بومی در دستگاه های اندرویدی در دسترس هستند!
از چه فونت هایی می توانم استفاده کنم؟
کل مجموعه متن باز فونت های گوگل! برای مرور به https://fonts.google.com مراجعه کنید.
چه نسخه هایی از اندروید پشتیبانی می شود؟
ارائه دهنده ما از Jelly Bean (سطح API 16) و بالاتر پشتیبانی می کند. این نشان دهنده بیش از 95٪ از دستگاه های Android در طبیعت است ( داشبورد پلت فرم ). با استفاده از APIهای موجود در کتابخانه AndroidX ( androidx.core ) یا Android O (سطح API 26) می توان به آن دسترسی داشت.
چگونه می توانم شروع کنم!
برای درخواست فونت از ارائهدهنده فونتهای Google از فرمت درخواست زیر استفاده کنید:
پارامتر | مورد نیاز؟ | محدوده | نوع داده | مقدار پیش فرض |
---|
نام | بله | هر خانواده از fonts.google.com | رشته | |
عرض | خیر | > 0 | شناور | 100 |
وزن | خیر | (0, 1000) اختصاصی | بین المللی | 400 |
مورب | خیر | [0، 1] شامل | شناور | 0 |
بهترین تلاش | خیر | درست / نادرست | بولی | درست است |
اگر bestefort درست است و درخواست شما یک نام خانوادگی معتبر را مشخص میکند اما عرض/وزن/مقدار کج پشتیبانی نمیشود، بهترین تطابق را که میتوانیم در خانواده پیدا کنیم، برمیگردانیم. به عنوان مثال، درخواست برای اسوالد در وزن 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 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\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)."]]