English font working but non english (hindi) font not displaying in webview

تعرفه تبلیغات در سایت
عنوان عکس
عنوان عکس
عنوان عکس
عنوان عکس
عنوان عکس

آرشیو مطالب

جستجوگر

یافته ها در جستجو

    امکانات وب

    برچسب ها

    Vote count: 0

    English font working in html in webview but the non-english font (hindi) not displaying in html in webview.
    

    i am uploading my android studio code.

        
        
    
    
    
    
    
        
    
            
                
                
            
    
        
    
    
    
        
    
    
     
    
    
           
        
    
            
            
           
    

    Welcome to BLACK CHANCERY FONT

    1234567890 Am{X

    
    
    
    
    
    package in.wptrafficanalyzer.webviewcustomfont;
    
    import android.app.Activity;
    import android.os.Bundle;
    import android.view.Menu;
    import android.webkit.WebView;
    
    public class MainActivity extends Activity {
    
    WebView mWebView;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
    
            // Getting reference to WebView of the activity_main layout
            mWebView = (WebView) findViewById(R.id.webview);
    
            // Loading an html page into webview
            mWebView.loadUrl("file:///android_asset/demo.html");
        }
    
        @Override
        public boolean onCreateOptionsMenu(Menu menu) {
            // Inflate the menu; this adds items to the action bar if it is present.
            getMenuInflater().inflate(R.menu.main, menu);
            return true;
        }
    
    }
    
    1. HTML file demo.html is copied in assets folder
    2. BLKCHCRY.TTF font file is copied in fonts folder
    3. SHREE-DEV7-1076H.TTF font file is copied in fonts folder
    4. Link to download fonts (SHREE-DEV7-1076H.TTF and BLKCHCRY.TTF)

      https://drive.google.com/file/d/0B3fN9YVlzIHZOGdRSW9LSUJMUGs/view?usp=sharing_eil&ts=59e0ea90

      https://drive.google.com/file/d/0B3fN9YVlzIHZX2dLcS1kbWZ3dXc/view?usp=sharing_eil&ts=59e0ea90

    asked 36 secs ago
    Samuel

    نویسنده : استخدام کار بازدید : 0 تاريخ : جمعه 21 مهر 1396 ساعت: 23:07
    برچسب‌ها :