Q:

CKEditor - Change font family on page load

Based on a JavaScript boolean, I need to change the font-family of CKEditor to Meiryo. 
So far I have tried adding the following in my custom JS inside an if condition. But this doesn't change the font-family.
config.font_style =
{
    element     : 'span',
    styles      : { 'font-family' : '#Meiryo' },
    overrides   : [ { element : 'font', attributes : { 'face' : null } } ]
};

and also this in my custom script
config.font_defaultLabel = 'Meiryo';
config.fontSize_defaultLabel = '12px'; 

None of them worked. Please let me know what am I doing wrong.
Thanks in advance!

A:

It is:
config.font_style =
    {
        element     : 'span',
        styles      : { 'font-family' : '#(Meiryo)' },
        overrides   : [ { element : 'font', attributes : { 'face' : null } } ]
    };

rather than:
config.font_style =
{
    element     : 'span',
    styles      : { 'font-family' : '#Meiryo' },
    overrides   : [ { element : 'font', attributes : { 'face' : null } } ]
};

All accepted:
145 CKEDITOR.config.font_names =
146     'Arial/Arial, Helvetica, sans-serif;' +
147     'Comic Sans MS/Comic Sans MS, cursive;' +
148     'Courier New/Courier New, Courier, monospace;' +
149     'Georgia/Georgia, serif;' +
150     'Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;' +
151     'Tahoma/Tahoma, Geneva, sans-serif;' +
152     'Times New Roman/Times New Roman, Times, serif;' +
153     'Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;' +
154     'Verdana/Verdana, Geneva, sans-serif';

From:
http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.font_style

