2

I have problem using arabic font for iOS. All fonts have the same render, and I am trying to test the workaround described here: Custom Arabic font in iOS

The problem is that I don't know how to use it, I added ArabicShaping h and cpp files The code compiles but I don't know what to do next.

Thanks in advance

Community
  • 1
  • 1
AmineG
  • 1,908
  • 2
  • 27
  • 43

2 Answers2

9

i have created new class in objective c that do just this, it allow you to use custom fonts for arabic text in ios, check github https://github.com/Accorpa/Arabic-Converter-From-and-To-Arabic-Presentation-Forms-B

AhmedHofny
  • 116
  • 2
  • 3
  • Nice, This works for some fonts, I tried it with two fonts, and one work while the second does not. Also there is a character that was not correctly displayed in my first test. – AmineG Mar 29 '12 at 13:48
  • i realized that not all fonts are actually supported in mac, if u use finder to see the font, u will see that it on the left it shows only an icon with "T" on it, this means this font will not work in the solution i made, but if you see in finder the font is showing characters like "A B C .." or Arabic characters this means it will work, try and tell me if u solved this or not. – AhmedHofny Mar 31 '12 at 17:16
  • I tested with GeezaProBold font, Finder display arabic characters, but it does not work. You can find this font in https://www.google.com/search?q=filetype%3Attf+GeezaProBold . Also when I tested with the font KufiStandardGK , it works, but I notice that the character "ه" is not well displayed – AmineG Apr 01 '12 at 12:21
  • Can someone list which fonts this works with? I tried with a few (unfortunately I didn't keep track of which) but all of them rendered with missing glyphs – Aky Jul 18 '12 at 10:08
1

For complex font rendering, you'll need to use another library as iOS does not support it. One such library is available on github.

https://github.com/mta452/SheenFigure

It uses FreeType or CoreGraphics for glyph rendering. Currently it supports Arabic/Urdu fonts with complete substitution and positioning.

Tayyab Akram
  • 366
  • 3
  • 12
  • this code working fine and supporting almost all the custom fonts but when I tried to use this code in my project it never worked, can you please see and share some video tutorial how to use that? Thanks. – Deepika Lalra Jul 15 '13 at 06:23