FontCrafter:基于视觉上下文生成的高保真元素驱动艺术字体创作
FontCrafter: High-Fidelity Element-Driven Artistic Font Creation with Visual In-Context Generation
把参考元素图当作视觉上下文、用图像修复模型在像素级把风格迁移进字形区域,并配轻量 Context-aware Mask Adapter 注入形状、用免训练注意力重定向抑制笔画幻觉——这套「上下文+掩码适配器+注意力重定向」的组合可直接迁移到任何需要保留参考纹理与结构的可控生成任务(如风格化 logo、纹理迁移、局部重绘)。
原文依据 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
摘要译文
由模型翻译 · 术语统一 · 请对照原文核对关键结论艺术字体生成旨在基于参考风格合成风格化字形。然而,现有方法存在风格多样性有限、控制粗糙的问题。本文探索元素驱动的艺术字体生成的潜力。元素是字体的基本视觉单元,可作为目标风格的参考图像。在概念上,我们将元素划分为具有鲜明结构的物体元素(如花朵或石头)与具有无结构纹理的无定形元素(如火焰或云朵)。我们提出 FontCrafter,一个元素驱动的字体创作框架,并构建了大规模数据集 ElementFont,其中包含多样的元素类型与高质量字形图像。然而,对参考元素的纹理与结构同时实现高保真重建仍具挑战。为此,我们提出一种上下文生成策略,将元素图像视为视觉上下文,并利用图像修复模型在像素级将元素风格迁移至字形区域。为进一步控制字形形状,我们设计了一个轻量的上下文感知掩码适配器(CMA)以注入形状信息。此外,一种免训练的注意力重定向机制实现了区域感知的风格控制并抑制笔画幻觉。另外,我们采用边缘重绘使边界更加自然。大量实验表明,FontCrafter 取得了强劲的零样本生成性能,尤其在保持结构与纹理保真度方面表现突出,同时还支持风格混合等灵活控制。
英文原文摘要 1608 字符
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.