#cjk
Posts tagged "cjk"
Nov 22, 2026
How gpdf renders CJK without CGO: cmap to Identity-H
How gpdf turns Japanese, Chinese, and Korean text into PDF in pure Go: cmap lookup, Identity-H glyph IDs, the W array, ToUnicode, and a FontFile2 subset.
internalscjkNov 14, 2026
Accounting PDFs in Go: journal, ledger, and trial balance
Generate a journal, general ledger, and trial balance as PDFs in Go from one slice of entries. Full gpdf code with ruled tables and automatic page breaks.
tutorialtemplatescjkMay 11, 2026
How do I mix two fonts in the same paragraph in gpdf?
To mix fonts in one paragraph in gpdf, call c.RichText and set template.FontFamily on each span — c.Text only styles the whole string at once.
recipetutorialcjkApr 19, 2026
How do I use Source Han Sans JP with gpdf?
Register the TTF variant of Source Han Sans JP from Adobe's GitHub release with gpdf.WithFont. Seven weights, SIL OFL, same glyphs as Noto Sans JP.
recipecjktutorialApr 17, 2026
Why does my PDF show tofu boxes for Japanese?
Empty rectangles instead of Japanese characters mean your PDF couldn't find glyphs for those codepoints. Here are the four causes and the fixes.
recipetroubleshootingcjkApr 17, 2026
How do I use IPAex Gothic in gpdf?
Register ipaexg.ttf with gpdf.WithFont. IPAex Gothic ships a single Regular weight under the IPA Font License — bold emphasis has to be synthesized or paired.
recipecjktutorialApr 16, 2026
Japanese PDFs in Go: the 2026 definitive guide
How to generate Japanese PDFs in Go in 2026 — fonts, TrueType subsets, mixed kanji/kana/ASCII, and why CGO and Chromium are unnecessary.
tutorialcjktroubleshootingApr 15, 2026
How do I embed a Japanese font in gpdf?
Register a Japanese TrueType font with gpdf.WithFont at document construction. Three lines, subset embedding happens automatically, no CGO.
recipecjktutorialApr 15, 2026
How do I use Noto Sans JP with gpdf?
Register the static NotoSansJP-Regular.ttf with gpdf.WithFont. Skip the variable font — gpdf's pure-Go parser does not read fvar tables. Subsetting lands around 30 KB.
recipecjktutorial