Rinkaku: Exact Signed Distance Rendering of CJK Glyphs with a Nearest-Segment Index
Year: 2026
Type: preprint
Abstract: When games render Chinese, Japanese and Korean (CJK) text, the most common approach stores signed distance fields (SDFs) of the glyphs in pre-generated textures. SDFs give outlines and glows by simple thresholding, but their size grows with the square of the texel resolution and with the number of glyphs, and corners round off under magnification. This paper reports Rinkaku, a glyph representation developed for an adventure-game engine and published as a Unity package. Rinkaku belongs to the line of methods that store, for each grid cell, only the outline features that can be nearest to some point in the cell and compute an exact signed distance per pixel (Qin et al. 2006; GLyphy 2012). On that basis it (1) rebuilds overlapping contours into union contours so that the sign follows from the orientation of the nearest feature alone, (2) solves quadratic Bézier curves in closed form without approximation and measures lines by orthogonal projection, (3) narrows each cell's set from a Lipschitz bound down to the segments that are actually nearest somewhere in the cell (the necessary set) by sampling, (4) packs four entries of that index into one RGBA8 texel, and (5) outputs a distance with the same meaning as an SDF, so existing effect formulas and hosts work unchanged. On 6,432–8,009 glyphs of four CJK fonts, the data per kanji averages 2.5–2.7 KB (0.30–0.47 times an SDF at em48 R8 for the same character set), the number of segments evaluated per pixel averages 1.9–2.0 (at most 12–13), and the mean absolute coverage error at 128 px and above is 1/8–1/11 of the SDF's. Drawing costs 5–22 times the SDF per pixel, but at a fixed size the time is proportional to the number of glyphs, so where to use it can be decided per screen against the frame budget: on an integrated GPU, 40 px body text took 0.64 ms in a three-line message window (90 glyphs) and 3.8 ms on one screen of backlog (540 glyphs). We report the breakdown of drawing time measured with shader variants and the optimizations that did not help—prefetching, circular-arc approximation, implicitized approximate distance, iterative solvers and a change to culling—along with the remaining issues. This record contains the English version (rinkaku-en.pdf) and the Japanese version (rinkaku-ja.pdf) of the paper. The software is published as T2Font 0.3.0 and Rinkaku 0.1.0 under the MIT license: https://doi.org/10.5281/zenodo.24076087
Author: Tsuchiya, Tsukasa
Language: English
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W7225750369
Cites:
Cited by:
Related to:
