Table of Contents
Fetching ...

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.

VecFontSDF: Learning to Reconstruct and Synthesize High-quality Vector Fonts via Signed Distance Functions

TL;DR

VecFontSDF introduces a novel implicit, parabola-based representation for vector fonts, modeling glyphs as shape primitives enclosed by parabolic curves defined by and inside regions , 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 and a final field guiding end-to-end reconstruction and rendering through a multi-term loss . 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.
Paper Structure (24 sections, 30 equations, 21 figures, 2 tables)

This paper contains 24 sections, 30 equations, 21 figures, 2 tables.

Figures (21)

  • Figure 1: Examples of results obtained by our method in the tasks of vector font reconstruction (a) and vector font interpolation (b).
  • Figure 2: An overview of our vector font reconstruction framework.
  • Figure 3: An illustration of calculating the intersection of $N_a$ areas via maximum operator.
  • Figure 4: A demonstration of our post processing step.
  • Figure 5: Examples of vector glyphs, glyph images, grid SDFs and contour SDFs. For better visualization of grid SDFs, we map the positive value of distance functions to the red channel of RGB images and map the negative value to the green channel. To visualize the contour SDFs, we add all the contour sampling points into the original SVG files. Please zoom in for better inspection.
  • ...and 16 more figures