dedecms How to modify the font: 1. Open the "include/ckeditor/ckeditor.js" file; 2. Search for "font_names" and then find the font list; 3. Add the required Chinese font and then clear it System cache is enough.
The operating environment of this tutorial: Windows 10 system, DedeCMS version 5.7, DELL G3 computer
dedecms How to modify the font?
dedecms Editor custom font
Figure 1. dedecms default font
dedecms does not have Song Dynasty or the like font, but users can add other fonts themselves. The implementation method is as follows:
(1). Open include/ckeditor/ckeditor.js,
(2) Search for font_names and find the font list.
Add the required Chinese fonts, after adding: i.font_names='Song style/Song style;Hei body/Hei body;Imitation Song Dynasty/Imitation Song Dynasty_GB2312;Kaizi/Kaiti_GB2312;Lishu/Lishu;Youyuan/Young Arial/Arial, Helvetica, sans-serif;Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/ Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva , sans-serif';
(3). Due to caching issues, it may not be displayed immediately after adding it. It is recommended to clear the system cache. The effect after adding the font is as follows
Figure 2. The effect after adding fonts to dedecms
Note: The added fonts should be written in the form of "Songti/Songti" instead of "Songti". That is, the format of "displayed "font name/actual font name".
Recommended learning: dedecms tutorial
The above is the detailed content of dedecms how to modify the font. For more information, please follow other related articles on the PHP Chinese website!