Home >CMS Tutorial >DEDECMS >dedecms how to modify the font

dedecms how to modify the font

藏色散人
藏色散人Original
2023-02-22 09:33:521205browse

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.

dedecms how to modify the font

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

dedecms how to modify the 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

dedecms how to modify the font

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn