{"id":3669,"url":"https://github.com/workarounds/typography","last_synced_at":"2026-01-17T13:02:50.867Z","repository":{"id":36946721,"uuid":"41254247","full_name":"workarounds/typography","owner":"workarounds","description":"**DEPRECATED**. Use the native and support library variants instead - https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml.html. An android library that makes it easy to add custom fonts to edittexts and textviews","archived":false,"fork":false,"pushed_at":"2016-02-25T19:10:17.000Z","size":152,"stargazers_count":43,"open_issues_count":1,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-16T15:39:39.832Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/workarounds.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-23T15:06:41.000Z","updated_at":"2021-11-06T00:02:35.000Z","dependencies_parsed_at":"2022-09-04T05:52:53.235Z","dependency_job_id":null,"html_url":"https://github.com/workarounds/typography","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/workarounds%2Ftypography","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workarounds%2Ftypography/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workarounds%2Ftypography/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/workarounds%2Ftypography/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/workarounds","download_url":"https://codeload.github.com/workarounds/typography/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228571844,"owners_count":17938772,"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-01-05T20:16:48.056Z","updated_at":"2026-01-17T13:02:50.843Z","avatar_url":"https://github.com/workarounds.png","language":"Java","funding_links":[],"categories":["Libraries"],"sub_categories":["Other"],"readme":"[![Build Status](https://travis-ci.org/workarounds/typography.svg?branch=master)](https://travis-ci.org/workarounds/typography)\n\n#### Add to your project ####\nAdd this line to your dependencies in `build.gradle`\n```\ncompile 'in.workarounds.typography:typography:0.0.8'\n```\n\n#### Using the views ####\nThere are two important attributes that define a font\n+ `font_name` Ex: 'Roboto', 'Helvetica'\n+ `font_variant` Ex: 'Bold', 'Condensed'\n\nSo if you want to add a TextView with the font 'Roboto-Condensed', you add the following to your layout file\n``` xml\n\u003cin.workarounds.typography.TextView\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\"\n    app:font_name=\"Roboto\"\n    app:font_variant=\"Condensed\"\n    android:textSize=\"16sp\"\n/\u003e\n```\n\nYou can utilize the following views to improve the typography in your app:\n`in.workarounds.typography.`\n+ TextView\n+ EditText\n+ AutoCompleteTextView\n+ Button\n+ Checkbox\n+ RadioButton\n+ ToggleButton\n\n#### Font Files ####\nPlace your fonts in `assets/fonts/` folder and use the following naming convention\n```\n`\u003cfont_name\u003e-\u003cfont_variant\u003e.\u003cext\u003e`\n```\n\n`\u003cext\u003e` can be `ttf` or `otf`. Both `font_name` and `font_variant` attribute are **case insensitive**.\n\nNote: If you want to use `Roboto.ttf`, do not use the `font_variant` attribute.\n\n#### FontLoader ####\n`FontLoader` is the class responsible for caching the `Typeface`s and setting the fonts to the Views. \n\nSet the default font name and font variant in your Application class\n\u003e `FontLoader.setDefaultFont(fontName, fontVariant)`\n\nEnable detailed logs(errors are always logged)\n\u003e `FontLoader.setLoggingEnabled(true)`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkarounds%2Ftypography","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fworkarounds%2Ftypography","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fworkarounds%2Ftypography/lists"}