Skip to content

Instantly share code, notes, and snippets.

@C4Examples
Created August 1, 2012 20:05
Show Gist options
  • Select an option

  • Save C4Examples/3230236 to your computer and use it in GitHub Desktop.

Select an option

Save C4Examples/3230236 to your computer and use it in GitHub Desktop.
C4Font, basic use with label
//
// C4Workspace.h
// Examples
//
// Created by Travis Kirton
//
#import "C4Workspace.h"
@implementation C4WorkSpace
-(void)setup {
//create a font by using a name
//you can check the names by visiting http://www.iosfonts.com
C4Font *font = [C4Font fontWithName:@"helvetica" size:60.0f];
//create a label to use the font (you could also use a text shape)
C4Label *l = [C4Label labelWithText:@"Hello C4" font:font];
l.center = self.canvas.center;
//add the label to the canvas
[self.canvas addLabel:l];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment