我想在ck编辑器中添加hindi字体.我在ckeditor的content.css中添加了以下css.
font-family: 'kruti_dev_010regular';
src: url('fonts/kruti_dev_010-webfont.eot');
src: url('fonts/kruti_dev_010-webfont.eot?#iefix') format('embedded-opentype'),
url('fonts/kruti_dev_010-webfont.woff2') format('woff2'),
url('fonts/kruti_dev_010-webfont.woff') format('woff'),
url('fonts/kruti_dev_010-webfont.ttf') format('truetype'),
url('fonts/kruti_dev_010-webfont.svg#kruti_dev_010regular') format('svg');
font-weight: normal;
font-style: normal;
}
Run Code Online (Sandbox Code Playgroud)
我将以下行添加到ck编辑器的config.js中:
config.font_names = 'Kruti Dev 010/"krutidev_010";' + config.font_names;
Run Code Online (Sandbox Code Playgroud)
我使用这个链接生成字体和CSS:
我在ckeditor应用程序中将所有生成的字体添加到fonts /文件夹中.
现在kurti dev字体出现在字体样式下拉,但印地文字体不适用于此.我的代码中的问题在哪里?
小智 6
下载hindi字体Kruti010字体.这里
在CkEditor的Config.js中添加这个......
config.font_names = 'Hindi/Kruti;' + config.font_names;
Run Code Online (Sandbox Code Playgroud)
在ck编辑器的langs文件夹中添加hindi字体.
ckeditor/lang/Kruti/k010.ttf
Run Code Online (Sandbox Code Playgroud)
在ckeditor的content.css中添加css.
@font-face {
font-family: 'Kruti';
src: url('lang/Kruti/k010.eot');
src: local("Hindi"), url("lang/Kruti/k010.ttf") format("truetype");
font-weight: normal;
font-style: normal;
}
Run Code Online (Sandbox Code Playgroud)
正确检查你的路径.
归档时间: |
|
查看次数: |
2762 次 |
最近记录: |