خبر خوش برای برنامه نویسان فارسی زبان
در ios 7 انتخاب فونت های فارسی و عربی به سادگی امکان پذیر شده است و نیازی به ابزارهای جانبی نیست .
روش استفاده که بنده تست کردم (انواع فونت فارسی بخصوص نستعلیق) و بخوبی جواب نیز گرفتم :
کد PHP:
Add your custom font files into your project using XCode as resources.
Add a key to your info.plist file called “Fonts provided by application” ( Used to be called UIAppFonts).
It’s an array key.
For each font you have, enter the full name of your font file (including the extension).
Save info.plist.
Now in your application you can simply call [UIFont fontWithName:@"CustomFontName" size:12] to get the custom font to use with your UILabels and UITextView.
“CustomFontName” is not the font’s file name. It is the font name registered in the operating system. For example, if you try to use “Bauhaus Medium BT.ttf”, the “CustomFontName” should be “Bauhaus Md BT”, no extension “.ttf” is needed. You need to install the font in your system to find out what name it is. Some fonts have 2 names, you may need FontForge to find out and try which one works.
So far I found out that both ttf and otf format work out of the box. I haven’t tested other font formats yet.
نظر