文档章节

IDEA添加设置中英文字体

bro
 bro
发布于 2014/03/17 18:26
字数 1264
阅读 5171
收藏 2

应该有不少童鞋在用IDEA作为java的开发环境吧.在IDEA里面设置字体的时候只能看到寥寥几个选项,而不能使用程序员经常使用的monaco等自定义字体

这时,你打开IDEA安装目录

D:\Program Files (x86)\JetBrains\IntelliJ IDEA 135.406\jre\jre\lib

应该能看得懂吧~

在这个路径下添加文件

fontconfig.properties

内容是

# %W% %E%
#
# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
# URL: http://willerce.com/post/intellij-ide-fontconfig

# Version

version=1

# Component Font Mappings

allfonts.chinese-ms936=Microsoft Yahei
allfonts.chinese-ms936-extb=Microsoft Yahei
allfonts.chinese-gb18030=Microsoft Yahei
allfonts.chinese-gb18030-extb=Microsoft Yahei
allfonts.chinese-hkscs=Microsoft Yahei
allfonts.chinese-ms950-extb=Microsoft Yahei
allfonts.devanagari=Mangal
allfonts.dingbats=Wingdings
allfonts.lucida=Lucida Sans Regular
allfonts.symbol=Symbol
allfonts.thai=Lucida Sans Regular

serif.plain.alphabetic=Times New Roman
# serif.plain.chinese-ms950=MingLiU
# serif.plain.chinese-ms950-extb=MingLiU-ExtB
serif.plain.chinese-ms950=Microsoft Yahei
serif.plain.chinese-ms950-extb=Microsoft JhengHei-ExtB
serif.plain.hebrew=David
serif.plain.japanese=MS Mincho
serif.plain.korean=Batang

serif.bold.alphabetic=Times New Roman Bold
# serif.bold.chinese-ms950=PMingLiU
# serif.bold.chinese-ms950-extb=PMingLiU-ExtB
serif.bold.chinese-ms950=Microsoft Yahei
serif.bold.chinese-ms950-extb=Microsoft JhengHei-ExtB
serif.bold.hebrew=David Bold
serif.bold.japanese=MS Mincho
serif.bold.korean=Batang

serif.italic.alphabetic=Times New Roman Italic
# serif.italic.chinese-ms950=PMingLiU
# serif.italic.chinese-ms950-extb=PMingLiU-ExtB
serif.italic.chinese-ms950=Microsoft Yahei
serif.italic.chinese-ms950-extb=Microsoft JhengHei-ExtB
serif.italic.hebrew=David
serif.italic.japanese=MS Mincho
serif.italic.korean=Batang

serif.bolditalic.alphabetic=Times New Roman Bold Italic
# serif.bolditalic.chinese-ms950=PMingLiU
# serif.bolditalic.chinese-ms950-extb=PMingLiU-ExtB
serif.bolditalic.chinese-ms950=Microsoft Yahei
serif.bolditalic.chinese-ms950-extb=Microsoft JhengHei-ExtB
serif.bolditalic.hebrew=David Bold
serif.bolditalic.japanese=MS Mincho
serif.bolditalic.korean=Batang

sansserif.plain.alphabetic=Arial
# sansserif.plain.chinese-ms950=MingLiU

# sansserif.plain.chinese-ms950-extb=MingLiU-ExtB
sansserif.plain.chinese-ms950=Microsoft Yahei
sansserif.plain.chinese-ms950-extb=Microsoft JhengHei-ExtB
sansserif.plain.hebrew=David
sansserif.plain.japanese=MS Gothic
sansserif.plain.korean=Gulim

sansserif.bold.alphabetic=Arial Bold
# sansserif.bold.chinese-ms950=PMingLiU
# sansserif.bold.chinese-ms950-extb=PMingLiU-ExtB
sansserif.bold.chinese-ms950=Microsoft Yahei
sansserif.bold.chinese-ms950-extb=Microsoft JhengHei-ExtB
sansserif.bold.hebrew=David Bold
sansserif.bold.japanese=MS Gothic
sansserif.bold.korean=Gulim

sansserif.italic.alphabetic=Arial Italic
# sansserif.italic.chinese-ms950=PMingLiU
# sansserif.italic.chinese-ms950-extb=PMingLiU-ExtB
sansserif.italic.chinese-ms950=Microsoft Yahei
sansserif.italic.chinese-ms950-extb=Microsoft JhengHei-ExtB
sansserif.italic.hebrew=David
sansserif.italic.japanese=MS Gothic
sansserif.italic.korean=Gulim

sansserif.bolditalic.alphabetic=Arial Bold Italic
# sansserif.bolditalic.chinese-ms950=PMingLiU
# sansserif.bolditalic.chinese-ms950-extb=PMingLiU-ExtB

sansserif.bolditalic.chinese-ms950=Microsoft Yahei
sansserif.bolditalic.chinese-ms950-extb=Microsoft JhengHei-ExtB
sansserif.bolditalic.hebrew=David Bold
sansserif.bolditalic.japanese=MS Gothic
sansserif.bolditalic.korean=Gulim

# monospaced.plain.chinese-ms950=MingLiU
# monospaced.plain.chinese-ms950-extb=MingLiU-ExtB
monospaced.plain.chinese-ms950=Microsoft Yahei
monospaced.plain.chinese-ms950-extb=Microsoft JhengHei-ExtB
monospaced.plain.hebrew=David
monospaced.plain.japanese=MS Gothic
monospaced.plain.korean=GulimChe

# monospaced.bold.chinese-ms950=PMingLiU
# monospaced.bold.chinese-ms950-extb=PMingLiU-ExtB
monospaced.bold.chinese-ms950=Microsoft Yahei
monospaced.bold.chinese-ms950-extb=Microsoft JhengHei-ExtB
monospaced.bold.hebrew=David Bold
monospaced.bold.japanese=MS Gothic
monospaced.bold.korean=GulimChe

# monospaced.italic.alphabetic=Courier New Italic
# monospaced.italic.chinese-ms950=PMingLiU

# monospaced.italic.chinese-ms950-extb=PMingLiU-ExtB
monospaced.italic.chinese-ms950=Microsoft Yahei
monospaced.italic.chinese-ms950-extb=Microsoft JhengHei-ExtB
monospaced.italic.hebrew=David
monospaced.italic.japanese=MS Gothic
monospaced.italic.korean=GulimChe

# monospaced.bolditalic.chinese-ms950=PMingLiU
# monospaced.bolditalic.chinese-ms950-extb=PMingLiU-ExtB
monospaced.bolditalic.chinese-ms950=Microsoft Yahei
monospaced.bolditalic.chinese-ms950-extb=Microsoft JhengHei-ExtB
monospaced.bolditalic.hebrew=David Bold
monospaced.bolditalic.japanese=MS Gothic
monospaced.bolditalic.korean=GulimChe

# style1: Consolas 
#monospaced.plain.alphabetic=Consolas
#monospaced.bold.alphabetic=Consolas Bold
#monospaced.italic.alphabetic=Consolas Italic
#monospaced.bolditalic.alphabetic=Consolas Bold Italic

#style 2: Courier New
monospaced.plain.alphabetic=Monaco
monospaced.bold.alphabetic=Monaco Bold
monospaced.italic.alphabetic=Monaco Italic
monospaced.bolditalic.alphabetic=Monaco Bold Italic

dialog.plain.alphabetic=Arial
# dialog.plain.chinese-ms950=MingLiU
# dialog.plain.chinese-ms950-extb=MingLiU-ExtB
dialog.plain.chinese-ms950=Microsoft Yahei
dialog.plain.chinese-ms950-extb=Microsoft JhengHei-ExtB
dialog.plain.hebrew=David
dialog.plain.japanese=MS Gothic
dialog.plain.korean=Gulim

dialog.bold.alphabetic=Arial Bold

# dialog.bold.chinese-ms950=PMingLiU
# dialog.bold.chinese-ms950-extb=PMingLiU-ExtB
dialog.bold.chinese-ms950=Microsoft Yahei
dialog.bold.chinese-ms950-extb=Microsoft JhengHei-ExtB
dialog.bold.hebrew=David Bold
dialog.bold.japanese=MS Gothic
dialog.bold.korean=Gulim

dialog.italic.alphabetic=Arial Italic
# dialog.italic.chinese-ms950=PMingLiU
# dialog.italic.chinese-ms950-extb=PMingLiU-ExtB
dialog.italic.chinese-ms950=Microsoft Yahei
dialog.italic.chinese-ms950-extb=Microsoft JhengHei-ExtB
dialog.italic.hebrew=David
dialog.italic.japanese=MS Gothic
dialog.italic.korean=Gulim

dialog.bolditalic.alphabetic=Arial Bold Italic
# dialog.bolditalic.chinese-ms950=PMingLiU
# dialog.bolditalic.chinese-ms950-extb=PMingLiU-ExtB
dialog.bolditalic.chinese-ms950=Microsoft JhengHei
dialog.bolditalic.chinese-ms950-extb=Microsoft JhengHei-ExtB
dialog.bolditalic.hebrew=David Bold
dialog.bolditalic.japanese=MS Gothic
dialog.bolditalic.korean=Gulim

dialoginput.plain.alphabetic=Courier New
# dialoginput.plain.chinese-ms950=MingLiU
# dialoginput.plain.chinese-ms950-extb=MingLiU-ExtB
dialoginput.plain.chinese-ms950=Microsoft JhengHei
dialoginput.plain.chinese-ms950-extb=Microsoft JhengHei-ExtB
dialoginput.plain.hebrew=David
dialoginput.plain.japanese=MS Gothic
dialoginput.plain.korean=Gulim

dialoginput.bold.alphabetic=Courier New Bold
# dialoginput.bold.chinese-ms950=PMingLiU
# dialoginput.bold.chinese-ms950-extb=PMingLiU-ExtB
dialoginput.bold.chinese-ms950=Microsoft Yahei
dialoginput.bold.chinese-ms950-extb=Microsoft JhengHei-ExtB
dialoginput.bold.hebrew=David Bold
dialoginput.bold.japanese=MS Gothic
dialoginput.bold.korean=Gulim

dialoginput.italic.alphabetic=Courier New Italic
# dialoginput.italic.chinese-ms950=PMingLiU
# dialoginput.italic.chinese-ms950-extb=PMingLiU-ExtB
dialoginput.italic.chinese-ms950=Microsoft Yahei
dialoginput.italic.chinese-ms950-extb=Microsoft JhengHei-ExtB
dialoginput.italic.hebrew=David
dialoginput.italic.japanese=MS Gothic
dialoginput.italic.korean=Gulim

dialoginput.bolditalic.alphabetic=Courier New Bold Italic
# dialoginput.bolditalic.chinese-ms950=PMingLiU
# dialoginput.bolditalic.chinese-ms950-extb=PMingLiU-ExtB
dialoginput.bolditalic.chinese-ms950=Microsoft JhengHei
dialoginput.bolditalic.chinese-ms950-extb=Microsoft JhengHei-ExtB
dialoginput.bolditalic.hebrew=David Bold

dialoginput.bolditalic.japanese=MS Gothic
dialoginput.bolditalic.korean=Gulim

# Search Sequences

sequence.allfonts=alphabetic/default,dingbats,symbol

sequence.serif.GBK=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extb
sequence.sansserif.GBK=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extb
sequence.monospaced.GBK=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extb
sequence.dialog.GBK=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extb
sequence.dialoginput.GBK=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extb

sequence.serif.GB18030=alphabetic,chinese-gb18030,dingbats,symbol,chinese-gb18030-extb
sequence.sansserif.GB18030=alphabetic,chinese-gb18030,dingbats,symbol,chinese-gb18030-extb
sequence.monospaced.GB18030=alphabetic,chinese-gb18030,dingbats,symbol,chinese-gb18030-extb
sequence.dialog.GB18030=alphabetic,chinese-gb18030,dingbats,symbol,chinese-gb18030-extb
sequence.dialoginput.GB18030=alphabetic,chinese-gb18030,dingbats,symbol,chinese-gb18030-extb

sequence.serif.x-windows-950=alphabetic,chinese-ms950,dingbats,symbol,chinese-ms950-extb
sequence.sansserif.x-windows-950=alphabetic,chinese-ms950,dingbats,symbol,chinese-ms950-extb
sequence.monospaced.x-windows-950=alphabetic,chinese-ms950,dingbats,symbol,chinese-ms950-extb
sequence.dialog.x-windows-950=alphabetic,chinese-ms950,dingbats,symbol,chinese-ms950-extb
sequence.dialoginput.x-windows-950=alphabetic,chinese-ms950,dingbats,symbol,chinese-ms950-extb

sequence.serif.x-MS950-HKSCS=alphabetic,chinese-ms950,chinese-hkscs,dingbats,symbol,chinese-ms950-extb
sequence.sansserif.x-MS950-HKSCS=alphabetic,chinese-ms950,chinese-hkscs,dingbats,symbol,chinese-ms950-extb
sequence.monospaced.x-MS950-HKSCS=alphabetic,chinese-ms950,chinese-hkscs,dingbats,symbol,chinese-ms950-extb
sequence.dialog.x-MS950-HKSCS=alphabetic,chinese-ms950,chinese-hkscs,dingbats,symbol,chinese-ms950-extb
sequence.dialoginput.x-MS950-HKSCS=alphabetic,chinese-ms950,chinese-hkscs,dingbats,symbol,chinese-ms950-extb

sequence.serif.x-MS950-HKSCS-XP=alphabetic,chinese-ms950,chinese-hkscs,dingbats,symbol,chinese-ms950-extb
sequence.sansserif.x-MS950-HKSCS-XP=alphabetic,chinese-ms950,chinese-hkscs,dingbats,symbol,chinese-ms950-extb
sequence.monospaced.x-MS950-HKSCS-XP=alphabetic,chinese-ms950,chinese-hkscs,dingbats,symbol,chinese-ms950-extb
sequence.dialog.x-MS950-HKSCS-XP=alphabetic,chinese-ms950,chinese-hkscs,dingbats,symbol,chinese-ms950-extb
sequence.dialoginput.x-MS950-HKSCS-XP=alphabetic,chinese-ms950,chinese-hkscs,dingbats,symbol,chinese-ms950-extb

sequence.allfonts.UTF-8.hi=alphabetic/1252,devanagari,dingbats,symbol
sequence.allfonts.UTF-8.ja=alphabetic,japanese,devanagari,dingbats,symbol

sequence.allfonts.windows-1255=hebrew,alphabetic/1252,dingbats,symbol

sequence.serif.windows-31j=alphabetic,japanese,dingbats,symbol
sequence.sansserif.windows-31j=alphabetic,japanese,dingbats,symbol
sequence.monospaced.windows-31j=japanese,alphabetic,dingbats,symbol
sequence.dialog.windows-31j=alphabetic,japanese,dingbats,symbol
sequence.dialoginput.windows-31j=alphabetic,japanese,dingbats,symbol

sequence.serif.x-windows-949=alphabetic,korean,dingbats,symbol
sequence.sansserif.x-windows-949=alphabetic,korean,dingbats,symbol
sequence.monospaced.x-windows-949=korean,alphabetic,dingbats,symbol
sequence.dialog.x-windows-949=alphabetic,korean,dingbats,symbol
sequence.dialoginput.x-windows-949=alphabetic,korean,dingbats,symbol

sequence.allfonts.x-windows-874=alphabetic,thai,dingbats,symbol

sequence.fallback=lucida,\
                  chinese-ms950,chinese-hkscs,chinese-ms936,chinese-gb18030,\
                  japanese,korean,chinese-ms950-extb,chinese-ms936-extb

# Exclusion Ranges

exclusion.alphabetic=0700-1e9f,1f00-20ab,20ad-f8ff
exclusion.chinese-gb18030=0390-03d6,2200-22ef,2701-27be
exclusion.hebrew=0041-005a,0060-007a,007f-00ff,20ac-20ac

# Monospaced to Proportional width variant mapping
# (Experimental private syntax)
proportional.MS_Gothic=MS PGothic
proportional.MS_Mincho=MS PMincho
proportional.MingLiU=PMingLiU
proportional.MingLiU-ExtB=PMingLiU-ExtB

# Font File Names

filename.Arial=ARIAL.TTF
filename.Arial_Bold=ARIALBD.TTF
filename.Arial_Italic=ARIALI.TTF
filename.Arial_Bold_Italic=ARIALBI.TTF

filename.Courier_New=COUR.TTF
filename.Courier_New_Bold=COURBD.TTF
filename.Courier_New_Italic=COURI.TTF
filename.Courier_New_Bold_Italic=COURBI.TTF

filename.Times_New_Roman=TIMES.TTF
filename.Times_New_Roman_Bold=TIMESBD.TTF
filename.Times_New_Roman_Italic=TIMESI.TTF
filename.Times_New_Roman_Bold_Italic=TIMESBI.TTF

filename.SimSun=SIMSUN.TTC
filename.SimSun-18030=SIMSUN18030.TTC
filename.SimSun-ExtB=SIMSUNB.TTF

filename.MingLiU=MINGLIU.TTC
filename.MingLiU-ExtB=MINGLIUB.TTC
filename.PMingLiU=MINGLIU.TTC
filename.PMingLiU-ExtB=MINGLIUB.TTC
filename.MingLiU_HKSCS=hkscsm3u.ttf

filename.David=DAVID.TTF
filename.David_Bold=DAVIDBD.TTF

filename.MS_Mincho=MSMINCHO.TTC
filename.MS_PMincho=MSMINCHO.TTC
filename.MS_Gothic=MSGOTHIC.TTC
filename.MS_PGothic=MSGOTHIC.TTC

filename.Gulim=gulim.TTC
filename.Batang=batang.TTC

filename.GulimChe=gulim.TTC

filename.Lucida_Sans_Regular=LucidaSansRegular.ttf
filename.Mangal=MANGAL.TTF
filename.Symbol=SYMBOL.TTF
filename.Wingdings=WINGDING.TTF
filename.Wingdings=WINGDING.TTF

filename.Monaco=MONACO.TTF
filename.Monaco_Bold=MONACO.TTF
filename.Monaco_Italic=MONACO.TTF
filename.Monaco_Bold_Italic=MONACO.TTF

这里使用的是monaco字体作为英文的默认字体,微软雅黑作为中文的默认字体

重启启动IDEA,是不是代码和注释已经变更字体了呢!

注意:

    当使用64位IDEA的时候会需要一些配置,总之就是IDEA调用了你安装在系统中的jdk,所以上述文件放在IDEA目录下的jre路径下是不能生效的,需要将这个文件放在你系统中的jdk||jre的相应路径下

    如果适用其他字体只需要在系统中安装好字体,然后再上述的配置文件中替换成你要改变的字体就可以啦

© 著作权归作者所有

共有 人打赏支持
bro

bro

粉丝 1
博文 6
码字总数 1820
作品 0
大连
程序员
IntelliJ idea鼠标移动到类上显示文档的字体怎么修改

idea设置了移动到方法上显示方法注释, 但是弹框显示的字体很难看特别是中英文都有的时候, 这个字体怎么修改? show quick documentation on mouse move...

不败娜美
04/28
0
0
IntelliJ IDEA详细配置和使用教程(适用于Java开发人员)

前言 正所谓工欲善其事必先利其器,对开发人员而言若想提高编码效率,一款高效的开发工具是必不可少的,相信看到该博客的朋友们都已经对IntelliJ IDEA有所了解了,所以此处就不对IntelliJ ID...

君千殇520
08/13
0
0
IntelliJ IDEA详细配置 

IntelliJ IDEA详细配置 关闭Intellij IDEA自动更新 在File->Settings->Appearance & Behavior->System Settings->Updates下取消Automatically check updates for勾选 隐藏.idea文件夹和.iml等......

DemonsI
09/17
0
0
IntelliJ IDEA 12.0中文字符显示乱码解决方案

看到OSChina到处都是IntelliJ IDEA 12.0的讨论,于是按奈不住好奇的心情下载来试用,惯例是编写一个简单的test体会一下感觉,不管别人怎么说,自己的体会才是王道,自然在http://www.oschin...

述而不作
2012/12/07
0
5
从windows10迁移到Linux Deepin

如题, 这几天从windows系统迁移到deepin的linux系统花了很多时间, 以致最近都没时间来博客园。现在将这几天的成果分享出来, 顺便也做个记录。先不多说, 上一张新系统界面。 其实在装deepin之...

qingshanli
07/24
0
0

没有更多内容

加载失败,请刷新页面

加载更多

Spring MVC 通过@Value注解读取.properties配置内容

第一步: 在applicationContext.xml配置: <bean id="configProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean"> <property name="locations">......

wangyanbao
26分钟前
1
0
Rancher 2.1全面发布,优化Kubernetes集群运维

GitLab支持、CICD优化、项目配额管理、驱散容器功能等等,Rancher 2.1给你带来一大票惊喜新功能!还有备着【千元大奖】的用户体验计划等你来参与! Rancher 2.1已于近日全面发布! Rancher ...

RancherLabs
33分钟前
2
0
如何优雅的给淘客/京东及拼多多的代理(会员)发工资(佣金)

前段时间有一些做淘客和京东推广的朋友问我能不能开发一个代付系统,这样他们可以用来给代理和网站会员发工资,他们现在还是用的人工手动打款,不仅效率慢,而且还容易出错,我一想,嗯,不难...

千龍
38分钟前
2
0
try-catch-finally

try-catch-finally 一.执行顺序 try-catch-finally 包含的代码块,当 try 里面的代码出现异常的时候,会进入 catch 中,finally 代码块则在最后被执行,即 无论是否出现异常,finally 里面的...

tsmyk0715
43分钟前
2
0
【编程架构实战】——Java并发包基石-AQS详解

目录 1 基本实现原理 1.1 如何使用 1.2 设计思想 2 自定义同步器 2.1 同步器代码实现 2.2 同步器代码测试 3 源码分析 3.1 Node结点 3.2 独占式 3.3 共享式 4 总结   Java并发包(JUC)中提...

java知识分子
44分钟前
2
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部