{"id":15304626,"url":"https://github.com/monkeymars/fonticon","last_synced_at":"2025-10-08T09:30:56.191Z","repository":{"id":149889581,"uuid":"72508458","full_name":"monkeymars/fonticon","owner":"monkeymars","description":"Android implementation of font-based icons.","archived":false,"fork":true,"pushed_at":"2016-02-23T09:09:10.000Z","size":857,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-02T07:57:16.747Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://blog.shamanland.com/p/android-fonticon-library.html","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"shamanland/fonticon","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/monkeymars.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-2.0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-01T06:02:14.000Z","updated_at":"2016-11-01T06:02:16.000Z","dependencies_parsed_at":"2023-05-06T22:37:19.226Z","dependency_job_id":null,"html_url":"https://github.com/monkeymars/fonticon","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkeymars%2Ffonticon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkeymars%2Ffonticon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkeymars%2Ffonticon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkeymars%2Ffonticon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monkeymars","download_url":"https://codeload.github.com/monkeymars/fonticon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235700110,"owners_count":19031668,"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-10-01T07:57:18.747Z","updated_at":"2025-10-08T09:30:55.277Z","avatar_url":"https://github.com/monkeymars.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"FontIcon Library\n====\n\n[![Build Status](https://travis-ci.org/shamanland/fonticon.svg?branch=master)](https://travis-ci.org/shamanland/fonticon)\n\nFontIcon is simple library which use font-based icons in Android.\n\nLinks\n----\n\n- [Project page][8]\n- [Example video][2]\n- [JavaDoc][1]\n\nGet demo on Google Play\n----\n\n\u003ca href=\"https://play.google.com/store/apps/details?id=com.shamanland.fonticon.example\"\u003e\n\u003cimg alt=\"Get it on Google Play\" src=\"https://drive.google.com/uc?id=0Bwh0SNLPmjQBY096eE9PMmlKVEk\" width=\"204\" height=\"60\"/\u003e\n\u003c/a\u003e\n\nPros and cons\n----\n\n**Advantages**\n\n- Single ``.ttf`` file instead of lot of bitmaps for different densities (mdpi, hdpi, xhdpi, etc.)\n- Scalable vector graphics instead of raster images\n- Possibility to use any color for icon in run-time\n- Possibility to use any graphics effect which is available for TextView\n\n**Disadvantages**\n\n- Not easy to add additional icons\n\nGradle dependency\n----\n\n```groovy\n    dependencies {\n        compile 'com.shamanland:fonticon:0.1.9'\n    }\n```\n\nUsage\n----\n\n**1. Create your font with icons**\n\nDo it yourself. Check tutorial on [fontastic.me][4] service or find other service.\n\n**2. Prepare your font to be used in Android.**\n\nRead this [manual][5] for details. In case of fontastic use [this util][3].\n\n**3. Declare your FontIconDrawable in xml**\n\n[**res/xml/ic_android.xml**][6]\n\n```xml\n    \u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n    \u003cfont-icon\n            xmlns:android=\"http://schemas.android.com/apk/res-auto\"\n            android:text=\"@string/ic_android\"\n            android:textSize=\"@dimen/big_icon_size\"\n            android:textColor=\"@color/green_170\"\n            /\u003e\n```\n\n**4. Inflate your FontIconDrawable in Java**\n\n```java\n    Drawable icon = FontIconDrawable.inflate(getResources(), R.xml.ic_android);\n```\n\n**5. Use your FontIconDrawable as compound for TextView, EditText or Button (in res/layout with custom class)**\n\n```xml\n    \u003ccom.shamanland.fonticon.FontIconTextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"Dummy text\"\n            app:iconLeft=\"@xml/ic_android\"\n            /\u003e\n\n    \u003ccom.shamanland.fonticon.FontIconEditText\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"Dummy text\"\n            app:iconLeft=\"@xml/ic_android\"\n            /\u003e\n\n    \u003ccom.shamanland.fonticon.FontIconButton\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"Dummy text\"\n            app:iconLeft=\"@xml/ic_button_yes\"\n            /\u003e\n```\n\n**6. Use your FontIconDrawable as compound for TextView (in Java-code with platform class)**\n\n```java\n    Drawable icon = FontIconDrawable.inflate(getResources(), R.xml.ic_android);\n    TextView tv = (TextView) result.findViewById(R.id.my_textview_or_button);\n    tv.setCompoundDrawables(icon, null, null, null);\n```\n\n**7. Use FontIconView as single icon in your layout**\n\n```xml\n    \u003ccom.shamanland.fonticon.FontIconView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"@string/ic_android\"\n            android:textSize=\"@dimen/icon_size\"\n            android:textColor=\"@color/icon_color\"\n            /\u003e\n```\n\n**8. Add glowing effect on touch for your FontIconView**\n\n[**res/layout/f_glowing.xml**][7]\n\n```xml\n    \u003ccom.shamanland.fonticon.FontIconView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:padding=\"@dimen/icon_glow_radius\"\n            android:text=\"@string/ic_googleplus\"\n            android:textSize=\"@dimen/big_icon_size\"\n            android:textColor=\"@color/pressed_googleplus\"\n            android:clickable=\"true\"\n            app:overridePressed=\"true\"\n            app:pressedGlowColor=\"@color/googleplus\"\n            app:pressedGlowRadius=\"@dimen/icon_glow_radius\"\n            /\u003e\n```\n\nTools\n----\n\n[FontIcon-Prepare][3] - prepares web fonts to be used with this library\n\nLicense\n--------\n\n    Copyright 2014 ShamanLand.Com\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n[1]: http://shamanland.github.io/fonticon\n[2]: https://docs.google.com/file/d/0Bwh0SNLPmjQBbXJVd3c3S2hfVTg/preview\n[3]: http://github.com/shamanland/fonticon-prepare/\n[4]: http://fontastic.me/howto\n[5]: http://blog.shamanland.com/2013/11/how-to-use-icon-fonts-in-android.html\n[6]: http://github.com/shamanland/fonticon/blob/dev/app/src/main/res/xml/ic_android.xml\n[7]: http://github.com/shamanland/fonticon/blob/dev/app/src/main/res/layout/f_glowing.xml\n[8]: http://blog.shamanland.com/p/android-fonticon-library.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonkeymars%2Ffonticon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonkeymars%2Ffonticon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonkeymars%2Ffonticon/lists"}