2014-12-14 3 views
0

대상 글꼴 (Futura Condensed ExtraBold)이 다음 코드와 함께 올바르게 설정되지 않았습니다. 글꼴이 전혀로드되지 않은 것 같습니다.Futura Condensed ExtraBold가 UIFontDescriptor가있는 ios 8에서 작동하지 않습니다.

UIFontDescriptor *futura = [UIFontDescriptor fontDescriptorWithFontAttributes:@{UIFontDescriptorFamilyAttribute:@"Futura"}]; 
UIFontDescriptor *condensedBoldFutura = [futura fontDescriptorWithSymbolicTraits:UIFontDescriptorTraitCondensed|UIFontDescriptorTraitBold]; 
self.headerLabel.font = [UIFont fontWithDescriptor:condensedBoldFutura size:40]; 

아무 도움이됩니다.

답변

1

해결 방법은 시도해 볼 수 있습니다.

UIFontDescriptor *fontDescriptor = [UIFontDescriptor fontDescriptorWithFontAttributes: 
            @{ 
             @"NSFontFamilyAttribute" : @"Futura", 
             @"NSFontFaceAttribute" : @"Bold Condensed" 
             }]; 
self.myLabel.font = [UIFont fontWithDescriptor:fontDescriptor size:40]; 
+0

'응축 ExtraBold' 지금 작동 특성이 작동하지 않는 이유는 어떤 아이디어를 작동합니까? – zuo

+1

iOS8에서 작동하지 않는 것 같지만 iOS7에서 작동합니다. – gabbler

0

올바른 글꼴 이름을 사용하고 있는지 확인하면됩니다. 사용 설정 해주세요 :

[self.myLabel의 setFont [UIFont fontWithName "투라-CondensedExtraBold"크기 @ 20.0f];

그것은 모든 아이폰 OS :

관련 문제