iOS不支持Ahmaric语言字符 [英] iOS does not support Ahmaric language character
问题描述
从其他问题和类似的问题,最好的解决方案是:
自定义的字体,而不是那个,你必须创建一个IBOutlet并以编程方式添加字体
$ b 所以:
1)将ttf字体文件放在资源文件夹中
并添加到info.plist中:
$ p $
< key> UIAppFonts<密钥>
< array>
< string> AmharicFontFile.ttf< / string>
< / array>
或者点击Xcode:
I)在plist文件(projectView,点击info.plist)
$ b $二)创建一个新的行应用程序提供的字体
$
item0 | b $ b AmharicFontFile.ttf
比在代码中:
UIFont * font = [UIFont fontWithName:@Amharicsize:20];
[label setFont:font];
其中Amharic是字体名称(不只是文件名没有扩展名,但可以相同)
I am new to objective c. I am working on keyboard for Amharic language. But i am facing some problem, iOS doese not suport Amharic language character. When I assign these Amharic language character (ወርትብቹኢኦፕ ) to my label title or button title it become boxes. I dont know that how to solve this issue. Help me any one please.
From other question and similar, best solution is:
You cannot add the custom fonts from there, instead of that, you have to create an IBOutlet and add the font programmatically
so: 1)Drag and drop ttf font file in your resources folder and add in info.plist:
<key>UIAppFonts</key>
<array>
<string>AmharicFontFile.ttf</string>
</array>
or by clicks in Xcode:
I)in plist file (projectView, click on info.plist)
II)create new row called "Fonts provided by application"
III)than create new item, ie:
item0 | AmharicFontFile.ttf
than in code:
UIFont *font = [UIFont fontWithName:@"Amharic" size:20];
[label setFont:font];
where "Amharic" is font name (not just filename without extension, but could be the same)
这篇关于iOS不支持Ahmaric语言字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!