相邻的"f"和"l"字符

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)

知道为什么会这样吗?谢谢.

截图

use*_*321 5

它被称为结扎,它是有意的.kCTLigatureAttributeName如果您正在使用Core Text,则可以使用该属性更改操作系统呈现连字的方式,或者NSLigatureAttributeName如果您正在使用,则可以使用NSAttributedString.

  • 我的问题是一样的,"f"和"i"与iOS NSString上的字体"Late-Bold"合并.我没有使用任何CoreText或NSAttributedString.有帮助吗? (2认同)