Mar*_*rty 0 typography uilabel uifont ios ligature
出于某种原因,当我显示单词"Butterfly"(或带有"fl"的任何其他内容)时,"f"和"l"连接在顶部(见下图).字体是Century Gothic Bold.这是我用来设置UILabel的代码.从plist中检索标签的字符串:
UILabel *label = [[UILabel alloc] init];
label.text = [self.flashcardDelegate.alphabetArr objectAtIndex:index];
label.textColor = [UIColor colorWithRed:.733 green:0 blue:.03137 alpha:1];
label.backgroundColor = [UIColor clearColor];
label.frame = CGRectMake(ipad ? 210.0f : 65.0f,
ipad ? 650.0f : 300.0f,
ipad ? 340.0f : 185.0f,
ipad ? 250.0f : 135.0f);
label.font = [UIFont fontWithName:@"CenturyGothic-Bold" size:ipad ? 200 : 100];
label.textAlignment = UITextAlignmentCenter;
Run Code Online (Sandbox Code Playgroud)
知道为什么会这样吗?谢谢.

它被称为结扎,它是有意的.kCTLigatureAttributeName如果您正在使用Core Text,则可以使用该属性更改操作系统呈现连字的方式,或者NSLigatureAttributeName如果您正在使用,则可以使用NSAttributedString.
| 归档时间: |
|
| 查看次数: |
678 次 |
| 最近记录: |