我也来折腾,Yahei做成了Deb包。
- 蝴蝶兰
- 帖子: 202
- 注册时间: 2006-04-18 10:13
- 来自: china
- 联系:
我也来折腾,Yahei做成了Deb包。
下载了0.75的雅黑字体,两个文件:msyh.ttf msyhbd.ttf。
以下我敲的命令是红字。
mkdir cccc/DEBIAN -p
mkdir cccc/etc/defoma/hints -p
mkdir cccc/usr/share/fonts/truetype/Vista -p
cp msyh*.ttf cccc/usr/share/fonts/truetype/Vista
在cccc/etc/defoma/hints/下建两个文件:ttf-vista-yaheibd.hints ttf-vista-yahei.hints
内容如下
ttf-vista-yaheibd.hints
category truetype
begin /usr/share/fonts/truetype/Vista/msyhbd.ttf
Family = Vista-Yahei
FontName = Yahei-Bold
Encoding = Unicode
Location = Chinese-Taiwan Chinese-China English Japanese
Charset = ISO10646-1 GB2312 GB18030 ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-5 ISO8859-9 ISO8859-15 JISX0212 JISX0208 JISX0201 KOI8 MICROSOFT-CP1252
UniCharset = GB2312 GB18030 ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-5 ISO8859-9 ISO8859-15 JISX0212 JISX0208 JISX0201 KOI8 MICROSOFT-CP1252
GeneralFamily = Hei
Weight = Bold
Width = Variable
Shape = Upright
Alias = microsoft-yahei 雅黑
Foundry = Microsoft
Priority = 20
X-Family = MICROSOFT_YAHEI
X-ElementAlias = foundry=microsoft:family=hei:resx=100:resy=100
TTCap = halfwidth-bw=0.5 italic-angle=0.167 no-roblique no-oblique no-ritalic
end
ttf-vista-yahei.hints
category truetype
begin /usr/share/fonts/truetype/Vista/msyh.ttf
Family = Vista-Yahei
FontName = Yahei-Medium
Encoding = Unicode
Location = Chinese-Taiwan Chinese-China English Japanese
Charset = ISO10646-1 GB2312 GB18030 ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-5 ISO8859-9 ISO8859-15 JISX0212 JISX0208 JISX0201 KOI8 MICROSOFT-CP1252
UniCharset = GB2312 GB18030 ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-5 ISO8859-9 ISO8859-15 JISX0212 JISX0208 JISX0201 KOI8 MICROSOFT-CP1252
GeneralFamily = Hei
Weight = Medium
Width = Variable
Shape = Upright
Alias = microsoft-yahei 雅黑
Foundry = Microsoft
Priority = 20
X-Family = MICROSOFT_YAHEI
X-ElementAlias = foundry=default:family=hei:resx=100:resy=100
TTCap = halfwidth-bw=0.5 italic-angle=0.167 no-roblique no-oblique no-ritalic
end
可能这两个文件的内容可以改得更好。
在cccc/DEBIAN下建四个文件:conffiles control postinst prerm
内容如下
conffiles
/etc/defoma/hints/ttf-vista-yaheibd.hints
/etc/defoma/hints/ttf-vista-yahei.hints
control
Package: ttf-vista-yahei
Version: 0.75
Section: x11
Priority: optional
Architecture: all
Depends: xutils (>= 4.0.2), defoma
Installed-Size: 29066
Maintainer: Zhuyu <zhuzhengan@yahoo.com.cn>
Description: "Microsoft Yahei" Chinese TrueType font by Microsoft Technology
雅黑字体不是自由的。有可能侵权!:)
(msyh.ttf & msyhbd.ttf)
postinst
#!/bin/sh
set -e
package=ttf-vista-yahei
FILE=/etc/defoma/hints/${package}.hints
if [ "$1" = "configure" ]; then
/usr/bin/defoma-font -t reregister-all $FILE
fi
package=ttf-vista-yaheibd
FILE=/etc/defoma/hints/${package}.hints
if [ "$1" = "configure" ]; then
/usr/bin/defoma-font -t reregister-all $FILE
fi
exit 0
prerm
#!/bin/sh
set -e
package=ttf-vista-yaheibd
FILE=/etc/defoma/hints/${package}.hints
if [ "$1" = "remove" ]; then
/usr/bin/defoma-font -t purge-all $FILE
fi
package=ttf-vista-yahei
FILE=/etc/defoma/hints/${package}.hints
if [ "$1" = "remove" ]; then
/usr/bin/defoma-font -t purge-all $FILE
fi
然后在cccc/DEBIAN下生成一个md5sums
fakeroot -- dpkg -b cccc jjjj.deb
dpkg-name jjjj.deb
最后再可耻一下,浪费一下论坛空间,看图!
图中第一行为24正常,第二行36粗体
以下我敲的命令是红字。
mkdir cccc/DEBIAN -p
mkdir cccc/etc/defoma/hints -p
mkdir cccc/usr/share/fonts/truetype/Vista -p
cp msyh*.ttf cccc/usr/share/fonts/truetype/Vista
在cccc/etc/defoma/hints/下建两个文件:ttf-vista-yaheibd.hints ttf-vista-yahei.hints
内容如下
ttf-vista-yaheibd.hints
category truetype
begin /usr/share/fonts/truetype/Vista/msyhbd.ttf
Family = Vista-Yahei
FontName = Yahei-Bold
Encoding = Unicode
Location = Chinese-Taiwan Chinese-China English Japanese
Charset = ISO10646-1 GB2312 GB18030 ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-5 ISO8859-9 ISO8859-15 JISX0212 JISX0208 JISX0201 KOI8 MICROSOFT-CP1252
UniCharset = GB2312 GB18030 ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-5 ISO8859-9 ISO8859-15 JISX0212 JISX0208 JISX0201 KOI8 MICROSOFT-CP1252
GeneralFamily = Hei
Weight = Bold
Width = Variable
Shape = Upright
Alias = microsoft-yahei 雅黑
Foundry = Microsoft
Priority = 20
X-Family = MICROSOFT_YAHEI
X-ElementAlias = foundry=microsoft:family=hei:resx=100:resy=100
TTCap = halfwidth-bw=0.5 italic-angle=0.167 no-roblique no-oblique no-ritalic
end
ttf-vista-yahei.hints
category truetype
begin /usr/share/fonts/truetype/Vista/msyh.ttf
Family = Vista-Yahei
FontName = Yahei-Medium
Encoding = Unicode
Location = Chinese-Taiwan Chinese-China English Japanese
Charset = ISO10646-1 GB2312 GB18030 ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-5 ISO8859-9 ISO8859-15 JISX0212 JISX0208 JISX0201 KOI8 MICROSOFT-CP1252
UniCharset = GB2312 GB18030 ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-5 ISO8859-9 ISO8859-15 JISX0212 JISX0208 JISX0201 KOI8 MICROSOFT-CP1252
GeneralFamily = Hei
Weight = Medium
Width = Variable
Shape = Upright
Alias = microsoft-yahei 雅黑
Foundry = Microsoft
Priority = 20
X-Family = MICROSOFT_YAHEI
X-ElementAlias = foundry=default:family=hei:resx=100:resy=100
TTCap = halfwidth-bw=0.5 italic-angle=0.167 no-roblique no-oblique no-ritalic
end
可能这两个文件的内容可以改得更好。
在cccc/DEBIAN下建四个文件:conffiles control postinst prerm
内容如下
conffiles
/etc/defoma/hints/ttf-vista-yaheibd.hints
/etc/defoma/hints/ttf-vista-yahei.hints
control
Package: ttf-vista-yahei
Version: 0.75
Section: x11
Priority: optional
Architecture: all
Depends: xutils (>= 4.0.2), defoma
Installed-Size: 29066
Maintainer: Zhuyu <zhuzhengan@yahoo.com.cn>
Description: "Microsoft Yahei" Chinese TrueType font by Microsoft Technology
雅黑字体不是自由的。有可能侵权!:)
(msyh.ttf & msyhbd.ttf)
postinst
#!/bin/sh
set -e
package=ttf-vista-yahei
FILE=/etc/defoma/hints/${package}.hints
if [ "$1" = "configure" ]; then
/usr/bin/defoma-font -t reregister-all $FILE
fi
package=ttf-vista-yaheibd
FILE=/etc/defoma/hints/${package}.hints
if [ "$1" = "configure" ]; then
/usr/bin/defoma-font -t reregister-all $FILE
fi
exit 0
prerm
#!/bin/sh
set -e
package=ttf-vista-yaheibd
FILE=/etc/defoma/hints/${package}.hints
if [ "$1" = "remove" ]; then
/usr/bin/defoma-font -t purge-all $FILE
fi
package=ttf-vista-yahei
FILE=/etc/defoma/hints/${package}.hints
if [ "$1" = "remove" ]; then
/usr/bin/defoma-font -t purge-all $FILE
fi
然后在cccc/DEBIAN下生成一个md5sums
fakeroot -- dpkg -b cccc jjjj.deb
dpkg-name jjjj.deb
最后再可耻一下,浪费一下论坛空间,看图!
图中第一行为24正常,第二行36粗体
上次由 蝴蝶兰 在 2007-03-03 15:33,总共编辑 1 次。
回避问题 = 曲线救国 = 棒槌
-
- 帖子: 1897
- 注册时间: 2006-09-12 14:09
- 蝴蝶兰
- 帖子: 202
- 注册时间: 2006-04-18 10:13
- 来自: china
- 联系:
- TheThirdGhost
- 帖子: 1592
- 注册时间: 2006-07-23 16:25
- 来自: 南京
- 蝴蝶兰
- 帖子: 202
- 注册时间: 2006-04-18 10:13
- 来自: china
- 联系:
- karron
- 帖子: 6226
- 注册时间: 2005-06-11 14:03
- 来自: 不明真相的群众
- 联系:
-
- 帖子: 1
- 注册时间: 2007-02-03 23:50
- 吴广德
- 帖子: 347
- 注册时间: 2006-10-26 9:24
- 系统: Ubuntu 18.04 LTS
- 来自: 中国-广西-南宁