redhat 6 下 node-canvas中文方框解决办法

redhat 6下node-canvas中文乱码解决方法。乱码主要是在安装系统时没有相应的中文字体和freetype支持。只要我们安装这两项即可。

我们实用光盘做为yum源这样方便安装依赖库

//创建光盘挂载目录

?
1
2
mkdir  /yum
mount  /dev/cdrom  /yum

//创建本地yum源

?
1
cd  /etc/yum .repos.d/

//备份旧文件

?
1
mv  rhel- source .repo rhel- source .repo.bak

//创建本地源文件

?
1
vi  /etc/yum .repos.d /local .repo

//写以下内容到local.repo

?
1
2
3
4
5
[base]
name=linux 6
baseurl= file : ///yum
gpgcheck=0
enable =1

//修改yum源的地址

?
1
vi  /usr/lib/python2 .6 /site-packages/yum/yumRepo .py

在上面的文件中找到下面这行

?
1
  remote = url +  '/'  + relative

将其改为

?
1
remote =  '/yum'  + relative

配置到这里就完成了

//清理yum,可能会报错,不用管错误

?
1
yum clean

//安装中文支持

?
1
yum groupinstall  "Chinese Support"

//安装字休

?
1
yum groupinstall Fonts

//安装字体支持库

?
1
2
3
4
cd  /yum/Packages
rpm -ivh zlib-devel-1.2.3-29.el6.x86_64.rpm
rpm -ivh freetype-devel-2.3.11-6.el6_2.9.x86_64.rpm
rpm -ivh fontconfig-devel-2.8.0-3.el6.x86_64.rpm

//创建中文字体目录

?
1
mkdir  -p  /usr/share/fonts/chinese/TrueType

//复制字体文件到刚才创建的目录

?
1
2
cp  SimSun.ttf  /usr/share/fonts/chinese/TrueType
cd  /usr/share/fonts/chinese/TrueType

//运行下面三个指令,更新字体

?
1
2
3
mkfontscale
mkfontdir
fc-cache -f - v

//重新编译node-canvas绘图库

补充:

node-canvas在6.3系统上需要使用指定字体时要求字体必须存在而在6.4发现可以使用不存在的字体。 

延伸阅读


▶ Walkthrough007

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
The complete Visual Behaviour Authoring framework for Unity, empowering you to create advanced AI Behaviours and Logic, including three separate, fully featured, yet seamlessly interchangeable modules for you to choose and easily add in your game: • Behaviour Trees • Hierarchical State Machines • Dialogue Trees NodeCanvas is a production ready framework used by many awesome games including Kim, Pamela, Hurtworld, Shroud of the Avatar, Kingdom and Ghost of a Tale. [Games Showcase] Feature Highlights ------------------------------------- • Choose the right tool for the task at hand. • Design reactive Behaviour Trees and Hierarchical State Machines within an intuitive, designer friendly visual node editor: (Full Undo/Redo, Zoom In/Out, Multi-selection, Duplication, Copy/Pasting, JSON Import/Export, Groups, Comments and more) • Use local & global variables of any type, visually or in code, for creating reusable and actor-oriented, parametric behaviours, optionally saving and loading those variables between gaming sessions. • Data Bind variables with any component property of any type directly. • Sync variables automatically over the network using UNET, for creating multiplayer games. • Visually Debug behaviours with realtime, colorful and informative runtime debugging. • Live Edit everything while in play mode to perfectly understand your design goals and how to achieve them. • Utilize any existing code directly with advanced and extremely fast Reflection Tasks, automatically integrating Unity's and 3rd Party asset APIs. • Work with Lists/Arrays, Enums, Interfaces and pretty much ANY Variable Type you need out-of-the-box. • React to world changes and transfer data using the built-in Event System. • Reuse and Bind made behaviours among any number of different agents. • Organize your designs using Behaviour Sub-Trees and Sub-State Machines. • Extend NodeCanvas Framework to create your own Actions, Conditions, Nodes or even completely new modules with the e
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值