在CK编辑器中添加印地文字体 [英] Add hindi font in CK editor

查看:90
本文介绍了在CK编辑器中添加印地文字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在ck编辑器中添加印地文字体。我在ckeditor的content.css中添加了以下CSS。

I want to add hindi fonts in ck editor. I added following css in content.css of ckeditor.

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;
}

我在ck编辑器的config.js中添加了以下行:

And i added the following line into config.js of ck editor:

config.font_names = 'Kruti Dev 010/"krutidev_010";' + config.font_names;

我使用以下链接生成字体和CSS:

I generate the fonts and css by using this link:

Webfont生成器

然后我将所有生成的字体添加到了ckeditor应用程序的fonts /文件夹中。

And i added all generated fonts into fonts/ folder in my ckeditor app.

现在kurti dev字体以字体样式下拉列表出现,但印地语字体未应用这样。我的代码在哪里出问题了?

Now kurti dev fonts is appearing in font style drop down but hindi font is not applying by this. Where is the problem in my code ?

推荐答案


  1. 下载印地语字体Kruti010字体。 a href = http://indiatyping.com/index.php/download/95-hindi-font-krutidev rel = noreferrer>此处

将其添加到CkEditor的Config.js中............

Add this in Config.js of CkEditor ......

config.font_names = 'Hindi/Kruti;' + config.font_names;

在ck编辑器的langs文件夹中添加印地文字体。

add hindi fonts in ck editor's langs folder.

ckeditor/lang/Kruti/k010.ttf

@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;
    }

正确检查路径。

这篇关于在CK编辑器中添加印地文字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆