Skip to content

jrturton/NSString-Glyphs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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];

About

Category on NSString to return a UIBezierPath of the string in a font of your choice, using Core Text.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published