{"id":18389318,"url":"https://github.com/rightpoint/universalfontcomponents","last_synced_at":"2025-04-07T02:34:16.023Z","repository":{"id":31673023,"uuid":"35238526","full_name":"Rightpoint/UniversalFontComponents","owner":"Rightpoint","description":"A library that allows you to set a custom font in xml for all your TextViews","archived":false,"fork":false,"pushed_at":"2018-04-11T21:25:52.000Z","size":1975,"stargazers_count":11,"open_issues_count":1,"forks_count":3,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-03-22T11:42:52.426Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","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/Rightpoint.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}},"created_at":"2015-05-07T19:10:41.000Z","updated_at":"2020-06-13T05:09:00.000Z","dependencies_parsed_at":"2022-08-24T11:52:45.710Z","dependency_job_id":null,"html_url":"https://github.com/Rightpoint/UniversalFontComponents","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/Rightpoint%2FUniversalFontComponents","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FUniversalFontComponents/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FUniversalFontComponents/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FUniversalFontComponents/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rightpoint","download_url":"https://codeload.github.com/Rightpoint/UniversalFontComponents/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247583285,"owners_count":20962008,"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":[],"created_at":"2024-11-06T01:42:33.824Z","updated_at":"2025-04-07T02:34:11.002Z","avatar_url":"https://github.com/Rightpoint.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[DEPRECATED]\n\nFor platform 26 (Oreo) and above (also available in support library 26 and above), use the native Platform Components and fontFamily parameter.\nFor more information about font management :\n\nhttps://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts.html#programmatically\n\n# UniversalFontComponents\n\n*UniversalFontComponents* is a library that allows you to set a custom font in xml for all your TextViews.  You can also set a library-provided Roboto font  so that your fonts are consistent across different versions of Android.  \n\n## Importing in your project\n\n### Gradle\n\nBy standard Gradle use:\n\n```\ndependencies {\n    compile 'com.raizlabs:UniversalFontComponents:1.0.1.1'\n  }\n```\n\n## Usage\nFirst, you have to initialize the library.\n\nIn your Application's onCreate method, call\n\n```java\n  UniversalFontComponents.init(this);\n```\n\nto initialize the FontMap.\n\nSetting a universal font for your app can be done one of two ways:\n  1. Use one of the library-provided roboto fonts, or\n  2. Inject your own custom font into the view.\n\n### Built-In Fonts\n\nTo use one of the built-in roboto fonts, use one of the built in views in your layout.xml file and add the universalFont attribute with one of the built-in Roboto fonts specified:\n\n```xml\n  \u003ccom.raizlabs.universalfontcomponents.widget.UniversalFontTextView\n      android:layout_width=\"wrap_content\"\n      android:layout_height=\"wrap_content\"\n      android:text=\"I am a UniversalFontTextView\"\n      app:universalFont=\"Roboto.Bold\" /\u003e\n```\n\n### Custom Fonts\n\nTo use your own custom font:\n\n  1. Add your custom font file to your app's asset folder (../src/main/assets/ExampleCustomFont.ttf)\n  \n  2. Use one of the built-in views in your layout.xml file and add the customFont attribute with the name of your custom font file specified:\n\n    ```xml\n      \u003ccom.raizlabs.universalfontcomponents.widget.UniversalFontTextView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"I am a UniversalFontTextView\"\n        app:customFont=\"ExampleCustomFont.ttf\" /\u003e\n    ```\n    \nThe following components are currently provided by the library:\n  * UniversalFontTextView\n  * UniversalFontButton\n  * UniversalFontEditText\n  * UniversalFontRadioButton\n  * UniversalFontCheckBox\n\n## Maintainers\n\n[Mervyn Anthony](https://github.com/Mervyn-Raizlabs)\n\n[Dylan R. James](https://github.com/dylanrjames)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frightpoint%2Funiversalfontcomponents","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frightpoint%2Funiversalfontcomponents","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frightpoint%2Funiversalfontcomponents/lists"}