You can change the default font in contents.css. You can also change them in the Font combo as explained here. If you want to add a custom font, it might be a bit harder, but it's doable. More on this here.
config.contentsCss = 'fonts.css';
//the next line add the new font to the combobox in CKEditor
config.font_names = 'fontnametodisplay/yourfontname;' + config.font_names;
/**
* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
config.contentsCss = 'fonts.css';
//the next line add the new font to the combobox in CKEditor
config.font_names = 'Brush Script MT Kursiv;' + config.font_names;
};
Than i create a new file font.css with this content:
Not sure if font name can have spaces, but this is just a blind guess. In situations like this, when we don't have a sample, it's hard to guess what you did wrong. Everything may be wrong - from paths to cache and other things ;|
You can change the default
You can change the default font in contents.css. You can also change them in the Font combo as explained here. If you want to add a custom font, it might be a bit harder, but it's doable. More on this here.
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Thanks for answer.
Thanks for answer.
This is what i must do:
add the following line to ckeditor/config.js
config.contentsCss = 'fonts.css';
//the next line add the new font to the combobox in CKEditor
config.font_names = 'fontnametodisplay/yourfontname;' + config.font_names;
next step:
where fonts.css has the @font-face attribute:
@font-face {
font-family: "yourfontname";
src: url( ../fonts/font.eot ); /* IE */
src: local("realfontname"), url("../fonts/font.TTF") format("truetype"); /*non-IE*/
}
My results:
config.js
/**
* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
config.contentsCss = 'fonts.css';
//the next line add the new font to the combobox in CKEditor
config.font_names = 'Brush Script MT Kursiv;' + config.font_names;
};
Than i create a new file font.css with this content:
@font-face {
font-family: "Brush Script MT Kursiv";
src: url( ../htdocs/ursus/wp-content/plugins/ckeditor-for-wordpress/ckeditor/BRUSHSCI.TTF ); /* IE */
src: local("Brush Script MT Kursiv"), url("../htdocs/ursus/wp-content/plugins/ckeditor-for-wordpress/ckeditor/BRUSHSCI.TTF") format("truetype"); /*non-IE*/
}
But it doesnt function.
I dont see it in the Backend, nothing changed.
Please help!
Thanks
barkeeper
Hello ^^,
Hello ^^,
has anyone a answer for me...please??
I love this editor, I use it some years, but now I need one font more :)
I need your help...please!!!!! :)
Thanks a lot!
barkeeper
Not sure if font name can
Not sure if font name can have spaces, but this is just a blind guess. In situations like this, when we don't have a sample, it's hard to guess what you did wrong. Everything may be wrong - from paths to cache and other things ;|
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!