在ubuntu中,默认安装GNUStep后,GUI程序运行不能,如ProjectCenter,Gorm等。
通过命令行运行发现跟缺少字体设置有关。
今天在github找到了解决答案:
https://github.com/michaelwisely/GNUstep-Sudoku
以下引用原作者的决绝方法:
Sudoku! is a simple sudoku game written in Objective-C using the GNUStep libraries. If you are using the libgnustep-art gui back and are getting errors like these... 2010-12-29 13:26:34.672 Gorm[3580] The font specified for NSFont, FreeSans, can't be found. 2010-12-29 13:26:34.672 Gorm[3580] Font not found FreeSans 2010-12-29 13:26:34.672 Gorm[3580] Font not found Helvetica 2010-12-29 13:26:34.672 Gorm[3580] Font not found Helvetica 2010-12-29 13:26:34.672 Gorm[3580] Font not found Courier 2010-12-29 13:26:34.672 Gorm[3580] Font not found Fixed 2010-12-29 13:26:34.672 Gorm[3580] Font not found FreeSans 2010-12-29 13:26:34.672 Gorm[3580] The font specified ... you have to create some .nfonts for GNUstep. In the ubuntu software repos, there's a tool named mknfonts.tool which reads .ttf font files (among others) and turns them into .nfont files. To make your .nfonts, do something like... ## Make the fonts and leave them in the Fonts directory cd /usr/share/GNUstep/Fonts mknfonts /usr/share/fonts/truetype/freefont/* ## Set the defaults for NSFont to something other than Helvetica defaults write NSGlobalDomain NSFont <font name> Since FreeSans was one of the fonts mknfonts generated on my system, I ran... defaults write NSGlobalDomain NSFont FreeSans
简而言之:
1.安装mknfonts.tool
sudo apt-get install mknfonts.tool
2.
cd /usr/share/GNUstep/Fonts
sudo
mknfonts /usr/share/fonts/truetype/freefont/*
3.
defaults write NSGlobalDomain NSFont FreeSans
4.OK