Few-Part-Shot Font Generation

Masaki Akiba, Shumpei Takezaki, Daichi Haraguchi, Seiichi UchidaarXiv 2025 · arXiv

TL;DR

The paper introduces "few-part-shot font generation," a novel framework that generates a complete font alphabet using only a small set of localized design elements (like serifs or corners) rather than full reference characters. By combining DeepSets with a conditional diffusion model, this approach offers designers unprecedented flexibility in font prototyping while providing new insights into how local details dictate global character structures.

What Problem Does This Paper Address?

Creating a new font is a painstaking process; even for a basic Latin alphabet, designers must manually craft and refine 26 distinct characters to ensure stylistic consistency. While recent "few-shot font generation" AI models automate this by learning from a few complete reference characters (e.g., generating 'C' through 'Z' from a fully designed 'A' and 'B'), they still require complete character designs to start. Furthermore, if the reference characters lack specific geometric features (such as straight lines in an 'O'), the model fails to generalize well.

The authors tackle this limitation by asking a fundamental question: Can we generate an entire typeface from just a few partial shapes or local design elements? This shifts the paradigm from character-level conditioning to part-level conditioning, giving designers more granular control and flexibility from the very start of the creative process.

Methods

The proposed architecture consists of two main stages: style feature extraction from parts and image generation via a diffusion model.

Part Set { ↳, ↳, ... } ➔ [DeepSets Aggregation] ➔ Style Feature Vector ┐
                                                                       ▼
Character Class Condition (e.g., "A") ─────────────────────────➔ [Denoising Diffusion (U-Net)] ➔ Full Character Image
  1. Font Style Extractor (DeepSets + Contrastive Learning): To handle a variable number of input parts (image patches), the authors leverage a DeepSets framework. Each local part is passed through a CNN to extract a feature vector. These vectors are summed and normalized to create a single, unified style representation. To make this representation robust and invariant to specific character classes, the network is pre-trained using contrastive learning. This forces part sets from the same font family closer together in the embedding space while pushing different fonts apart.
  2. Diffusion Model: A standard conditional U-Net diffusion model takes the aggregated style vector, a character class label (e.g., "A"–"Z"), and the diffusion timestep to progressively denoise random noise into a complete character image.
Fig. 3. Overview of the proposed model. The part set is aggregated into a single style feature vector. The diffusion model then generates the target font image conditioned on this vector and the character class.
  • Automatic Part Extraction: Because no public dataset of isolated font parts exists, the authors developed an objective pipeline using Scale-Invariant Feature Transform (SIFT) keypoint detection along font strokes combined with $K$-medoids clustering to automatically extract $K$ representative 32×32 or 64×64 patches from any font for training and evaluation.

Datasets

The authors utilized the Google Fonts dataset, collecting 6,796 fonts across 1,804 font families. To prevent evaluation bias, they split the dataset into mutually exclusive subsets by font family:

  • Training: 5,326 fonts (1,443 families)
  • Validation: 746 fonts (181 families)
  • Testing: 724 fonts (180 families)

Each character was rendered as a 128 × 128-pixel bitmap image.

Key Insights and Ideas

  • Local Parts Carry Global Weight: Remarkably, even a single, well-chosen local part (1-part-shot) contains enough information about stroke thickness and curvature to generate a recognizable, stylized alphabet.
  • Diminishing Marginal Returns on Parts: Increasing the number of input parts ($K$) from 1 to 13 drastically improves generation stability and consistency. However, moving from 13 to 26 parts yields only modest gains, suggesting an upper bound on how much global style can be inferred purely from local details.
  • The "Rectangle" Limitation: Local parts inherently lack holistic geometric information. Just as you cannot determine a rectangle's exact aspect ratio solely from its 90-degree corners, the model struggles to capture global traits like "condensed" (narrow) widths or specific oblique angles purely from local patches.

Key Results

  • Quantitative Performance: The authors evaluated their model using L1 distance, SSIM, and a newly proposed local L1 distance (which checks the fidelity of local stroke details using SIFT). Larger part sizes (64×64 vs. 32×32) consistently performed better across all metrics because they provided more global context.
  • Comparison to Baselines: When compared under a fair information-capacity setup (13 parts of 32×32 vs. one full 128×128 character), the few-part-shot model significantly outperformed the FANnet+DM baseline in StyleFID (15.296 vs. 51.139) and ContentFID (9.060 vs. 133.107). While the state-of-the-art full-character model (FontDiffuser) achieved better overall global metrics, the proposed method remained highly competitive.
  • Mitigating Global Distortion: Interestingly, for simple, narrow characters like 'I' and 'J', the part-based method actually matched or beat FontDiffuser. FontDiffuser tended to incorrectly force these letters into a uniform, wider style or add unneeded serifs due to global dataset biases, whereas the part-based model accurately preserved their narrow proportions by focusing purely on local cues.

Limitations and Future Work

The primary limitation is the inability to reliably reconstruct holistic font properties like slant angles or condensed aspect ratios from local elements alone.

To overcome this, the authors propose developing hybrid models that combine a small number of full-character references with local part inputs to capture both global layout and fine-grained local styles simultaneously. They also aim to extend the framework to complex, non-Latin scripts (such as Chinese or Hangul) and explore interactive editing features like style interpolation.

Summary updated

Abstract

This paper proposes a novel model of few-part-shot font generation, which designs an entire font based on a set of partial design elements, i.e., partial shapes. Unlike conventional few-shot font generation, which requires entire character shapes for a couple of character classes, our approach only needs partial shapes as input. The proposed model not only improves the efficiency of font creation but also provides insights into how partial design details influence the entire structure of the individual characters.
BibTeX
@misc{akiba2025few,
  author = {Masaki Akiba and Shumpei Takezaki and Daichi Haraguchi and Seiichi Uchida},
  title = {{Few-Part-Shot Font Generation}},
  year = {2025},
  eprint = {2509.10006},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.10006},
}

Loading related content...

Figure