Latest 1.1.0
Homepage https://github.com/dcoufal/DECResizeFontToFitRect
License MIT
Platforms ios 8.0, requires ARC
Authors

A simple library that can calculate the required point size for a font to fit any given string in any given rectangle, maximizing the size of the string (within the specified maximum and minimum point sizes).

This code has been used since 2010 in the Just Big Text product.

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

DECResizeFontToFitRect is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "DECResizeFontToFitRect"

Author

David Coufal, [email protected]

License

DECResizeFontToFitRect is available under the MIT license. See the LICENSE file for more info.

Release History

1.0 – Initial Public Release – March 2016

1.1 – Update to Swift 3 – November 2016

Latest podspec

{
    "name": "DECResizeFontToFitRect",
    "version": "1.1.0",
    "summary": "Code to calculate the optimal point size of a font to fit any given text and rect",
    "description": "This pod contains a function to calculate the optimal size of font that fits a given string in any given rectangle.",
    "homepage": "https://github.com/dcoufal/DECResizeFontToFitRect",
    "license": "MIT",
    "authors": {
        "David Coufal": "[email protected]"
    },
    "source": {
        "git": "https://github.com/dcoufal/DECResizeFontToFitRect.git",
        "tag": "1.1.0"
    },
    "social_media_url": "https://twitter.com/davidcoufal",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This