Artistic font generation aims to synthesize stylized glyphs based on a reference style. However, existing approaches suffer from limited style diversity and coarse control. In this work, we explore the potential of element-driven artistic font generation. Elements are the fundamental visual units of a font, serving as reference images for the desired style. Conceptually, we categorize elements into object elements (e.g., flowers or stones) with distinct structures and amorphous elements (e.g., flames or clouds) with unstructured textures. We introduce FontCrafter, an element-driven framework for font creation, and construct a large-scale dataset, ElementFont, which contains diverse element types and high-quality glyph images. However, achieving high-fidelity reconstruction of both texture and structure of reference elements remains challenging. To address this, we propose an in-context generation strategy that treats element images as visual context and uses an inpainting model to transfer element styles into glyph regions at the pixel level. To further control glyph shapes, we design a lightweight Context-aware Mask Adapter (CMA) that injects shape information. Moreover, a training-free attention redirection mechanism enables region-aware style control and suppresses stroke hallucination. In addition, edge repainting is applied to make boundaries more natural. Extensive experiments demonstrate that FontCrafter achieves strong zero-shot generation performance, particularly in preserving structural and textural fidelity, while also supporting flexible controls such as style mixture.
Figures & tables
Figure 2: Comparison of different font style control strategies.
Figure 3: Context transfer in image inpainting (e.g., FLUX.1-Fill). When an input image contains a white cup with a masked region, prompting the model with “a cup” enables it to reconstruct the masked region by propagating visual cues from the visible context. This property motivates our formulation of artistic font generation as visual in-context generation.
Figure 4: Dataset collection and construction pipeline.
Figure 5: Overview of the proposed FontCrafter framework. We spatially combine the elements with a blank canvas as input, then apply the Context-aware Mask Adapter (CMA) for glyph control and use Attention Redirection (AR) to regulate the spatial influence of the elements.
Figure 6: Edge repainting model.
Figure 7: Visual comparison with zero-shot methods.
Figure 8: Visual comparison with Anything2Glyph.
Method
Type
FID ↓
CLIP Im ↑
FID p ↓
User Study
SR ↑
Cons. ↑
Rd. ↑
StyleAligned
O.
200.3
0.70
291.2
73.2
78.8
2.5
FontStudio
205.4
0.75
271.3
72.6
80.6
4.0
Ours
127.5
0.91
190.6
92.0
94.2
93.5
StyleAligned
A.
227.9
0.74
304.2
85.2
82.6
4.0
FontStudio
225.2
0.73
283.1
84.8
89.4
6.5
Table 1: Quantitative comparison with state-of-the-art methods. (O. denotes object element, and A. denotes amorphous element. ↑ : Higher is better; ↓ : Lower is better)
Figure 9: Visual comparison of different glyph control methods.
Figure 10: Comparison of in-context control with IP-Adapter.
Method
Type
#Params
FID ↓
CLIP Im ↑
FID p ↓
User Study
Cons. ↑
Rd. ↑
w/ ControlNet
O.
743.81M
193.2
0.74
252.1
68.4
82.2
w/ T2I-Adapter
79.03M
183.1
0.75
246.2
81.2
86.8
w/ IP-Adapter
-
213.2
0.71
283.2
62.2
89.0
Ours
22.4M
127.5
0.91
190.6
92.0
94.2
w/ ControlNet
A.
743.81M
197.1
0.77
247.9
71.2
83.4
Table 2: Quantitative results of the ablation study.
Figure 11: Edge repainting effect on glyph contours.
Figure 12: Visual results of dehallucination.
Figure 13: Visual results of style mixture.
Figure 14: Generalization to real-world elements and glyphs.
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.
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
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.