gpt4 book ai didi

ios - iOS 中的泰米尔语字体

转载 作者:行者123 更新时间:2023-11-28 22:48:15 24 4
gpt4 key购买 nike

我尝试安装泰米尔字体名称 Bamini.ttfxcode 4.2我在 info.plist 中进行了具体更改.

但它没有显示在 Interface builder 中?谁能帮我解决这个问题?

最佳答案

据我所知,您安装的新字体永远不会在 Interface builder 中列出。但是您可以像这样在您的项目中使用它:

  1. yourfont.ttf 导入您的项目(选中“将项目复制到目标组的文件夹”和“添加到目标”)。

  2. 打开 appname-info.plistA。添加一个新行并将其命名为 Fonts provided by application (它是一个字符串数组)b.使用 Bamini.ttf

    添加条目

    然后试试下面的代码

    UIFont *myFont = [UIFont fontWithName:@"Font name" size:18];
    [txtLabel setFont:myFont];

*字体名称可以是不同的格式文件名。您可以通过打开该字体来检查字体名称。 enter image description here

这肯定有效。

关于ios - iOS 中的泰米尔语字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12633744/

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