I use the next code for creating a png file. I need to write some text with the Arial 24. How can I do this? I can not find where I can set the Arial font style.
UIImage *image = [BSSharedObject getInstance].downloadedImage;
UILabel *label = [[UILabel alloc]init];
UIFont *font = [UIFont systemFontOfSize:24.0];
UIGraphicsBeginImageContextWithOptions(CGSizeMake(WIDTH, HEIGHT), NO, 1.0);
[message drawInRect:CGRectMake(INDENT, INDENT, WIDTH - 2 *INDENT ,600) withFont:font lineBreakMode:UILineBreakModeWordWrap alignment:UITextAlignmentLeft];
[image drawInRect:CGRectMake((WIDTH - INDENT - image.size.width), (HEIGHT - INDENT- image.size.height), image.size.width, image.size.height)];
UIImage *resultImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
[BSSharedObject getInstance].createdImage = resultImage;
UIImage *im = [BSSharedObject getInstance].createdImage;
return resultImage;
[UIFont fontWithName:@"Arial" size:24]This will get you your desired font. Calling
systemFontOfSizepredictably results in the return of a system font – in the case of iOS you getHelvetica Neue.