I am having a problem with rendering text on a CALayer. AFAIK, it works just fine with all users ... except one, where the text just does not show!
This is my code for printing the text: @interface TextLayerDelegate : NSObject { // ... } - (void) drawLayer: (CALayer *) theLayer inContext: (CGContextRef) theContext; @end @implementation TextLayerDelegate - (void) drawLayer: (CALayer *) theLayer inContext: (CGContextRef) ctxt { // ... const char * str = [mesg cStringUsingEncoding: NSMacOSRomanStringEncoding]; // encoding must match with CGContextSelectFont() below if ( str && strlen(str) ) { CGContextSetShouldAntialias( ctxt, TRUE ); CGContextSetRGBFillColor( ctxt, 1.0, 1.0, 1.0, 1.0 ); CGContextSelectFont( ctxt, "AndaleMono", 14, kCGEncodingMacRoman ); // "Andale Mono" doesn't work either CGColorRef blue = CGColorCreateGenericRGB( 0.0, 0.0, 1.0, 1.0 ); CGContextSetShadowWithColor( ctxt, CGSizeMake(0,0), 10, blue ); CGContextShowTextAtPoint( ctxt, theLayer.bounds.origin.x + 7.0, theLayer.bounds.origin.y + 7.0, str, strlen(str) ); CFRelease( blue ); } } I have checked that 'str' does actually hold a valid string at the user's instance. (I logged it and had him send me the log file.) I have also tried different font sizes. I have also googled around. All to no avail. Does anybody have an idea what else might be wrong? Thanks a lot in advance. Gab.
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ 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