问题
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