{"id":18021299,"url":"https://github.com/gcssloop/fontsmanager","last_synced_at":"2025-04-06T18:17:50.332Z","repository":{"id":32138585,"uuid":"35711335","full_name":"GcsSloop/FontsManager","owner":"GcsSloop","description":"help you change the module font easily.(方便快速的为应用内所有组件更换字体)","archived":false,"fork":false,"pushed_at":"2016-12-30T15:26:07.000Z","size":2675,"stargazers_count":480,"open_issues_count":5,"forks_count":79,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-03-30T17:09:50.927Z","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":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GcsSloop.png","metadata":{"files":{"readme":"README-EN.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-16T05:33:18.000Z","updated_at":"2025-01-20T08:40:42.000Z","dependencies_parsed_at":"2022-09-11T03:20:31.879Z","dependency_job_id":null,"html_url":"https://github.com/GcsSloop/FontsManager","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GcsSloop%2FFontsManager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GcsSloop%2FFontsManager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GcsSloop%2FFontsManager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GcsSloop%2FFontsManager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GcsSloop","download_url":"https://codeload.github.com/GcsSloop/FontsManager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247526768,"owners_count":20953143,"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-30T06:09:29.965Z","updated_at":"2025-04-06T18:17:50.283Z","avatar_url":"https://github.com/GcsSloop.png","language":"Java","readme":"# \u003cimg src=\"http://ww3.sinaimg.cn/large/005Xtdi2jw1f2jr4jwwodj3074074q34.jpg\" width=32 /\u003e FontsManager\n\n[![License](https://img.shields.io/badge/license-Apache%202-green.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n![](https://img.shields.io/badge/Support-7%2B-green.svg)\n[![](https://jitpack.io/v/GcsSloop/FontsManager.svg)](https://jitpack.io/#GcsSloop/FontsManager)\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-FontsManager-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/1928)\n\n**一行代码，帮助你快速为各种View替换字体。**\n\n## [中文版说明文档戳这里](https://github.com/GcsSloop/AndroidFontsManager/blob/master/README-CN.md)\n\n#### Author's weibo: [@GcsSloop](http://weibo.com/GcsSloop)\n\n## Overview\n\n**Android FontsManager： It can help you change font of view easily !**\n\n## Demo\n![](http://ww4.sinaimg.cn/large/005Xtdi2jw1f2ip77q8ydg306j0b4jry.gif)\n\n\n## Prepare\n\n#### Step 1. Add the JitPack repository to your build file\n\nAdd it in your root build.gradle at the end of repositories:\n\n``` gradle\n\tallprojects {\n\t\trepositories {\n\t\t\t...\n\t\t\tmaven { url \"https://jitpack.io\" }\n\t\t}\n\t}\n```\n\n#### Step 2. Add the dependency\n\n``` gradle\n\tdependencies {\n\t        compile 'com.github.GcsSloop:FontsManager:v1.0.0'\n\t}\n```\n\n\u003e ### if you use Maven, [Click Here](https://jitpack.io/#GcsSloop/FontsManager/)\n\n## Usage\n\n#### Initialization the fontsmanager before use\nYou can use any of the following four methods to initialize the FontManager.\n\n``` java\n\t// NO.1\n\tFontsManager.init(typeface);                     // use typeface\n\t// NO.2\n\tFontsManager.initFormAssets(context, fontPath);  // use context and path（file in Assets）\n\t// NO.3\n\tFontsManager.initFormFile(fontFile);             // use font file in sdcard\n\t// NO.4\n\tFontsManager.initFormFile(fontFilePath);         // use font filePath in sdcard\n```\n\n#### Change Activity font\n``` java\n\tFontsManager.changeFonts(activity);\n```\n#### Change View font\n``` java\n\tFontsManager.changeFonts(view);\n```\n#### Change ViewGroup font\n``` java\n\tFontsManager.changeFonts(viewGroup);\n```\n## Complete example\n``` java\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState){\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_main);\n\t\tFontsManager.initFormAssets(this, \"sao.ttf\");\t\t//initialization\n\t\tFontsManager.changeFonts(this);\t\t                //Change Activity font\n\t}\n```\n\n## Release Notes\n\nVersion | Notes\n   ---  |  ---\n v1.0.0 | From bintray to JitPack.\n\n\n## About Me\n\n\u003ca href=\"https://github.com/GcsSloop/SloopBlog/blob/master/FINDME.md\" target=\"_blank\"\u003e \u003cimg src=\"http://ww4.sinaimg.cn/large/005Xtdi2gw1f1qn89ihu3j315o0dwwjc.jpg\" width=300 height=100 /\u003e \u003c/a\u003e\n\n\n# License\n```\nCopyright (c) 2015 GcsSloop\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcssloop%2Ffontsmanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgcssloop%2Ffontsmanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcssloop%2Ffontsmanager/lists"}