国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Home Backend Development PHP Problem How to add 'Fake Song' and 'Fake Song GB2312' in Baidu Editor

How to add 'Fake Song' and 'Fake Song GB2312' in Baidu Editor

Feb 12, 2022 pm 02:26 PM

Baidu Editor is an editor that is often used in the development process. Because its functions are similar to Word, it is used by many developers to develop various projects. However, sometimes it encounters some special situations, such as small The editor recently encountered a client from a higher education institution who required that articles published on the website must be in imitation Song fonts or national standard imitation Song fonts, that is, "Imitation Song" and "Imitation Song GB2312", but the official version of Baidu Rich Text Editor is not available. The two fonts "Fang Song" and "Fang Song GB2312" are not provided.

After consulting various materials, the editor summarized how to add two fonts, "Fang Song" and "Fang Song GB2312", in Baidu Editor, as shown below.

First of all, before adding the two fonts "Fake Song" and "Fake Song GB2312", we need to know and understand how these two fonts are represented in the development application. The fonts in the official documents are As follows:

'songti':'宋體',
'kaiti':'楷體',
'heiti':'黑體',
'lishu':'隸書',
'yahei':'微軟雅黑',
'andaleMono':'andale mono',
'arial': 'arial',
'arialBlack':'arial black',
'comicSansMs':'comic sans ms',
'impact':'impact',
'timesNewRoman':'times new roman'

It is not difficult to find that the use of fonts during the development process often has its own way of expression. Through searching, the editor summarized the ways in which some commonly used fonts are expressed during the development process, as follows Display:

華文細(xì)黑:STHeiti Light [STXihei] 
華文黑體:STHeiti 
華文楷體:STKaiti 
華文宋體:STSong 
華文仿宋:STFangsong 
儷黑 Pro:LiHei Pro Medium 
儷宋 Pro:LiSong Pro Light 
標(biāo)楷體:BiauKai 
蘋果儷中黑:Apple LiGothic Medium 
蘋果儷細(xì)宋:Apple LiSung Light 
新細(xì)明體:PMingLiU 
細(xì)明體:MingLiU 
標(biāo)楷體:DFKai-SB 
黑體:SimHei 
宋體:SimSun 
新宋體:NSimSun 
仿宋:FangSong 
楷體:KaiTi 
仿宋_GB2312:FangSong_GB2312 
楷體_GB2312:KaiTi_GB2312 
微軟正黑體:Microsoft JhengHei 
微軟雅黑體:Microsoft YaHei 
隸書:LiSu 
幼圓:YouYuan 
華文細(xì)黑:STXihei 
華文楷體:STKaiti 
華文宋體:STSong 
華文中宋:STZhongsong 
華文仿宋:STFangsong 
方正舒體:FZShuTi 
方正姚體:FZYaoti 
華文彩云:STCaiyun 
華文琥珀:STHupo 
華文隸書:STLiti 
華文行楷:STXingkai 
華文新魏:STXinwei

From here, we can easily see that the display methods of "FangSong" and "FangSong GB2312" during the development process are: FangSong and FangSong_GB2312 respectively, so what we need to do next is Just add these two fonts to the corresponding locations in Baidu Rich Text Editor.

The process is as follows:

1. Find the file ueditor/lang/zh-cn/zh-cn.js, find the fontfamily node in it, add "imitate Song" and "Fake Song GB2312" fonts FangSong and FangSong_GB2312

'fontfamily':{
    'songti':'宋體',
    'kaiti':'楷體',
    'heiti':'黑體',
    'FangSong ': '仿宋',
    'FangSong_GB2312': '仿宋_GB2312',
    'lishu':'隸書',
    'yahei':'微軟雅黑',
    'andaleMono':'andale mono',
    'arial': 'arial',
    'arialBlack':'arial black',
    'comicSansMs':'comic sans ms',
    'impact':'impact',
    'timesNewRoman':'times new roman'
},

2. Find the file ueditor\ueditor.config.js (I also saw it on the Internet saying it is ueditor\editor_config.js, maybe a version problem), find it The commented out fontfamily node is about line 180. Remove the comment of this node and add the fonts FangSong and FangSong_GB2312

,'fontfamily':[
    { label:'',name:'songti',val:'宋體,SimSun'},
    { label:'',name:'kaiti',val:'楷體,楷體_GB2312, SimKai'},
    { label:'',name:'yahei',val:'微軟雅黑,Microsoft YaHei'},
    { label:'',name:'heiti',val:'黑體, SimHei'},
    { label: '', name: 'SimSun', val: '仿宋,SimSun' },
    { label:'',name:'FangSong_GB2312',val:'仿宋_GB2312 ,FangSong_GB2312'},
    { label:'',name:'lishu',val:'隸書, SimLi'},
    { label:'',name:'andaleMono',val:'andale mono'},
    { label:'',name:'arial',val:'arial, helvetica,sans-serif'},
    { label:'',name:'arialBlack',val:'arial black,avant garde'},
    { label:'',name:'comicSansMs',val:'comic sans ms'},
    { label:'',name:'impact',val:'impact,chicago'},
    { label:'',name:'timesNewRoman',val:'times new roman'}
]

of "Fake Song" and "Fake Song GB2312". This will appear when you edit the article again. There are two fonts: "Imitation Song" and "Imitation Song GB2312". Friends who need it can try it. I hope it will be helpful to you.

Related recommendations: "PHP Video Tutorial"

The above is the detailed content of How to add 'Fake Song' and 'Fake Song GB2312' in Baidu Editor. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
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

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)