Few-shot Font Generation aims to generate stylistically consistent glyphs from a few reference glyphs. However, capturing complex font styles from a few exemplars remains challenging, and the existing methods often struggle to retain discernible local characteristics in generated samples. This paper introduces DRG-Font, a contrastive font generation strategy that learns complex glyph attributes by decomposing style and content embedding spaces. For optimal style supervision, the proposed architecture incorporates a Reference Selection (RS) Module to dynamically select the best style reference from an available pool of candidates. The network learns to decompose glyph attributes into style and shape priors through a Multi-scale Style Head Block (MSHB) and a Multi-scale Content Head Block (MCHB). For style adaptation, a Multi-Fusion Upsampling Block (MFUB) produces the target glyph by combining the reference style prior and target content prior. The proposed method demonstrates significant improvements over state-of-the-art approaches across multiple visual and analytical benchmarks.
Figures & tables
Figure 2: An overview of the proposed DRG-Font. The initial reference selection is performed by the RS Module, which finds the optimal style reference xs from an available set of candidates, such that xs is structurally closest to the given content reference xc . The Generator network independently encodes xs and xc by using Esc , producing the style and content embeddings from both references. The target glyph y^ is generated by Dsc through a cross-fusion of the embeddings. The discriminator network enforces adversarial guidance by auxiliary style and content classification. The Stable Diffusion Encoder (SDv2 Enc) [ 30 ] is used to ensure high-quality latent reconstruction.
Figure 3: Architecture of the proposed Style-Content Encoder Esc . The input image xα passes through four consecutive Down2x Blocks. The resulting feature maps then pass through the Multiscale Style Head Block (MSHB) and the Multiscale Content Head Block (MCHB) in parallel. Both MSHB and MCHB encode three latent embeddings using three different heads, which are finally concatenated to produce the style embedding eαstyle (from MSHB) and the content embedding eαcontent (from MCHB).
Figure 4: Architecture of the proposed Style-Content Decoder Dsc . The network uses a Multi-Fusion Upsampling Block (MFUB) to generate the target image y^ by combining the multiscale style embeddings esstyle=⟨es,1style,es,2style,es,3style⟩ from MSHB and content embedding eccontent from MCHB.
Figure 5: Qualitative comparison results on Unseen English and Seen English fonts. Boxes marked in red highlight issues like failure of style adaptation, structural deformation, and missing strokes. Boxes marked in blue highlight issues like minor appearance of artifacts and minor structural inconsistencies.
Figure 6: Qualitative comparison results on Unseen Chinese and Seen Chinese fonts. Boxes marked in red highlight issues like failure of style adaptation, structural deformation, and missing strokes. Boxes marked in blue highlight issues like minor appearance of artifacts and minor structural inconsistencies.
Unseen English
Seen English
Method
L1 ↓
RMSE ↓
SSIM ↑
LPIPS ↓
L1 ↓
RMSE ↓
SSIM ↑
LPIPS ↓
User Study ↑
FANNET [ 31 ]
0.077
0.239
0.731
0.185
0.078
0.238
0.779
0.116
10.789
MA-Font [ 28 ]
0.089
0.272
0.694
0.143
0.087
0.269
0.712
0.138
6.710
PatchFont [ 22 ]
0.098
0.266
0.675
0.143
0.100
0.281
0.680
0.143
5.657
FASTER [ 8 ]
0.075
0.246
0.723
0.139
0.077
0.239
0.731
0.138
7.894
DA-Font [ 4 ]
0.074
0.243
0.713
0.111
0.069
0.223
0.775
0.084
15.526
Table 1: Quantitative comparison of the proposed method with the existing state-of-the-art techniques on Unseen English and Seen English fonts. The best scores are shown in bold and the second best scores are underlined .
Unseen Chinese
Seen Chinese
Method
L1 ↓
RMSE ↓
SSIM ↑
LPIPS ↓
L1 ↓
RMSE ↓
SSIM ↑
LPIPS ↓
User Study ↑
FANNET [ 31 ]
0.161
0.347
0.449
0.289
0.147
0.334
0.502
0.291
2.105
MA-Font [ 28 ]
0.176
0.374
0.430
0.150
0.172
0.372
0.456
0.160
9.605
PatchFont [ 22 ]
0.251
0.442
0.288
0.224
0.225
0.420
0.353
0.204
3.158
FASTER [ 8 ]
0.197
0.339
0.458
0.160
0.093
0.297
0.484
0.166
8.421
DA-Font [ 4 ]
0.166
0.357
0.469
0.143
0.125
0.303
0.603
0.107
21.053
Table 2: Quantitative comparison of the proposed method with the existing state-of-the-art techniques on Unseen Chinese and Seen Chinese fonts. The best scores are shown in bold and the second best scores are underlined .
Figure 7: Qualitative comparison of the generation quality with and without (in both train and test phases) incorporating the RS Module into the proposed pipeline.
RS Module
Metrics
Training
Testing
L1 ↓
RMSE ↓
SSIM ↑
LPIPS ↓
✗
✗
0.098
0.287
0.676
0.167
✗
✓
0.085
0.266
0.699
0.141
✓
✗
0.081
0.256
0.713
0.129
✓
✓
0.072
0.237
0.739
0.108
Table 3: Quantitative analysis of the impact of the RS Module on the generation quality.
Loss Function
Metrics
Lcls
Llatent
L1 ↓
RMSE ↓
SSIM ↑
LPIPS ↓
✗
✗
0.074
0.243
0.730
0.113
✗
✓
0.073
0.240
0.736
0.108
✓
✗
0.075
0.244
0.729
0.114
✓
✓
0.072
0.237
0.739
0.108
Table 4: Quantitative analysis of the effectiveness of Lcls and Llatent on the generation quality.
Head Dimension
L1 ↓
RMSE ↓
SSIM ↑
LPIPS ↓
128
0.074
0.241
0.734
0.108
256
0.072
0.237
0.739
0.108
512
0.074
0.241
0.734
0.111
Table 5: Quantitative analysis of the effect of embedding dimension of each head ( ∈R3d ) on the generation quality.
Few-shot font generation simultaneously requires global structural completeness and fine-grained local style fidelity. Existing methods usually either rely on global content-style modeling, which is robust but imperfectly disentangled, or emphasize component/local modeling, which captures fine details but relies heavily on local priors and reference coverage. We argue that the key challenge is not merely to learn purer conditions, but to organize complementary yet biased global and local conditions through multi-level allocation during generation. To this end, we propose SmartFont, a diffusion-based few-shot font generation framework that combines global content-style generation with weakly supervised local corrective experts. The local branch performs semantic-spatial allocation by learning expert-wise local concepts and semantically meaningful spatial maps under weak component supervision, enabling fine-grained correction without requiring explicit component-conditioned inference. On top of this, a denoising-state condition allocation module adaptively weights global content, global style, and local corrective feature across timesteps and injection blocks. Extensive experiments show that SmartFont achieves better global-local balance, improves glyph quality and local detail fidelity.
Few-shot font generation aims to synthesize the remaining glyphs of a font given one or a few reference glyphs while preserving stylistic consistency, thereby supporting font designers in efficiently completing a typeface. Existing methods primarily focus on improving generation quality given a fixed reference set. However, when the current reference glyphs are insufficient to represent the target style, few-shot font generation may fail to produce satisfactory results. In practical scenarios, additional reference glyphs can often be obtained from the designer when necessary. Accordingly, we propose a new framework, Active Reference Acquisition in Few-Shot Font Generation, in which the model sequentially decides which character to acquire next as an additional reference. Furthermore, we propose a reference part-coverage-based acquisition function to efficiently query the designer. Motivated by the observation that font styles are well characterized by local structural parts, we represent each glyph using a histogram of local features and select query characters that maximize the expected part coverage of the reference set. By prioritizing characters that contain parts not yet covered by the current references, the proposed method progressively expands the diversity of visual parts in the reference set. As a result, generation quality is improved with fewer queries. Experiments on the Google Fonts dataset demonstrate that the proposed method achieves higher generation quality than random querying and reference-agnostic baselines. The code is available at https://github.com/matsuo-shinnosuke/ActiveRef-FontGen.
Few-shot Chinese font generation aims to synthesize new characters in a target style using only a handful of reference images. Achieving accurate content rendering and faithful style transfer requires effective disentanglement between content and style. However, existing approaches achieve only feature-level disentanglement, allowing the generator to re-entangle these features, leading to content distortion and degraded style fidelity. We propose the Structure-Level Disentangled Diffusion Model (SLD-Font), which receives content and style information from two separate channels. SimSun-style images are used as content templates and concatenated with noisy latent features as the input. Style features extracted by a CLIP model from target-style images are integrated via cross-attention. Additionally, we train a Background Noise Removal module in the pixel space to remove background noise in complex stroke regions. Based on theoretical validation of disentanglement effectiveness, we introduce a parameter-efficient fine-tuning strategy that updates only the style-related modules. This allows the model to better adapt to new styles while avoiding overfitting to the reference images' content. We further introduce the Grey and OCR metrics to evaluate the content quality of generated characters. Experimental results show that SLD-Font achieves significantly higher style fidelity while maintaining comparable content accuracy to existing state-of-the-art methods.
Jie Li, Suorong Yang, Jian Zhao +1
State Key Laboratory for Novel Software Technology, Nanjing University, China · School of Artificial Intelligence, Nanjing University, China · Department of Computer Science and Technology, Nanjing University, China +1