48 Comments

  1. tendor

    Nathan this is amazing news for all Tibetans!!! We've been waiting for the phone that can type Tibetan unicode and it's finally here. Can't wait to see how this innovation will change our world and that of many others. Looking forward to more updates.

  2. tendor

    Nathan this is amazing news for all Tibetans!!! We've been waiting for the phone that can type Tibetan unicode and it's finally here. Can't wait to see how this innovation will change our world and that of many others. Looking forward to more updates.


  3. I often read your blog and always find it very interesting. Thought it was about time i let you know�Keep up the great work

    regards
    david swin
    ______________________________________________


  4. I often read your blog and always find it very interesting. Thought it was about time i let you know�Keep up the great work

    regards
    david swin
    ______________________________________________


  5. I will bookmark and continue reading your blog in the future! Thanks alot for the informative post!

    Thanks
    jenny martin
    ______________________________________________


  6. I will bookmark and continue reading your blog in the future! Thanks alot for the informative post!

    Thanks
    jenny martin
    ______________________________________________



  7. Wow…thanks man.. I was able to install my local language font too!


  8. Wow…thanks man.. I was able to install my local language font too!


  9. Thanks, Nathan. I just installed this on my Nexus, and it works to bring up Tibetan characters, but unfortunately they don't combine properly when stacking. Since the Tibetan combining rules for stacks are fairly arbitrary, stacks of glyphs are generally replaced by a single compound glyph when rendering. The result from this Android modification is indeed readable as Tibetan, but the letters run on top of each other improperly, and it's difficult to read. This must be due to the particular Unicode engine running on Android. It's difficult to get this working properly, since Tibetan has one of the most complex rendering systems of any Unicode language. Does anyone have any ideas on how to fix this? I might look into this if I have time, but unless Google comes out with a patch, I'm pretty sure it's going to require a custom kernel.


  10. Thanks, Nathan. I just installed this on my Nexus, and it works to bring up Tibetan characters, but unfortunately they don't combine properly when stacking. Since the Tibetan combining rules for stacks are fairly arbitrary, stacks of glyphs are generally replaced by a single compound glyph when rendering. The result from this Android modification is indeed readable as Tibetan, but the letters run on top of each other improperly, and it's difficult to read. This must be due to the particular Unicode engine running on Android. It's difficult to get this working properly, since Tibetan has one of the most complex rendering systems of any Unicode language. Does anyone have any ideas on how to fix this? I might look into this if I have time, but unless Google comes out with a patch, I'm pretty sure it's going to require a custom kernel.


  11. Hold on. As you can see from your screen shot Android is *not* applying the OpenType lookups in the font and so not forming Tibetan stacks properly. The same thing applies to other complex non-latin scripts (e.g. Devanagari, Arabic, Tamil, Thai, Sinhala, Bengali and so on) ~ conjunct ligatures are not formed properly on Android.

    In Windows this is normally handled by Uniscribe, on Linux by Pango in OpenOffice by ICU, and in Adobe applications by CoolType. According to Mike Reed CTL (Complex Text Layout) is not yet supported. [See: <http://groups.google.com/group/skia-discuss/bro

    One way round this would be to use GB/T20524-2006 encoding for Tibetan which uses Unicode PUA characters for pre-composed Tibetan stacks so you don't need OpenType lookups. On Windows you can use Andrew West's Babel Pad to do the conversion from normal Unicode to GB/T20524-2006 encoding. The Jomolhari Tibetan font supports both normal Unicode and GB/T20524-2006 encoding. – But that is not a real solution. Better to encourage people to start bugging Google to add CTL support to Android soon.

    -Chris

    (co-developer of Tibetan Machine Uni font & developer of Jomolhari Tibetan font)


  12. Chris, thanks for the clarification. The funny thing is that a number of Tibetans I showed it to didn't mention a thing! I suppose it takes someone versed in both the language and the technicality of the rendering to find the real bugs with a solution. Either that, or they were just being nice.

    Mostly I just wanted to get the conversation started, and see what the known and unknown issues are. I have the technical capability to make this happen, but not the linguistic expertise. Glad to make the connection.


  13. Tom, thanks for the note. Check out Chris Fynn's comment on this post. He has some more concrete knowledge about supporting stacking.


  14. Sounds good – if you can make this happen that would be great ~ not only for Tibetans but for the users of all complex scripts, which is a large portion of humanity.

    Actually because of the way Tibetan is encoded in the Unicode / iso10646 Standard, despite its complexity, it is probably more straightforward to handle than a lot of other complex scripts. What needs to be done to enable CTL support is to incorporate Pango <http://www.pango.org/>, HarfBuzz <http://www.freedesktop.org/wiki/Software/HarfBuzz> or the relevent part of ICU in Skia. I contributed in one way or another to the Tibetan rendering parts of all of these ~ as well as providing information to Microsoft when they implemented Tibetan rendering and collation and contributing to the Tibetan encoding in the Unicode standard itself.

    Pango, HarfBuzz and ICU are by now all well tested libraries that have been deployed in major applications for quite some time ~ so a lot of the difficult work, and working out the right lookups to apply for each script, has already been done and so adding CTL support to Android should not require any particular knowlege about individual scripts. For Arabic and Hebrew you also need to handle RTL text – but most of the code for that should also be in these libraries. Vertical scripts like Mongolian may also present particular problems. Another thing that is necessary is implementing proper line-breaking rules for each script.

    Pango / HarfBuzz might be a lot lighter than ICU which is a huge library.

    For a simple test of Tibetan rendering, point your browser at: <http://www.library.gov.bt/IT/complexscript.html…> – There you will find two example graphics, the first looks like what you get for a complex Tibetan script conjunct when CTL support is not enabled, and the second is what the same conjunct should look like when CTL for Tibetan is supported and enabled. Just below these is a box labled “browser test” where the same Tibetan script text should render with a real font.

    There are also pages and pages of Tibetan script content on that site which you can get to by clicking on the flag at the top right of any page.

    – Chris


  15. Hold on. As you can see from your screen shot Android is *not* applying the OpenType lookups in the font and so not forming Tibetan stacks properly. The same thing applies to other complex non-latin scripts (e.g. Devanagari, Arabic, Tamil, Thai, Sinhala, Bengali and so on) ~ conjunct ligatures are not formed properly on Android.

    In Windows this is normally handled by Uniscribe, on Linux by Pango in OpenOffice by ICU, and in Adobe applications by CoolType. According to Mike Reed CTL (Complex Text Layout) is not yet supported. [See: <http://groups.google.com/group/skia-discuss/bro

    One way round this would be to use GB/T20524-2006 encoding for Tibetan which uses Unicode PUA characters for pre-composed Tibetan stacks so you don't need OpenType lookups. On Windows you can use Andrew West's Babel Pad to do the conversion from normal Unicode to GB/T20524-2006 encoding. The Jomolhari Tibetan font supports both normal Unicode and GB/T20524-2006 encoding. – But that is not a real solution. Better to encourage people to start bugging Google to add CTL support to Android soon.

    -Chris

    (co-developer of Tibetan Machine Uni font & developer of Jomolhari Tibetan font)


  16. Chris, thanks for the clarification. The funny thing is that a number of Tibetans I showed it to didn't mention a thing! I suppose it takes someone versed in both the language and the technicality of the rendering to find the real bugs with a solution. Either that, or they were just being nice.

    Mostly I just wanted to get the conversation started, and see what the known and unknown issues are. I have the technical capability to make this happen, but not the linguistic expertise. Glad to make the connection.


  17. Tom, thanks for the note. Check out Chris Fynn's comment on this post. He has some more concrete knowledge about supporting stacking.


  18. Sounds good – if you can make this happen that would be great ~ not only for Tibetans but for the users of all complex scripts, which is a large portion of humanity.

    Actually because of the way Tibetan is encoded in the Unicode / iso10646 Standard, despite its complexity, it is probably more straightforward to handle than a lot of other complex scripts. What needs to be done to enable CTL support is to incorporate Pango <http://www.pango.org/>, HarfBuzz <http://www.freedesktop.org/wiki/Software/HarfBuzz> or the relevent part of ICU in Skia. I contributed in one way or another to the Tibetan rendering parts of all of these ~ as well as providing information to Microsoft when they implemented Tibetan rendering and collation and contributing to the Tibetan encoding in the Unicode standard itself.

    Pango, HarfBuzz and ICU are by now all well tested libraries that have been deployed in major applications for quite some time ~ so a lot of the difficult work, and working out the right lookups to apply for each script, has already been done and so adding CTL support to Android should not require any particular knowlege about individual scripts. For Arabic and Hebrew you also need to handle RTL text – but most of the code for that should also be in these libraries. Vertical scripts like Mongolian may also present particular problems. Another thing that is necessary is implementing proper line-breaking rules for each script.

    Pango / HarfBuzz might be a lot lighter than ICU which is a huge library.

    For a simple test of Tibetan rendering, point your browser at: <http://www.library.gov.bt/IT/complexscript.html…> – There you will find two example graphics, the first looks like what you get for a complex Tibetan script conjunct when CTL support is not enabled, and the second is what the same conjunct should look like when CTL for Tibetan is supported and enabled. Just below these is a box labled “browser test” where the same Tibetan script text should render with a real font.

    There are also pages and pages of Tibetan script content on that site which you can get to by clicking on the flag at the top right of any page.

    – Chris


  19. Yes, I pointed Chris Fynn at this thread, since he's such an expert in this area, and I knew he'd bring a lot to the discussion.

    I've done some experiments, and it looks like the GB/T20524-2006 encoding approach he suggested does indeed work to render Tibetan properly on Android. I'm working on some code to render a web page properly in Tibetan, by dynamically rewriting the Unicode before displaying it in a WebView, and I'll let you know when I've got a fully working example. Thanks for providing the impetus to get this working right!


  20. Yes, I pointed Chris Fynn at this thread, since he's such an expert in this area, and I knew he'd bring a lot to the discussion.

    I've done some experiments, and it looks like the GB/T20524-2006 encoding approach he suggested does indeed work to render Tibetan properly on Android. I'm working on some code to render a web page properly in Tibetan, by dynamically rewriting the Unicode before displaying it in a WebView, and I'll let you know when I've got a fully working example. Thanks for providing the impetus to get this working right!


  21. I've put up a description of how I got this to work, and a pointer to the Java code I ported to allow for this precomposed encoding approach up at:
    http://tom.to/blog/archives/76
    This is very exciting, to have some way to display Tibetan text on Android. Thanks!



  22. I've put up a description of how I got this to work, and a pointer to the Java code I ported to allow for this precomposed encoding approach up at:
    http://tom.to/blog/archives/76
    This is very exciting, to have some way to display Tibetan text on Android. Thanks!


  23. Great work, Tom!

    Aside from the browser, what about building a Tibetan supported eBook reader? Perhaps you could reach out to one of the popular eBook reader apps and ask them to support Tibetan using the code you've provided.


  24. Great work, Tom!

    Aside from the browser, what about building a Tibetan supported eBook reader? Perhaps you could reach out to one of the popular eBook reader apps and ask them to support Tibetan using the code you've provided.

  25. vkgokul

    Can someone help installing tamil on adroid phone


  26. Rafey Hijazy

    Hi both Tom and Nathan. Really good news for me to see someone working on CTL support on Android. I am willing to enable support for “Nafees Nastaleeq”, a type of Urdu Script on Android. Its a very complex font that requires very detailed processing, more than Arabic or probably even Tibetan. And i am looking forward to the option of doing something to port Pango onto Android. But for that I need guideline as to how I should proceed with it. I first of all need to know the exact path of the current rendering process on Android (which uses Freetype). Is there any tool that I can use to graphically display the source code layout, that can help me see the code flow and the API calls? Can you please provide me a step by step procedure on how to go about this? Thanks.

  27. Rafey Hijazy

    Chris, any help on the post below?

  28. Imliushi

    You should replace DroidSans.ttf with Tibetan or Dzongkha Fonts.two of my Tibetan Frens had successed with it.because DroidSans.ttf is the font of English,and Tibetan font also has English alphabets.but what confused them a lot is how to make Tibetan or Dzongkha font rendering propely on Android Phones.


  29. Hi, I would like to add Tibetan support to MultiLing Gingerbread Keyboard.
    Please suggest a compact keyboard layout in following format:

    q w e r t y u i o p
    a s d f g h j k l
    z x c v b n m

    shifted
    Q W E R T Y U I O P
    A S D F G H J K L
    Z X C V B N M

  30. Penjo

    I cant find MultiLing Keyboard on the Android Market on my phone

  31. Penjo

    Hi Nathan, 
    #cd /system/fonts
    #wget -o DroidSansFallback.ttf http://tinyurl.com/tibfont /system/fonts/DroidSansFallback.ttf
    does not seem to work on the terminal app. says its invalid (-o is invalid?)


  32. A few observations I had after doing this:

    1. If you use the suggestions below, replace the
    DroidSans.ttf instead of the DroidSansFallback.ttf, you won't lose Korean, Japanese
    or Chinese fonts.

    2. Sprint, my U.S. carrier, does not allow 16 bit character
    encoding for SMS. So if you want to read text messages (sending works fine) from
    iPhones or other Droids with Tibetan font, don't use Sprint. Alternatively
    you can use applications like Google Talk for sending messages back and forth.

    3. Doing this is really a lot easier than it seems. Thanks Nathan!






  33. Chris Fynn

    I recently got an early version of the ZTE Open phone running Firefox OS and found it was far easier to get this phone running with Tibetan script, font and keyboard layout than with Android. A patch has been submitted to Mozilla (Firefox) to include Dzongkha (Tibetan script) support in the operating system so that nothing needs to be installed by the user. Tibetan and Dzongkha dictionaries also work well.

    Smart phones running Firefox OS are scheduled to be released in the Indian market for $25 equivalent (about ₨ 1,500) early next year – so these will be affordable to ordinary Tibetans.

  34. nathan

    That is really great news! I have some good contacts at Mozilla, so let me know if they aren’t responsive.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>