type arabic font in html text fields

孤街浪徒 提交于 2019-12-13 05:15:18

问题


my requirement is to have an application which takes Arabic data as input in an html text field. i tried a few fonts but they don't let me type Arabic in html text field.any pointers

@font-face {
    font-family: 'Conv_ScheherazadeRegOT';
    src: url('fonts/ScheherazadeRegOT.eot');
    src: local('☺'), url('fonts/ScheherazadeRegOT.woff') format('woff'), url('fonts/ScheherazadeRegOT.ttf') format('truetype'), url('fonts/ScheherazadeRegOT.svg') format('svg');
    font-weight: normal;
    font-style: normal;
}



input
    {
        font-family:'Conv_ScheherazadeRegOT',Sans-Serif;        
    }

回答1:


Check out this list of web-safe fonts and feel free to choose whichever of them supports arabic. Note that a custom font (search @font-face) is not a bad idea since many platforms and browsers often use fallback fonts instead of the ones specified in a webpage. You can see some free-for-commercial-use fonts here.




回答2:


And make sure that you set up meta charset with UTF8!




回答3:


The suitable generic fonts like "Arial","Times New Roman".. before that you should check the page encoding (eg. utf-8).. and set the non-unicodes option at your OS to support arabic.



来源:https://stackoverflow.com/questions/18672505/type-arabic-font-in-html-text-fields

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!