DNESS / cocos2d-iphone

Automatically exported from code.google.com/p/cocos2d-iphone
1 stars 0 forks source link

CCLabelTTF ignores stroke color (stroke color is always white) #1499

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. CCLabelTTF* labelLucky = [CCLabelTTF labelWithString:@"LUCKY" 
fontName:@"HelveticaNeue-CondensedBold" fontSize:60];
2. [labelLucky enableStrokeWithColor:ccc3(255, 0, 0) size:2 updateImage:YES];
3. // add to some node

What is the expected output? What do you see instead?
I expect to see the label with red stroke. I always see white stroke

What cocos2d version are you using ?
cocos2d v2.1

What iOS / Mac SDK are you using ?
iOS 6.1.4

Debug or Release ?

Which target device / target OS are you using ?

iOS only: Does this happens on device ? or on the simulator ? or on both ?

Mac only: x86 or i386 ?

Please provide any additional information below.

Original issue reported on code.google.com by jonnyber...@gmail.com on 17 Jul 2013 at 7:55

GoogleCodeExporter commented 9 years ago
Debug or Release ?
Currently debug build.

Which target device / target OS are you using ?
iPhone

iOS only: Does this happens on device ? or on the simulator ? or on both ?
Only targeting device.

Please provide any additional information below.

Original comment by jonnyber...@gmail.com on 17 Jul 2013 at 7:57

GoogleCodeExporter commented 9 years ago
Uhh.. actually
2. [labelLucky enableStrokeWithColor:ccc3(255, 0, 0) size:2 updateImage:YES];

works. it gives red.

However

2. [labelLucky enableStrokeWithColor:ccc3(255, 25, 25) size:2 updateImage:YES];

does not, which I used first. This one always gives a white stroke.

Original comment by jonnyber...@gmail.com on 17 Jul 2013 at 8:01

GoogleCodeExporter commented 9 years ago
When running iOS 7 (device or simulator), the stroke color is always ignored.

Now
[label enableStrokeWithColor:ccc3(255, 0, 0) size:2 updateImage:YES];
and
[label enableStrokeWithColor:ccc3(255, 25, 25) size:2 updateImage:YES];

both result in a white stroke color.

Original comment by bennih...@yahoo.de on 13 Nov 2013 at 5:33

GoogleCodeExporter commented 9 years ago
Hi guys,
You should use NSMutableAttributedString in iOS7.
Cheers!

Original comment by tohmas.1...@gmail.com on 28 Nov 2013 at 5:24