VecFontSDF: Learning to Reconstruct and Synthesize High-quality Vector Fonts via Signed Distance Functions
Zeqing Xia, Bojun Xiong, Zhouhui Lian
TL;DR
VecFontSDF introduces a novel implicit, parabola-based representation for vector fonts, modeling glyphs as shape primitives enclosed by parabolic curves defined by $k(px+qy)^2+dx+ey+f=0$ and inside regions $H(x,y)<0$, which can be converted to quadratic Bézier curves for standard vector formats. The approach uses true SDF supervision via grid and contour samples and a differentiable renderer, with a pseudo distance function $H$ and a final field $G=\min_i F_i$ guiding end-to-end reconstruction and rendering through a multi-term loss $L_{total}=\lambda_{image}L_{image}+\lambda_{grid}L_{grid}+\lambda_{contour}L_{contour}+\lambda_{regular}L_{regular}$. Experiments on a 1,116-font dataset show VecFontSDF achieves high-quality vector font reconstruction, interpolation, and few-shot style transfer, outperforming prior SDF-based and vector-reconstruction methods. The method provides practical vector-font outputs (SVG/TTF compatible) and a flexible framework for integrating with latent-space interpolations and style-transfer tasks, enabling more accessible vector font design from raster glyphs. Future work includes upgrading network architectures and extending the pseudo-distance framework to higher-order curves for more complex glyphs.
Abstract
Font design is of vital importance in the digital content design and modern printing industry. Developing algorithms capable of automatically synthesizing vector fonts can significantly facilitate the font design process. However, existing methods mainly concentrate on raster image generation, and only a few approaches can directly synthesize vector fonts. This paper proposes an end-to-end trainable method, VecFontSDF, to reconstruct and synthesize high-quality vector fonts using signed distance functions (SDFs). Specifically, based on the proposed SDF-based implicit shape representation, VecFontSDF learns to model each glyph as shape primitives enclosed by several parabolic curves, which can be precisely converted to quadratic Bézier curves that are widely used in vector font products. In this manner, most image generation methods can be easily extended to synthesize vector fonts. Qualitative and quantitative experiments conducted on a publicly-available dataset demonstrate that our method obtains high-quality results on several tasks, including vector font reconstruction, interpolation, and few-shot vector font synthesis, markedly outperforming the state of the art. Our code and trained models are available at https://xiazeqing.github.io/VecFontSDF.
