Add font in CK editor

I want to add a font in the CK editor widget. I changed the config.js in deployment to see the effect and it works. How can i manage that this font is structurally added in the widget. Anybody an idea?
3 answers

I would suggest to raise this as feature request on Github:


It can be done (see this) may be widget need adaption.


I would think you just need to do is change the config.font_names in the config file to point to a font family.
For example:


And load the font as a CSS font family inside the widget css.
Or if you wish to use the font globally throughout your application inside the main app css or even a index.html stylesheet load.

@font - face { font - family: 'MyWebFont';
    src: url('webfont.eot'); /* IE9 Compat Modes */
    src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ 
         url('webfont.woff2') format('woff2'), /* Super Modern Browsers */ 
         url('webfont.woff') format('woff'), /* Pretty Modern Browsers */ 
         url('webfont.ttf') format('truetype'), /* Safari, Android, iOS */   
         url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */ }