{"id":17679435,"url":"https://github.com/florent37/fonts","last_synced_at":"2025-10-17T21:02:19.475Z","repository":{"id":91120152,"uuid":"87048725","full_name":"florent37/fonts","owner":"florent37","description":"Define the fonts of your Android project directly from the build.gradle ","archived":false,"fork":false,"pushed_at":"2018-01-04T12:57:10.000Z","size":405,"stargazers_count":46,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-07T22:45:42.936Z","etag":null,"topics":["android","font","gradle","jcenter","plugin","text"],"latest_commit_sha":null,"homepage":"","language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/florent37.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-03T07:28:55.000Z","updated_at":"2024-05-30T07:56:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"0dcf4caf-15d1-4c29-9a34-288ea8fbc1ee","html_url":"https://github.com/florent37/fonts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florent37%2Ffonts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florent37%2Ffonts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florent37%2Ffonts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/florent37%2Ffonts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/florent37","download_url":"https://codeload.github.com/florent37/fonts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252967975,"owners_count":21833247,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","font","gradle","jcenter","plugin","text"],"created_at":"2024-10-24T08:41:58.192Z","updated_at":"2025-10-17T21:02:19.397Z","avatar_url":"https://github.com/florent37.png","language":"Groovy","funding_links":["https://ko-fi.com/A160LCC'"],"categories":[],"sub_categories":[],"readme":"# Fonts, plugin for gradle\n\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-fonts-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/5514)\n\n\n\u003ca href=\"https://goo.gl/WXW8Dc\"\u003e\n  \u003cimg alt=\"Android app on Google Play\" src=\"https://developer.android.com/images/brand/en_app_rgb_wo_45.png\" /\u003e\n\u003c/a\u003e\n\n\n```java\napply plugin: 'com.android.application'\napply plugin: 'fonts'\n\nfonts {\n    output = \"/src/main/assets/fonts/\" //optionnal\n    families {\n        roboto { //download only Roboto-Light and Roboto-Regulat\n            variants {\n                Light\n                Regular\n            }\n        }\n        roboto_condensed //download all Roboto-Condensed\n        raleway { //download only Raleway-Thin\n            variants {\n                thin\n               \n            }\n        }\n    }\n}\n```\n\nThen run `./gradlew downloadSelectedFonts`\n\nThis will create\n\n```\napp/\n----src/\n--------main/\n------------assets/\n----------------fonts/\n--------------------Roboto-Regular.ttf\n--------------------Roboto-Light.ttf\n\n--------------------RobotoCondensed-Light.ttf\n--------------------RobotoCondensed-LightItalic.ttf\n--------------------RobotoCondensed-Regular.ttf\n--------------------RobotoCondensed-Italic.ttf\n--------------------RobotoCondensed-Bold.ttf\n--------------------RobotoCondensed-BoldItalic.ttf\n\n--------------------Raleway-Thin.ttf\n```\n\n\n# Import\n\n\u003ca href='https://ko-fi.com/A160LCC' target='_blank'\u003e\u003cimg height='36' style='border:0px;height:36px;' src='https://az743702.vo.msecnd.net/cdn/kofi1.png?v=0' border='0' alt='Buy Me a Coffee at ko-fi.com' /\u003e\u003c/a\u003e\n\nImport `fonts` in your root `build.gradle`\n\n[ ![Download](https://api.bintray.com/packages/florent37/maven/fonts/images/download.svg) ](https://bintray.com/florent37/maven/fonts/_latestVersion)\n```java \nbuildscript {\n    repositories {\n        jcenter()\n    }\n    dependencies {\n        classpath \"com.github.florent37:fonts:1.0\"\n    }\n}\n```\n\n\n# Tasks\n\n## Fetch all fonts\n\n```\n./gradlew displayAllAvailable\n\n:app:displayAllAvailable\nDownloading fonts...\n- roboto\n- open-sans\n- slabo-27px\n- lato\n...\n```\n\n## Fetch fonts variants\n\nAdd a font in your project configuration\n```\nfonts {\n    roboto\n}\n```\n\nThen run `displaySelectedFontsVariants`\n\n```\n./gradlew displaySelectedFontsVariants\n\n:app:displaySelectedFontsVariants\nVariants of roboto\n- Roboto-ThinItalic\n- Roboto-Light\n- Roboto-LightItalic\n...\n```\n\n## Download fonts\n\n```\n./gradlew downloadSelectedFonts\n\n:app:downloadSelectedFonts\nFont roboto\ndownloading Roboto-Bold : https://fonts.gstatic.com/s/roboto/v15/d-6IYplOFocCacKzxwXSOKCWcynf_cDxXwCLxiixG1c.ttf\ndownloading Roboto-Light : https://fonts.gstatic.com/s/roboto/v15/Hgo13k-tfSpn0qi1SFdUfaCWcynf_cDxXwCLxiixG1c.ttf\ndownloading Roboto-Regular : https://fonts.gstatic.com/s/roboto/v15/zN7GBFwfMP4uA6AR0HCoLQ.ttf\n...\n```\n\n\n\u003ca href=\"https://goo.gl/WXW8Dc\"\u003e\n  \u003cimg alt=\"Android app on Google Play\" src=\"https://developer.android.com/images/brand/en_app_rgb_wo_45.png\" /\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflorent37%2Ffonts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflorent37%2Ffonts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflorent37%2Ffonts/lists"}