I’m having a bit of a problem, drawing text on an image. When I’m trying to display English text, everything works just fine. The problem is, I need to localize text. When text is Russian, some strange symbols are shown. Any help would be appreciated.
I’m using following code, to draw text:
CGContextSetRGBFillColor(context, 0.0, 0.0, 0.0, 1);
char* text = (char *)[addText cStringUsingEncoding:NSUTF8StringEncoding];
CGContextSelectFont(context, "Impact", 20, kCGEncodingMacRoman);
CGContextSetTextDrawingMode(context, kCGTextFill);
CGContextShowTextAtPoint(context, 20, h+addHeightBelow, text, strlen(text));
And it shows following:

So in result, you should use Core Text, and the code is:
CTFontRef fontRef=CTFontCreateWithName((CFStringRef)@"Impact", 20.0f, NULL);
CGColorRef color=[UIColor blackColor].CGColor;
NSDictionary *attrDictionary=[NSDictionary dictionaryWithObjectsAndKeys:
(id)fontRef, (id)kCTFontAttributeName,
color, (id)kCTForegroundColorAttributeName,
nil];
NSAttributedString *stringToDraw=[[NSAttributedString alloc] initWithString:addText attributes:attrDictionary];
CTLineRef line=CTLineCreateWithAttributedString((CFAttributedStringRef)stringToDraw);
CGContextSetTextPosition(context, 20, h+addHeightBelow);
CTLineDraw(line, context);
CFRelease(line);
CFRelease(fontRef);
[stringToDraw release];
Use Core Text for drawing localized text on an image. Refer this for sample