六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 85|回复: 0

解决ubuntu GNUStep GUI程序运行错误的问题

[复制链接]

升级  64.67%

39

主题

39

主题

39

主题

秀才

Rank: 2

积分
147
 楼主| 发表于 2013-1-19 04:10:13 | 显示全部楼层 |阅读模式
在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 FreeSans2010-12-29 13:26:34.672 Gorm[3580] Font not found Helvetica2010-12-29 13:26:34.672 Gorm[3580] Font not found Helvetica2010-12-29 13:26:34.672 Gorm[3580] Font not found Courier2010-12-29 13:26:34.672 Gorm[3580] Font not found Fixed2010-12-29 13:26:34.672 Gorm[3580] Font not found FreeSans2010-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
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表