iOS中的Tamil字体 [英] Tamil font in iOS

查看:54
本文介绍了iOS中的Tamil字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在xcode 4.2中安装泰米尔字体名称Bamini.ttf,并在info.plist中进行了特定更改.

I try to install Tamil font name Bamini.ttf in xcode 4.2 and I made the specific changes in info.plist.

它还没有显示在界面生成器"中吗?谁能帮我解决这个问题?

Yet its not showing in Interface builder? Can any one help me to sort out this issue?

推荐答案

据我所知,您已安装的新字体将永远不会在界面生成器"中列出.但是,您可以像这样在项目中使用它:

As far as I know new font that you've installed will never be listed in Interface builder.However you can use it in your project like this:

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

  1. Import yourfont.ttf into your project (check the "copy items into destination group's folder" and "add to targets").

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

Open appname-info.plist a. add a new row and name it Fonts provided by application (It's an array of strings) b. add an entry with the Bamini.ttf

然后尝试以下代码

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

*字体名称可以是不同的表单文件名.您可以通过打开字体来检查字体名称.

*Font name can be different form file name. You can check font name by opening that font.

这可以肯定地工作.

这篇关于iOS中的Tamil字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆