{"id":19710475,"url":"https://github.com/rootstrap/rsfontsizes","last_synced_at":"2025-04-29T17:31:16.637Z","repository":{"id":48053867,"uuid":"99010695","full_name":"rootstrap/RSFontSizes","owner":"rootstrap","description":"RSFontSizes pod repository. Allows you to customize fonts and sizes in different screen sizes.","archived":false,"fork":false,"pushed_at":"2023-08-08T17:04:34.000Z","size":1271,"stargazers_count":27,"open_issues_count":2,"forks_count":9,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-18T00:45:39.151Z","etag":null,"topics":["carthage","cocoapod","font","font-size","fonts","helper","library","pod","screen-size","swift","utility"],"latest_commit_sha":null,"homepage":"https://rootstrap.com/","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rootstrap.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-08-01T14:33:01.000Z","updated_at":"2024-05-30T08:19:24.000Z","dependencies_parsed_at":"2024-11-11T22:07:35.864Z","dependency_job_id":"94082768-13d4-4686-99bd-58d0b3ad1be3","html_url":"https://github.com/rootstrap/RSFontSizes","commit_stats":{"total_commits":34,"total_committers":3,"mean_commits":"11.333333333333334","dds":0.2941176470588235,"last_synced_commit":"998340614ce87098b74de3b991e429ad7442dcf5"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2FRSFontSizes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2FRSFontSizes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2FRSFontSizes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2FRSFontSizes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rootstrap","download_url":"https://codeload.github.com/rootstrap/RSFontSizes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251549191,"owners_count":21607367,"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":["carthage","cocoapod","font","font-size","fonts","helper","library","pod","screen-size","swift","utility"],"created_at":"2024-11-11T22:07:29.490Z","updated_at":"2025-04-29T17:31:15.174Z","avatar_url":"https://github.com/rootstrap.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RSFontSizes\n\n[![CI Status](http://img.shields.io/travis/rootstrap/RSFontSizes.svg?style=flat\u0026colorA=000000)](https://travis-ci.org/rootstrap/RSFontSizes)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat\u0026colorA=000000)](https://github.com/Carthage/Carthage)\n[![Version](https://img.shields.io/cocoapods/v/RSFontSizes.svg?style=flat\u0026colorA=000000)](http://cocoapods.org/pods/RSFontSizes)\n[![License](https://img.shields.io/cocoapods/l/RSFontSizes.svg?style=flat\u0026colorA=000000)](http://cocoapods.org/pods/RSFontSizes)\n[![Platform](https://img.shields.io/cocoapods/p/RSFontSizes.svg?style=flat\u0026colorA=000000)](http://cocoapods.org/pods/RSFontSizes)\n\n\n\n## What is it?\n\nRSFontSize allows you to manage different font sizes for every device screen size in a flexible manner.\n- No more family name and styles typing/guessing every time you use a font.\n- Flexible size configurations(Fixed, Proportional to screen size and user specific).\n- Smart size estimation for vague specifications.\n- Save your font configurations for different UIFontTextStyle(.body, .headline, etc).\n\n## Installation\n\n### Swift Package Manager\n\n```\nhttps://github.com/rootstrap/RSFontSizes\n```\n\n- In XCode 11, go to File -\u003e Swift Packages -\u003e Add Package Dependency.\n- Enter the repo URL (https://github.com/rootstrap/RSFontSizes) and click Next.\n- Select the version rule desired (you can specify a version number, branch, or commit) and click Next.\n- Finally, select the target where you want to use the framework.\n\n**Note:** It is always recommended to lock your external libraries to a specific version.\n\n### Cocoapods\n\nRSFontSizes is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod \"RSFontSizes\"\n```\n\n### Carthage\n\n1. Add the following sources to your Cartfile:\n\n```\ngithub \"rootstrap/RSFontSizes\" ~\u003e 1.3.3\n```\n\n2. Run the `carthage update` command in the terminal.\n\n3. Link the resulting RSFontSizes.framework and Device.framework to your project.\n\n\n### Quick peek\n\nFrom poorly managed font sizes:\n\n![Normal Preview](https://github.com/rootstrap/RSFontSizes/blob/master/fixed-font-sizes.jpg?raw=true)\n\nFonts are set directly from IB.\n\nTo readable texts:\n\n![Preview With RSFontSizes](https://github.com/rootstrap/RSFontSizes/blob/master/dynamic-font-sizes.jpg?raw=true)\n\nFonts using RSFontSizes.\n\n\n## Start using RSFontSizes\n\nJust link your font assets to the project. Very detailed guide [here](http://codewithchris.com/common-mistakes-with-adding-custom-fonts-to-your-ios-app/).\n\nIf there are too many font files to add, FontBlaster pod is strongly recommended.\nIt's a simple solution to load your assets automatically instead of manually adding every file to the Info.plist.\n\n### Optionally add shortcuts to your favourite fonts.\n\n```swift\nextension Font {\n  //Your Custom font family names\n  static let raleway = \"Raleway\".font()!\n}\n```\n\n## Perks\n\nThere are different types to get your fonts correctly sized:\n\n-Fixed: The consumer sets the font point size or uses one of the provided classes(.small, .medium, etc). \n\n```swift\nlet font = Font.raleway.small\n```\n\nNo magic here :)\n\n-Proportional: The consumer will specify a base font size asociated with a device screen size. \n\n```swift\nlet font = Font.raleway.proportional(to: (.screen3_5Inch, 10))\n```\n\nThe result will be a font resized accordingly for the current device screen size.  \n\n-Screen Specific: The consumer defines a set of font sizes linked to an specific screen size. \n\n```swift\nlet font = Font.raleway.specific(values: [.screen4Inch: 12, \n                                          .screen4_7Inch: 13.5,\n                                          .screen5_5Inch: 16,\n                                          .screen9_7Inch: 20.2]))\n```\n\nIf a screen size is not specified the library will try to estimate the correct value for the font size.\n\n### You can also...\n\n#### Use a String as the Font family name\n\n```swift\nlet font = \"Raleway\".font(withWeight: .bold,\n                          size: .fixed(20))\n```\n\n#### Save your 'templates' to reuse\n\n```swift\nFont.save(font: someFont, forClass: .body)\n```\n\nAnd then use it elsewhere:\n\n```swift\nlet label.font = Font.with(class: .body)\n```\n\n## Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n\n## Credits\n\n**RSFontSizes** is maintained by [Rootstrap](http://www.rootstrap.com) and [German López](https://github.com/glm4) with the help of our [contributors](https://github.com/rootstrap/RSFontSizes/contributors).\n\n## License\n\nRSFontSizes is available under the MIT license. See the LICENSE file for more info.\n\n[\u003cimg src=\"https://s3-us-west-1.amazonaws.com/rootstrap.com/img/rs.png\" width=\"100\"/\u003e](http://www.rootstrap.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootstrap%2Frsfontsizes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frootstrap%2Frsfontsizes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootstrap%2Frsfontsizes/lists"}