Answer the question
In order to leave comments, you need to log in
Drupal/How to integrate your font into ckeditor?
I'm trying to embed my font from a ttf file into ckeditor, in the search I found only the code provided below, which needs to be saved in the ckeditor.config.js file.
config.contentsCss = '/css/fonts.css';
//the next line add the new font to the combobox in CKEditor
config.font_names = 'Lobster/lobster;' + config.font_names;
@font-face {
font-family: Lobster; /* Имя шрифта */
src: url(../fonts/lobster.ttf); /* Путь к файлу со шрифтом */
}
Answer the question
In order to leave comments, you need to log in
Different browsers understand fonts in different formats, all of them need to be included.
Or like this: https://www.fontsquirrel.com/tools/webfont-generator - put ttf there - get the whole set at the output, put it in the fonts folder, copy the CSS, check the paths to the fonts.
Or like this: https://fonts.google.com/specimen/Lobster download as a set or via import
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question