Results 1 to 20 of 20

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Indic Font Rendering on iPhone... Yes it is working

  1. #1
    Wink Indic Font Rendering on iPhone... Yes it is working
    I can see on many place on the net that Indic Rendering is said not yet possible on the iPhone...
    This indic rendering is used by many languages, and it is possible on the iPhone (at least a Jailbreak iPhone).

    Here under is the concept used for iPhone 3.x.


    As Steve Jobs said, the iphone is run by OS X.
    And on OS X the rendering part is in the font it self, not like on windows or linux.
    What does it means ?

    If you have a font which have a proper rendering on OS X, then this font should be able to have the same rendering on the iPhone.

    OS X support Opentype font partially, but anyway the Opentype spec do not specify re-arranging of glyph.
    This part is done by the AAT table from Apple spec.



    So from the above logic, let's see what it means for the iPhone.

    arialuni.ttf do not contain any OpenType or AAT tables. It seems to be used only for basic unicode glyph rendering. (Mainly for MobileSafari)
    helvetica.ttf do not contain tables either.


    But for example Thonburi, GeezaPro .. include the AAT Tables (morx ...).
    So for the languages (Thai, Arabic...) already included in the iPhone the rendering is done with those fonts.

    I didn't find a way for adding a new additional font with AAT tables for another language, and the iPhone to use it.
    Must be possible to defined somewhere but I didn't find.


    What I did is to replace the helvetica.ttf (and the bold too) by a font having AAT tables.

    1- U take a font with AAT tables If you have a Mac, you should make sure that your font deliver a proper rendering in your Mac OS X first. (Try on Safari for ex.)
    2- U open your font with a font tool. Rename all the proper fields by Helevetica (see the content of the original Helevetica and HeleveticaBold).
    3- In order to not have problem, I, as well, put back my new font all the Helevetica glyph.
    4- Generate the font and put it on the iPhone. (take care to keep the original AAT tables during the generation of the font)

    And voila ... It works


    You can find some pictures, using this concept, with Khmer Rendering, one of the most more complex indic language, here Flickr: fabkk2002's Photostream

    PS: More details can be provided on the forum, it people are interested.
    Sorry for the above english writing. As french, I'm not native english speaker or writer.

  2. The Following User Says Thank You to fabkk2002 For This Useful Post:

    frozensun (2009-08-08)

  3. #2
    Default Could You Elaborate a Bit
    Thanks for sharing this. I have been trying to do this but it doesn't seem to be working. I am using the Gurmukhi.ttf file which is bundled with Mac OS X and combining it with Helvetica and changing the Header names to Helvetica. When I upload this to my iPhone the rendering just got worse. Perhaps I am generating the font without the AAT tables. I don't know how to check. Could you possibly elaborate on exactly what you did or which program you used and how you generated the font? Or could just create and upload a modified Helvetica with the Gurmukhi glyphs in it? Thanks. I'd really appreciate it.

  4. #3
    With what did you generate the font ? I used FontLab.
    Anyhow, I will try this weekend. I need to install Gurmukhi.ttf font on my Mac from the Leopard install.

    With what did you generate the font ? I used FontLab.
    Anyhow, I will try this weekend. I need to install Gurmukhi.ttf font on my Mac from the Leopard install.

    With what did you generate the font ? I used FontLab.
    Anyhow, I will try this weekend. I need to install Gurmukhi.ttf font on my Mac from the Leopard install.
    Last edited by fabkk2002; 2009-08-06 at 11:02 AM. Reason: Automerged Doublepost

  5. #4
    I opened the Gurmukhi.ttf file in Font Lab as well. Then I went to Font Info... and changed all the names to Helvetica and removed the font weight property. Then I merged the fonts and generated the Font with the default setting. I uploaded it and the rendering looked worse. Does this sound right? Thanks again.

  6. #5
    Hi,

    I did a quick and dirty font for u (sorry, I had only 15min). Available here :
    Free File Hosting Made Simple - MediaFire
    There is in the zip file, the font and the screenshot taken from web site wikipedia multi-language test page for indic rendering from my iphone using this Helvetica font done for you.



    U can test it. But I have an issue in the way that the latin glyphs are rendered bold with your version. I don't know why yet.
    But this will show you that it is working (seems, as I cannot read this language, only check wikipedia page). Tell me if the rendering is ok, or at least same as on your Mac.


    To go further, you need to do the Bold version of Helvetica, and I recommend to put the unicode fonts to arialuni.ttf too. The arialuni will be used in case the font type (italic ...) do not exist. Of course these cases, when the glyphs, are coming from arialuni.ttf, then no indic rendering. But if you do the Helvetica for Plain and Arial, then you should cove most of the case.

    BTW, I do not understand what you mean to merges the fonts ?
    When you are generating the font, do you see FontLab asking you for the AAT table to be saved or not ?

    Hope that it helps.

    PS: respring or reboot the iphone after font installation
    Last edited by fabkk2002; 2009-08-06 at 02:41 PM. Reason: add screenshot / add one more comment for respring

  7. #6
    It is very much working! I just tested your font and was excited to see that it rendered properly in my app. The rendering still only works in certain places, most likely because I put it in the Helvetica font and not in the arialuni.ttf. I now simply need to create an Arial Unicode MS font that has Gurmukhi (and Devanagari if possible) font glyphs and tables in it. You seem busy, so whenever you find time, I'd appreciate it if you'd write out step by step how you created the font in FontLab. I use a Merge Font function in the Tools menu and Font Lab doesn't ask me to export the AAT tables when I save. The reason the font that you sent me is bolded is because you didn't delete the Weight information in the Font Info... dialog. Once this is done, we are going to work towards writing up some code (undocumented API?) that will copy the Font to the /System/Library/Fonts/Cache folder on the first launch of my app. Hopefully Apple will overlook this when they are reviewing the app. :P

    There seems to be a problem with 'Merge Fonts...' function. When I import the other font, the Opentype and AAT tables are lost. How do you get the glyphs from one font to another?

    oddly enough after trying countless number of times to merge the fonts and copy and pasting from one to another the font still doesn't seem to render properly on the phone. I am definitely doing something wrong and am now really curious to know exactly what you did to get the Helvetica Gurmukhi font working. Thanks.
    Last edited by kulpreet; 2009-08-07 at 05:31 AM. Reason: Automerged Doublepost

  8. #7
    Happy to hear that it is working.
    As per my understanding, you shouldn't modify arialuni.ttf, by in putting the tables in it. As you can see, this font do not have any tables at all (no Opentype, no ATT, ...). Only put your unicode glyphs in it. In the Gurmukhi case, should be around 74 glyphs. This will be used in case the glyphs are not found in another font.
    My question is why some are not rendered properly ?
    1- Does the rendering is ok on your Mac OS X ?
    2- Do you use a different type (Bold, Italic ...). In this case, as mentioned earlier u should create the appropriate font type HelveticaBold ...

    For merging the font, I do not use the merge function.

    1- Open you Gurmukhi font. and Original Helvetica font
    2- Copy/Paste all the glyphs from Helvetica to Gurmukhi (from 0020 to 02C7).
    As those glyphs are widely used by the system, better to have good looking ones
    3- For the remaining glyphs from Helvetica to Gurmukhi use copy/ paste special (same method as in [Tutorial] Port Fonts to iPhone - gaurav’s rants)
    4- Modify all the names of the font in "Name and Copyright" to be as same as Helvetica Orginal
    5- Generate the font. (You should have a pop up message, for confirmation that you keep the AAT tables. You say yes. FontLab_ScreenShot on Flickr - Photo Sharing!

    Do the same procedure with HelveticaBold.
    If u want, u can create bold glyph from Gurmukhi with FontLab function, or keep it as plain. NB: The names for the bold font are slightly different,

    NB: In any case do not move or delete glyphs from Gurmukhi.ttf, this could impact the mapping with the AAT tables and the font will not work.
    I noticed with point 3 some glyphs are not transferred properly. I don't know why.
    If FontLab goes crazy when you generate, then before generating save your font as vfb. Close/ReOpen the vfb file and generate.

  9. The Following User Says Thank You to fabkk2002 For This Useful Post:

    frozensun (2009-08-08)

  10. #8
    When I said that it doesn't render in some places I meant certain places in my app. For example, the titlebar which has Gurmukhi characters doesn't render correctly after installing the Helvetica-Gurmukhi font you sent me because it still picks it up from the ArialUnicodeMS font. To get this working properly, I am going to have to adjust arialuni.ttf and not Helvetica.ttf. Unfortunately, for some strange reason I have had little luck in getting Font Lab working and the only complete working Gurmukhi font for the iPhone font that I have is that one you sent me. When I generate the font it does not ask me about the AAT tables like you showed, and I am absolutely clueless why. I have a feeling it might be something in the 'Options' dialog before generating the font, but I have not adjusted any of the settings. I did pretty much exactly what you told me. Here is the file I am currently working with. Take a look at it and tell me what you think.

    http://www.mediafire.com/file/tzmhdrzfadm/Gurmukhi.vfb

    Even when I simply open the Gurmukhi.ttf file and try to generate a font without any modification, it still does not give me the Warning about AAT tables.
    Last edited by kulpreet; 2009-08-07 at 07:46 AM. Reason: Automerged Doublepost

  11. #9
    Hi,
    It seems that you do not have any more the binary tables inside your font.
    I can see that you imported and decoded the tables. But you should, as well, keep the binary version.

    Have a look on my screenshot setting. Free File Hosting Made Simple - MediaFire


    I'm sorry, not Fontlab expert. I must have set it previously but do not remember how.
    I confirm that the file you posted, do not have the binary tables anymore. But just some translation to OpenType of the binary tables.

    Hi,
    It seems that you do not have any more the binary tables inside your font.
    I can see that you imported and decoded the tables. But you should, as well, keep the binary version.

    Have a look on my screenshot setting. Free File Hosting Made Simple - MediaFire


    I'm sorry, not Fontlab expert. I must have set it previously but do not remember how.
    I confirm that the file you posted, do not have the binary tables anymore. But just some translation to OpenType of the binary tables.

    I notice that, for a normal stock application the title should use the HelveticaBold. In your case, as your HelveticaBold do not contain the glyths then the system goes back to ArialUni for your title.
    At least it is what I saw during my testing phase, on few apps. I noticed as well that the HelveticaBold is used a lot.

    I think, if you have Helvetica & HelveticaBold then you should be ok.
    Last edited by fabkk2002; 2009-08-07 at 03:09 PM. Reason: Automerged Doublepost

  12. #10
    Thank You Very Much! Everything is working perfectly. I really appreciate you helping me out on this. I simply needed to check 'Write stored custom TrueType/Opentype tables" option. There are a few problem—biggest one being that the Helvetica font is larger in height and is sort of disproportional. But other than this I think I am using the first cell phone with full Unicode Gurmukhi support. Thanks again, and I apologize if I have taken up any of your time. I will post some type of report within the coming days.

    I now have to come up with a way to integrate it into my app. I am thinking I'll put the adjusted fonts in the application resource bundle under a different name and extension and then on the first launch I'll (use undocumented APIs to?) copy it into the System/Library/Fonts/Cache folder. Do you think there is any better way?

  13. #11
    It's a nice tutorial. It's the first tutorial for indic rendering font i've ever seen. I read all these description here. Then, I tried it myself with the Khmer Unicode font but it seemed to have some problem. After I replaced the Helvetica font in my iPhone and restarted it, it didn't open. I tried to copy the glyph from KhmerOS font to Helvetica and vice versa. Both of them didn't work.

    Can you show me how you did with Khmer font in your photo on flickr? And how did you add the keyboard to iphone with the font?

  14. #12
    frozensun:
    I sent u an email with the link to download

    kulpreet:
    In your case, I don't know a lot about iPhone programming. But I saw on stackoverflow, that you could use your own font. In this case, you should try to use the Gurmukhi.ttf, and see the result.
    If you can use your own font trough API, then by using Gurmukhi.ttf you should be able to have proper rendering. Once again, in OS X. the rendering is managed by the font itself. And once again, take care of the Bold aspect which is another font.
    My "workaround" to have Indic, is more for the whole system. Not in particular for an Application. The trick to change Helvetica, is only because, I didnt find any .plist to modify to point to another font for a special language. But for example for Thai, Arabic and others the system will point to the proper fonts with AAT tables for rendering.

  15. #13
    how to make everything on iphone in hindi .i eagerly await this
    like slide to unlock in hindi kholne ke liye ghisaayen .
    though i didn;'t understand the iota of u nerds still i want my iphone to show atleast the icons labels in hindi

  16. #14
    Thank you for your email. I received your email and the link to download those files. I tried to do like what you said in Readme file, then I was surprised to see the menu in iphone in Khmer. There is one problem. That's the keyboard. I couldn't write khmer.
    Anyway thanks for your hardworking.

  17. #15
    gauravsuneja: My first post is to show how to have rendering for Indic language. To change all the labels or other menu then it is another thing. In the iPhone you have localization file. Those would need to be created. And you will need to change another plist to add the Hindi as language option.
    Maybe on Cydia you could find available package ?

    frozensun: Other people downloaded those files and it is ok for them. It has been reported that I made a mistake in a file for Keyboard when you selected the Khmer language first before selecting the keyboard. You should select the Khmer Keyboard when you are in English Language, and after go back to Khmer language. I made a mapping mistake when you are in Khmer language. I will send you an updated file.

  18. The Following User Says Thank You to fabkk2002 For This Useful Post:

    frozensun (2009-08-09)

  19. #16
    Thanks fabkk2002. I was a bit drunk last night that I couldn't do it well. This morning I knew that it works fine.
    Thanks for the updated file you sent to me.

  20. #17
    For Gurnukhi fonts and others mediafire links available in the picture description at Flickr: fabkk2002's Photostream

  21. #18
    For Khmer iPhone full Unicode can visit khmeriphone - Project Hosting on Google Code
    All the future update will be in this google code web site

  22. #19
    Great work fabkk2002

    Would you be able to do it for Devanagari font as well. That would be awesome.

  23. #20
    Thank you fabkk2002 for helping make khmer keyboard

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •