Hi guys,
I have used the following code :
fonts.css
@font-face {
font-family: "Hoefler Text";
src: url("http://www.wilsea.com/ckeditor2/fonts/Hoefler Text.ttf" ); /* IE */
src: local("Hoefler Text"), url("http://www.wilsea.com/ckeditor2/fonts/Hoefler Text.ttf") format("truetype"); /*non-IE*/
}
config.js
CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here.
// For the complete reference:
// http://docs.ckeditor.com/#!/api/CKEDITOR.config
config.height = 570;
config.extraPlugins='simpleuploads,oembed,widget,dialog,doksoft_maps';
//config.extraPlugins='oembed';
//config.extraPlugins = 'widget';
//config.extraPlugins = 'dialog';
config.filebrowserUploadUrl ='http://www.wilsea.com/ckeditor2/upload2/upload.php';
// The toolbar groups arrangement, optimized for two toolbar rows.
config.maps = [ 'doksoft_maps'];
config.toolbarGroups = [
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
{ name: 'links' },
{ name: 'insert' },
{ name: 'forms' },
{ name: 'tools' },
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
{ name: 'others' },
'/',
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
{ name: 'styles' },
{ name: 'colors' },
{ name: 'about' }
];
// Remove some buttons, provided by the standard plugins, which we don't
// need to have in the Standard(s) toolbar.
config.removeButtons = 'Underline,Subscript,Superscript';
// Se the most common block elements.
config.format_tags = 'p;h1;h2;h3;pre';
// Make dialogs simpler.
config.removeDialogTabs = 'image:advanced;link:advanced';
//config.removePlugins = '['flash]';
config.removePlugins = 'flash,iframe';
//MediaEmbed
config.contentsCss = 'http://www.wilsea.com/ckeditor2/fonts/fonts.css';
//the next line add the new font to the combobox in CKEditor
config.font_names = 'Hoefler Text/Hoefler Text;'+config.font_names;
};
the editor is at www.wilsea.com/ckeditor2/editor/html.
The font name appears in the list and is I select that font it shows okay (presumably because the font is installed on the Mac) When used on a PC the font shows in the drop down but does not change the font.
Any ideas what I am doing wrong here ?
Cheers
SteveW
my guess would be that you
my guess would be that you need to use a webfont, not just a True Type. IE won't support it. Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ all need woff.
More here http://css-tricks.com/snippets/css/using-font-face/
Working now.
Thanks for the input.
I am now using :
//config.contentsCss = 'http://www.wilsea.com/ckeditor2/fonts/fonts.css';
config.contentsCss = 'http://fonts.googleapis.com/css?family=Lobster';
config.contentsCss = 'http://fonts.googleapis.com/css?family=Cardo:400,400italic,700';
//the next line add the new font to the combobox in CKEditor
//config.font_names = 'Hoefler Text/Hoefler Text;'+config.font_names;
config.font_names = 'Cardo; serif;'+config.font_names;
config.font_names = 'serif;sans serif;monospace;cursive;fantasy;Lobster;'+config.font_names;
The Cardio font was a close as I could get to Hoefler.
Cheers
SteveW