Abstract
Generating high-quality Chinese fonts is a significant challenge due to the vast number of characters and their complex structural dependencies. Traditional end-to-end generative models often produce artifacts and structural errors. We present SCFont, a structure-guided system that decomposes font generation into skeleton warping and style rendering. By incorporating stroke-level domain knowledge and predicting pixel flow, SCFont produces realistic, structurally sound characters that are nearly indistinguishable from human handwriting.
Introduction
Creating a new Chinese font is a monumental task. While a Latin alphabet requires designing only a few dozen characters, the standard Chinese charset (GB2312) contains 6,763 characters, many with intricate structures. Existing solutions generally fall into two categories: labor-intensive computer graphics (CG) methods or end-to-end deep learning models like Generative Adversarial Networks (GANs). While GANs can learn complex styles, they often struggle with structural consistency, leading to "broken" strokes, blurry edges, or "ghosting" artifacts in complex or cursive characters.
SCFont addresses these issues by providing a deep learning framework explicitly guided by the structural rules of Chinese writing. By separating the task into structure-guided steps, it avoids the common pitfalls of purely pixel-based generation.
Methodology
The SCFont architecture utilizes a two-stage pipeline based on Deep Stacked Networks, separating the generation of character structure from its stylistic appearance.
1. Skeleton Synthesis (SkelNet)
Instead of generating a character from scratch, SCFont begins with a "mean skeleton"—a thin-line representation of the character. The Skeleton Transform Network (SkelNet) then warps this reference to match the target style.
- Skeleton Flow: Rather than drawing a new skeleton, SkelNet predicts a "flow field." This map dictates how to move each pixel from the reference skeleton to the target style's position, effectively preserving the character's topological identity.
- Stroke Category Semantic Prior: To help the network understand Chinese writing rules, the authors defined 33 distinct stroke categories (e.g., horizontal, vertical, hook). A Spatial Feature Transform (SFT) layer incorporates this category information, guiding the network on how different stroke types should deform.
2. Font Style Rendering (StyleNet)
Once the skeleton is warped into the correct shape, StyleNet "fleshes it out" into a full-styled character.
- Two-Stage Generation: Stage-I transforms the skeleton into a rough character image. Stage-II is a refinement network that specifically targets and fixes artifacts like blur or jagged edges.
- Multi-Loss Supervision: The model is trained using a combination of adversarial loss for realism, consistency loss to maintain structure, and pixel-space loss for accuracy.
Datasets and Training
The researchers utilized 70 different Chinese font libraries, covering a wide range from standard printed styles to highly cursive handwriting. The model was trained on the standard GB2312 charset. Additionally, an "OptSet" of 775 characters was used for fine-tuning to ensure the network encountered all possible radical components and stroke combinations.
Key Insights
- Decomposition over End-to-End: Separating structure (skeleton) from appearance (rendering) makes the model significantly more robust than "black box" end-to-end networks.
- Flow vs. Generation: Predicting pixel displacement (flow) is more stable than predicting raw pixel values, preventing strokes from disappearing or appearing randomly.
- Domain Knowledge as a Constraint: Incorporating stroke-type information via SFT layers constrains the search space, preventing nonsensical structural mistakes.
- Stacked Refinement: A dedicated "polishing" network (Stage-II) significantly boosts visual quality by cleaning up noise and artifacts from the initial generation.
Results
SCFont demonstrates clear qualitative superiority over popular models like pix2pix, zi2zi, and DCFont, particularly in cursive styles where other models often fail to maintain stroke integrity. Quantitatively, SCFont achieved the lowest L1 Loss and the highest Intersection over Union (IOU) across multiple test fonts.
In a user study with 124 participants, the average accuracy in distinguishing SCFont-generated characters from real human handwriting was 51.16%. Since 50% represents a random guess, this indicates that the generated fonts are virtually indistinguishable from real ones to the human eye.
Conclusion and Future Work
SCFont represents a significant step forward in automated font generation by combining deep learning with structural domain knowledge. While highly effective, the method relies on accurate initial stroke extraction. Future research aims to reduce the fine-tuning requirement to a "one-shot" or "few-shot" scenario and to improve handling of extremely abstract artistic calligraphy where topology may deviate significantly from standard references.
Summary updated