MATLAB 2010a解决中文字体乱码的方法

今天在Fedora18中安装了MATLAB 2010a,一切顺利,但最后使用时,发现界面中某些中文显示为方框。在网上搜索了解决方案,特记录下以备后用。 18

首先需要有中文字体,一般情况在File->Preferences->Fonts中进行设置,选择喜欢的中文字体后,如Current Folder、Command History等处的中文就能正常显示。但是在打开文件等处仍然显示为方框,此时需要进行进一步处理。

进入MATLAB 2010a目录,默认为:/usr/local/MATLAB/R2010a
cd /opt/Matlab/sys/java/jre/glnx86/jre/lib/fonts/
mkdir fallback
cd fallback
ln -s /usr/share/fonts/truetype/wqy/wqy-zenhei.ttc ./wqy-zenhei.ttc
mkfontdir
mkfontscale
重启MATLAB就可以看到所有的中文都正常了。

如果不行的话,在fontconfig.properties中加入:

[sunjunior@localhost lib]$ cat fontconfig.properties
# @(#)linux.fontconfig.properties 1.2 03/10/28
#
# Copyright 2003 Sun Microsystems, Inc. All rights reserved.
#


# Version


version=1


# Component Font Mappings


allfonts.chinese-arphic1= -misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1
filename.-misc-simsun-medium-r-normal--0-0-0-0-p-0-iso10646-1=/opt/MatLab/sys/java/jre/glnx86/jre/lib/fonts/fallback/wqy-zenhei.ttc


# Search Sequences


sequence.fallback=chinese-arphic1


# Exclusion Ranges


# Font File Names


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值