Hi,

I need to add "Kruti Dev 010" font in ckeditor. I have downloaded font face and font.css and added following line in ckeditor.config.js :
config.font_names = 'Kruti Dev 010/"Kruti Dev 010";' + config.font_names;
But my Kruti dev fonts are not coming.

However when I use
config.font_names = 'Kruti Dev 010/"KrutiDev010";' + config.font_names;

Then my Kruti Dev fonts are coming. But I need same name "Kruti Dev 010" in my style because it is default font face name.

Please help me to add "Kruti Dev 010" in my Ckeditor.
Thanks

Comments

ankitpandya2706’s picture

Issue tags: +Kruti Dev 10

Could you tell me that how or where you downloaded font face and font.css and is this working( Can u type in Kruti Dev 10 in Hindi)
Please help if u could i am completely frustrated searching this.

subu.purohit’s picture

Hi Ankit,

You have to download krutidev font and then you have to generate font face for it. There is a site which will provide you font face with css:
http://www.fontsquirrel.com/tools/webfont-generator
Click on "Add font" button and you will be ask for upload font and then it will give you a directory with web font.

After getting your font you have to add font's css in content.css file of ckeditor directory (Once you will a folder from fontsquirrel site you will get a completly working font then you can take css and font from there)

@font-face {
    font-family: 'KrutiDev010Regular';
    src: url('krutidev_010/k010-webfont.eot');
    src: url('krutidev_010/k010-webfont.eot?#iefix') format('embedded-opentype'),
         url('krutidev_010/k010-webfont.woff') format('woff'),
         url('krutidev_010/k010-webfont.ttf') format('truetype'),
         url('krutidev_010/k010-webfont.svg#KrutiDev010Regular') format('svg');
    font-weight: normal;
    font-style: normal;

}

and in ckeditor.config.js, add this line:
config.font_names = 'Kruti Dev 010/"krutidev_010";' + config.font_names;

this will add Krutidev font in your editor now you will need to add same css in your css file for web.

wwalc’s picture

This one works at least I think?

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

"Then my Kruti Dev fonts are coming"

What do you mean exactly? Is the proper span tag created by CKEditor when you select your font in font combo? I mean:
<span style="font-family:kruti dev 010;">