如何将 ttf 字体转换为 pff2?
我正在研究 grub2 主题,但似乎无法将 ttf 转换为 grub 的本机格式。
我尝试这样做:
➜ asdfafdsgsgsg ttf2bdf -p 32 Oxygen_Regular_Oxygen.ttf > oxygen.bdf
➜ asdfafdsgsgsg grub-mkfont -s 32 -o oxygen.pf2 oxygen.bdf
grub-mkfont: error: can't set 32x32 font size.
I'm looking into grub2 themes, and i can't seem to convert ttf to grub's native format.
I tried to do this:
➜ asdfafdsgsgsg ttf2bdf -p 32 Oxygen_Regular_Oxygen.ttf > oxygen.bdf
➜ asdfafdsgsgsg grub-mkfont -s 32 -o oxygen.pf2 oxygen.bdf
grub-mkfont: error: can't set 32x32 font size.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
生成 Grub2 PF2 字体需要极大的耐心,因为我必须多次尝试转换。
如果您从 TTF 出发 -> PF2,您应该首先尝试跳过BDF中间阶段。像这样的命令,
如果只是
-p 32
导致了该错误,我会按面值接受该输出。除非您知道其他字体可以成功指定如此大的磅值。另外,我希望 grub-mkfont 不会被允许生成大小超过 Grub2 限制的字体。不过我应该提到,grub-mkfont
历史上一直缺乏适当的维护。目前情况可能并非如此,并且预计上游早已纠正了这一问题,但分发往往滞后。Generating Grub2 PF2 fonts requires significant patience, as I had to attempt the conversion multiple times.
If your going from TTF -> PF2, you should first try skipping the BDF intermediate stage. Something like this command,
If it was only the
-p 32
which caused that error, I would accept that output at face value. Unless you know of other fonts, which successfully specified such a large point size. Additionally I would hopegrub-mkfont
wouldn't be allowed to generate a font, whose size exceeds Grub2 limitations. However I should mention,grub-mkfont
historically had been lacking in proper maintenance. This might not currently be the case, and would expect upstream has rectified this long ago, but distributions often lag behind.