Hi All,

We have an existing PDF Report creation module in one of our apps that is 
working great...  for English text.  This is what we are doing:

        NSFont* font = [NSFont fontWithName:@"Helvetica" size:12.0];
        CGContextSelectFont(state->mContextRef, [[font fontName] UTF8String], 
[font pointSize], kCGEncodingMacRoman);

        NSData* data = [string dataUsingEncoding:NSMacOSRomanStringEncoding];
        CGContextShowTextAtPoint(state->mContextRef, drawPt.x, drawPt.y, 
(char*) data.bytes, data.length);

We have a user who is entering Chinese text, which is obviously not making it 
to the PDF through this mechanism.

What is the recommended approach for taking an NSString* of text and drawing it 
to a CGContextRef where the text may contain characters of any language?

-Stevo Brock
 Head of Development
 Monkey Tools, LLC
 www.monkey-tools.com




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to