How to load Myanmar font in android webview?

1.2k views Asked by At

I have set my custom font in css:

@font-face 
{
   font-family: 'myanmar';
   src: url('file:///android_asset/fonts/ZawgyiOne.ttf'); 
}
.mm
{
    display: inline;
    font-family: 'myanmar';
    font-size: 18pt;
    font-weight: 500;
    font-style:normal;
    color: red;
}

And this is my HTML:

<span class='mm'>This sentence contain:  ျမန္မာ ၾကိဳဆိုပါ၏</span>

I only see "This sentence contain:" and nothing appears in the place of myanmar font. Is there something else that I need to add on?

2

There are 2 answers

0
eimmer On

You might have to add the font to the resources. I'm still not sure that will translate to the webview though.

0
saturngod On

Android 4.3 didn't work with myanmar unicode. For zawgyi , you should try with SVG font for android webview. Other myanmar unicode can't work in android 4.3