相邻的"f"表示和"l"表示人物 [英] Adjoining "f" and "l" characters
问题描述
由于某种原因,当我显示单词"Butterfly"(或其他带有"fl"的东西)时,"f"和"l"在顶部连接(请参见下图).字体是Century Gothic Bold.这是我用来设置UILabel的代码.标签的字符串是从plist中检索的:
For some reason, when I display the word "Butterfly" (or anything else with an "fl"), the "f" and the "l" connect at the top (see image below). The font is Century Gothic Bold. This is the code I use to setup the UILabel. The string for the label is retrieved from a 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;
有人知道为什么会这样吗?谢谢.
Any idea why this would happen? Thanks.
推荐答案
It's called a ligature, and it's intentional. You can change how the OS renders ligatures by using the kCTLigatureAttributeName
attribute if you're using Core Text, or you can use NSLigatureAttributeName
if you're using NSAttributedString
.
这篇关于相邻的"f"表示和"l"表示人物的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!