0
CGFloat widthValue = -1.0;

CFNumberRef strokeWidth = CFNumberCreate(NULL,kCFNumberFloatType,&widthValue);

//Setup the attributes dictionary with font and color
NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:
                            (id)font, (id)kCTFontAttributeName,
                            _fontColor.CGColor, kCTForegroundColorAttributeName,
                            strokeWidth,kCTStrokeWidthAttributeName,
                            nil];

上記のコードで kCTStrokeWidthAttributeName を設定しましたが、まだ太字です。

文字列を太字にしたくありません。

どうすればそれを制御できますか????

4

2 に答える 2

0

チェックアウトkCTFontWeightTraitkCTFontBoldTrait

于 2012-05-11T04:02:37.587 に答える