gpt4 book ai didi

iphone - 我可以在 UILabel 中使用 Tally 标记字体吗?

转载 作者:行者123 更新时间:2023-11-28 23:10:08 25 4
gpt4 key购买 nike

Apple 支持使用 tally 字体吗?我正在使用这里的计数:http://www.subtangent.com/maths/resources.php

使用此编码:

  UILabel *subtitle = [[UILabel alloc]initWithFrame:CGRectMake(125, 2, 185, 30)];
[subtitle setBackgroundColor:[UIColor clearColor]];
[subtitle setFont:[UIFont fontWithName:@"Tally_Regular.ttf" size:19.0]];
[subtitle setText:@"5"];
[subtitle setTextColor:[UIColor blackColor]];
[fLikeThis addSubview:subtitle];

但是它没有按预期工作,不知道为什么,因为我还在“应用程序提供的字体”中输入了字体名称。

最佳答案

在“应用程序提供的字体”中,您需要添加文件名,例如你的 ttf 文件不是字体名称按如下方式修改您的信息列表:-

<key>UIAppFonts</key>
<array>
<string>yourfontfilename.ttf </string>
</array>

并在标签中使用字体名称:-

[subtitle setFont:[UIFont fontWithName:@"fontname" size:19.0]];//This is your font name not your font file name.You can get font name by opening it with fontbook in mac.

如果仍然无法正常工作,则可能是 ttf 文件有问题。

关于iphone - 我可以在 UILabel 中使用 Tally 标记字体吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8484937/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com