I want to display arabic fonts(me_quran fonts) in my app. I have arabic text in my database.
Example of arabic text : "بِسْمِ ٱللَّهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ"
I have tried following things.
1) Try :
In info.plist file I have added .ttf
file in the fonts provided by application
option.
[UIFont fontWithName:@"me_quran" size:20.0];
2) Try :
Tried with the ArabicConverter demo code.
Results in the above try :
App is not displaying the proper arabic fonts. For example, it use to display circle where suppose to be half circle like moon shape. and many times it use to display only lines rather then line with some curves.
I got some links which are : link1 , link2. But this links does not contain much information on how to solve the problem.
The interesting thing which I got is to use glyphs
to solve the problem. But I do not know how to use it?
Can anybody give me some idea or link on how to use glyphs
in iOS? or any sample project ?
Arabic/Persian fonts are not well-defined in Xcode, and the only default font for them, is the "Geeza" font. I haven't used glyphs, but here's an API for Persian fonts, and that must work for Arabic fonts, too. Check it out, and see if that helps.
Salam,
I have tried your example using ArabicConverter, and it worked with me, may be you are using a different font than me_quran
before using ArabicConverter:
after using ArabicConverter:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With