Skip to content

Conversation

chloerei
Copy link
Contributor

给 asciidoctor-pdf 打了补丁,并且做了一个主题,使用 KaiGen Gothic 字体(https://github.com/akiratw/kaigen-gothic )。这是一个用 Adobe 思源字体转的 TTF 格式字体,asciidoctor-pdf 依赖的 Prawn 不支持 OTF 格式所以用不了原版。

效果:

1
2
3

用法:

bundle 之后运行一次 asciidoctor-pdf-cjk-kai_gen_gothic-install 命令,安装字体。字体总共 140 多 MB,有点大。

之后 rake book:build 就行了。

@chloerei
Copy link
Contributor Author

引用 #48

@chloerei
Copy link
Contributor Author

由于分词和对齐的问题,有些地方的空隙比较大,看起来怪怪的,这个后续再调,先让文字能显示。

@AndorChen
Copy link

💯

@networm
Copy link
Member

networm commented Jul 12, 2015

@chloerei 太棒了,非常感谢!

@networm
Copy link
Member

networm commented Jul 24, 2015

@chloerei 有没有什么方法,比如加代理之类的东西让 asciidoctor-pdf-cjk-kai_gen_gothic-install 这个命令加速或者不中断?我刚看到这个 PR 的时候在测,一天都没下下来。后来就把这事给忘了,现在看到了,跟你说一下。

@networm
Copy link
Member

networm commented Jul 24, 2015

@chloerei 测试通过后再合并到主干。

@networm
Copy link
Member

networm commented Jul 24, 2015

@chloerei 或者你可以发一个测试过的结果,可以给我发一封邮件,附件包含 PDF 也可以。

@chloerei
Copy link
Contributor Author

之前在邮件回复过啊:

到这里下载字体 https://github.com/chloerei/asciidoctor-pdf-cjk-kai_gen_gothic/releases/tag/v0.1.0-fonts

KaiGenGothicCN-Bold-Italic.ttf
KaiGenGothicCN-Bold.ttf
KaiGenGothicCN-Regular-Italic.ttf
KaiGenGothicCN-Regular.ttf
RobotoMono-Bold.ttf
RobotoMono-BoldItalic.ttf
RobotoMono-Italic.ttf
RobotoMono-Regular.ttf

放到 gem 安装目录的 data/fonts 文件夹。

查看 gem 安装目录 bundle show asciidoctor-pdf-cjk-kai_gen_gothic

有 VPN 的话用 VPN。

@networm
Copy link
Member

networm commented Jul 25, 2015

@chloerei 好的,谢谢,我都忘了邮件里的内容了。

@networm
Copy link
Member

networm commented Jul 25, 2015

@chloerei 测试通过,字体显示效果非常好;个别地方的留白问题需要进一步处理,这个可能还得等后续再调了。不知道这个问题在哪个版本能够彻底解决?

networm added a commit that referenced this pull request Jul 25, 2015
@networm networm merged commit f362f27 into progit:master Jul 25, 2015
@networm
Copy link
Member

networm commented Jul 25, 2015

@chloerei 另外还有个问题,asciidoctor-pdf-cjk-kai_gen_gothic-install 这个命令需要在 bundle install 之后执行,需要修改一下顺序。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants