Small Sample Font Generation Algorithm Based on Generative Adversarial Network
摘要
This paper proposes a robust and generalized small-font generation model, which integrates the benefits of metric learning and component-aware supervision. Through fine-grained style encoding and content decoupling, the model achieves high-quality font generation and cross-language generalization. The generator design comprises a style encoder for learning font style similarities, a content encoder for extracting fine-grained content features, and a mixer for producing target glyphs. The Component Awareness Module (CAM) monitors the generator at the component level via an attentional mechanism, ensuring structural and stylistic consistency in generated characters. It provides fine-grained monitoring information through component extraction and multi-level component discrimination. Based on the U-Net architecture, the discriminator performs discrimination at both the image and pixel levels to enhance the realism of generated images. The model comprehensively employs adversarial loss, structure preservation loss, style matching loss, and triplet loss to guarantee its performance. During training, paired and unpaired data are combined to optimize the generator and discriminator using a composite loss function. In the inference phase, style and content encoders extract features from reference fonts and content images to generate target glyphs.