gpdf
  • 文档
  • 博客
全部文章

# recipe

标签为「recipe」的文章

2026年4月17日·gpdf team

为什么 gpdf 生成的 PDF 中日文显示为方块(豆腐字)?

日文字符变成空方块(□),通常是字体未注册或族名不匹配。整理 4 种常见原因和最快的修复路径。

recipetroubleshootingcjk
2026年4月17日·gpdf team

如何在 gpdf 中使用 IPAex 哥特体(IPAex Gothic)?

用 gpdf.WithFont 注册 ipaexg.ttf。IPAex 只提供 Regular 一个字重,粗体需要合成或与 Mincho 配对。

recipecjktutorial
2026年4月16日·gpdf team

gpdf 的 12 列网格是怎么工作的?

gpdf 的 12 列网格用 r.Col(span, fn) 接收 1–12 的整数。列宽为 span/12 的比例,没有断点、没有槽宽间距,为 PDF 固定宽度设计。

recipetutorialtemplates
2026年4月15日·gpdf team

如何在 gpdf 中嵌入日文字体?

将 TTF 字节传给 gpdf.WithFont 即可。自动子集化嵌入、无需 CGO,用 Go 生成日文 PDF 的最短路径。

recipecjktutorial
2026年4月15日·gpdf team

如何在 gpdf 中使用 Noto Sans JP?

用 gpdf.WithFont 注册 static 版 NotoSansJP-Regular.ttf,不要用 variable font。gpdf 会把 17,000 个字形子集化到每份 PDF 不到 40 KB。

recipecjktutorial
功能文档博客
gpdf

© 2026 gpdf. All rights reserved.