Abstract
VecFusion is a novel two-stage diffusion framework designed to generate high-quality vector fonts. By cascading a raster diffusion model that creates a structural "blueprint" with a vector diffusion model that refines these into precise Bézier curves, VecFusion overcomes traditional challenges in topology and precision. The framework utilizes a mixed representation for control points and demonstrates state-of-the-art performance in missing glyph generation and few-shot style transfer across diverse scripts and complex font styles.
Introduction
Vector fonts are essential in modern graphic design due to their infinite scalability and ease of editing via control points. However, generating vector graphics with AI is challenging because they consist of irregular, variable-length sequences of mathematical paths rather than regular pixel grids. Existing models often struggle with topology and precision, frequently producing "wobbly" lines or incorrect control point counts. Furthermore, most models are limited to small character sets, failing to generalize to the vast array of Unicode symbols and non-Latin scripts.
Methodology
VecFusion addresses these challenges using a cascaded diffusion approach that decomposes the generation process into two distinct stages.
Cascaded Diffusion Framework
- Raster Diffusion Model (Raster-DM): This stage generates a 64x64 "blueprint" of the glyph. Beyond a simple grayscale image, it produces a 4-channel tensor encoding the glyph's shape and three "control point fields." These fields specify the location, order, and multiplicity of control points, serving as a global structural guide.
- Vector Diffusion Model (Vector-DM): An encoder-only transformer denoises a set of vector control points, conditioned on the Raster-DM output via cross-attention.
Mixed Representation
To handle the irregular nature of vector data, VecFusion employs a hybrid representation for control points. Discrete properties, such as path membership and grid cell location, are encoded using "Analog Bits" (binary bits treated as real numbers during diffusion). Continuous properties represent the precise (x, y) offset of points relative to their grid cell centers. This approach enables the model to dynamically determine the necessary number of paths and points while maintaining sub-pixel accuracy.
Experimental Results
The researchers evaluated VecFusion using the Google Fonts Dataset (1,424 fonts, 324,000 glyphs) and the DeepVecFont-v2 Dataset.
Key Performance Metrics
- Missing Glyph Generation: VecFusion generates missing characters that match an existing font style with higher fidelity than previous methods like ChiroDiff.
- Few-shot Style Transfer: Given only four raster images, the model can synthesize an entire vector alphabet, outperforming DeepVecFont-v2 and DualVector in L1 error and Chamfer Distance.
- Interpolation: The model successfully interpolates between disparate font styles in the embedding space, producing plausible intermediate vector fonts.
Discussion and Future Work
VecFusion's success stems from using a raster scaffold to capture the "global soul" of a font before refining mathematical precision. However, the model currently requires vector paths for training, limiting its use in unsupervised vectorization. Future work could explore extending this cascaded approach to other vector domains, such as logo design, icon generation, and 3D parametric surface modeling.
Summary updated