Appyet.com is a good template app for creating Android app based on your website contents but it faces difficulty to make Khmer Unicode readable after build on some phone.

osify-appyet-khmerunicode-solution

By default AppYet App using browser feature which is able to view Khmer only for rooted device that have placed well the Khmer font (as my assumption and tested as above picture).

According to AppYet blog, on a post of FAQ: How to work with Feed Module Extra HTML Header? we can use javascript or stylesheet in our feed posts display.

So to make Khmer unicode works in general (for most phones), we need to embed the font to each feed:

  • From Webfont by using Nokora
  • Use Javascript as following code and put in its Extra HTML header
<script type="text/javascript">
  WebFontConfig = {
    google: { families: [ 'Nokora:400,700:khmer' ] }
  };
  (function() {
    var wf = document.createElement('script');
    wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
      '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
    wf.type = 'text/javascript';
    wf.async = 'true';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(wf, s);
  })(); </script>

<style>
* {font-family: 'Nokora', serif;}
.appyet_title, .appyet_subtitle, p {font-family: 'Nokora', serif;}
</style>

appyet-khmerunicode-support-solution

The result is working fine.

Continue to read more post from Osify, install our Android App.

Share your though if you have found it useful.