Latest 0.1
Homepage https://github.com/cemolcay/NSString-Glyphs
License MIT
Platforms ios , tvos 9.0, requires ARC
Frameworks UIKit
Authors

NSString-Glyphs

Category on NSString to return a UIBezierPath of the string in a font of your choice, using Core Text. You need to also add the Core Text framework to your project.

You can then create tasteful effects like this:

Lovely example

Using the category is very simple:

// Obtain a string with your desired character in it
NSString *test = @"4";
// Create the font you wish to use
UIFont *font = [UIFont systemFontOfSize:100];
// Get the path
UIBezierPath *glyphPath = [test bezierPathWithFont:font];

The path can then be used in any drawing code as you require:

[[UIColor whiteColor] set];
[glyphPath fill];

CocoaPods

pod 'NSStringGlyphs'

Latest podspec

{
    "name": "NSStringGlyphs",
    "version": "0.1",
    "summary": "Category on NSString to return a UIBezierPath of the string in a font of your choice, using Core Text",
    "description": "Category on NSString to return a UIBezierPath of the string in a font of your choice, using Core Text",
    "homepage": "https://github.com/cemolcay/NSString-Glyphs",
    "license": "MIT",
    "authors": {
        "Richard Turton": "[email protected]"
    },
    "platforms": {
        "ios": null,
        "tvos": "9.0"
    },
    "source": {
        "git": "https://github.com/cemolcay/NSString-Glyphs",
        "tag": "v0.1"
    },
    "source_files": "*.{h,m}",
    "frameworks": "UIKit",
    "requires_arc": true
}

Pin It on Pinterest

Share This