javascript - 在浏览器中正确显示阿姆哈拉语文本

标签 javascript css

我无法在我的网站上显示阿姆哈拉语,我在主标题(动态)链接的 css 属性文件中使用了@font-face,还在我添加阿姆哈拉语的每个类中添加了字体系列,但我只看到仅呈现文本样式但字符没有变化并显示奇怪的字符,如(በአማርኛለመጻፍየሚያስችልኪቦርድ) 问题是当我在 Windows 下安装相同的字体时,它在所有浏览器中都能正确显示。 那么我该如何替换并使网站依赖于我想要显示的字体。

请提供好的解决方案。该网站使用 javascript 和其他东西显示阿姆哈拉语:

<script src="http://www.abugidainfo.com/amharic/wp-includes/js/handleamharic.js" type="text/javascript"></script>

http://www.abugidainfo.com/amharic/ =这是显示阿姆哈拉语的网址 (/amharic/)

我还必须使用什么来在我的网站上显示阿姆哈拉语? 在此先感谢。我希望有人能提出一个好的解决方案。再次感谢。

CSS/(只有几行)

@font-face {
    font-family: 'abyssinica_silregular';
    src: url('abyssinicasil-r.eot');
    src: url('abyssinicasil-r.eot?#iefix') format('embedded-opentype'),
         url('abyssinicasil-r.woff') format('woff'),
         url('abyssinicasil-r.ttf') format('truetype'),
         url('abyssinicasil-r.svg#abyssinica_silregular') format('svg');
    font-weight: normal;
    font-style: normal;
}

/*-----------------------------------------------------------------------------------*/
/*  1.  Document Setup (body, common classes, structure etc)
/*-----------------------------------------------------------------------------------*/
html, body {
    height: 100%;
    -webkit-font-smoothing: antialiased;
}
body {
    margin: 0 auto;
    background-color: #fbfbfb;
    font-size: 13px;
    line-height: 18px;
    /*font: 100%/1.618 sans-serif;*/
}
a {
    color:#6e757b;
    -webkit-transition: color 100ms ease-in 0ms;
    -moz-transition: color 100ms ease-in 0ms;
    -o-transition: color 100ms ease-in 0ms;
    transition: color 100ms ease-in 0ms;
}
a:hover {
    color:#6b7278; /*008fd5;*/ 
}
h1, h2, h3, h4, h5 {
    color: #444;
}
h1 {
    font-size: 28px;
}
h2 {
    font-size: 26px;
}
h1, h2 {
    font-weight: normal;
}
#primary h1, #primary h2 {
    font-size: 20px;
    font-family: "Open Sans", Arial, Verdana;
    font-weight: normal;
}
#primary h2 {
    /*
    text-transform: uppercase;
    font-size: 16px;
    letter-spacing: -0.05em;
    color: #777;
*/
    color: #999999;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.045em;
    text-transform: uppercase;
    line-height: 2.3em;
}
#primary h1.entry-title {
    line-height: 1.3em;
    letter-spacing: -1px;
    font-size: 28px;
    font-weight: bold;
    padding: 0;
    margin: 0;
}
h1.site-title {
    font-size: 1.71429rem;
    font-family: "Open Sans", Verdana, Geneva, sans-serif;
    font-weight: 600;
    letter-spacing: -0.045em;
    display: inline-block;
    color: #F96;
}
h1.site-title a {
    color: #080809;
    text-decoration: none;
    font-size: 36px;
    font-style: normal;
    line-height: normal;
    font-weight: 300;
    text-transform: none;
    font-family: "Arial Black", Gadget, sans-serif;
}
h1.site-title a:hover {
    color: #CCCCCC;
}
h1.page-title {
    padding:0;
    margin: 0;
    line-height: 1.1;
    font-size: 28px;
    font-weight: normal;
}
h1.compact {
    letter-spacing: -1px;
    font-weight: normal;
    max-width: 70%; 
}
h2.entry-title {
    color: #5d7898;
    font-weight: 100;
    font-size: 24px;
}
p {
    font-size: 14px;
    line-height: 1.714285714;
}
#preroll_placeholder,
#Playerholder,
object,
embed,
iframe {
    width: 100%;
    margin: 0;
    padding:0; /*0 0 20px 0*/
}

最佳答案

确保您拥有相应的语言和 UTF 编码。

<html lang="am">
<head>
<title>Title goes here.</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>body goes here <body>
</html>

关于javascript - 在浏览器中正确显示阿姆哈拉语文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18048322/

相关文章:

CSS:对齐偶数元素

javascript - 使用 jquery 将属性附加到输入元素

javascript - 使用复合索引查询中的游标顺序

javascript - 我如何将数据绑定(bind)到 angularjs 中的该指令

javascript - 如何在屏幕中间显示div

javascript - 如何映射对象数组以提取与以前缀开头的键对应的值?

CSS 灯箱 slider 关闭

html - 使用 CSS 创建模糊纯色背景

html - 如何风格&

jquery - 如何制作一个旋转的文本按钮