Font Completion and Manipulation by Cycling Between Multi-Modality Representations

Ye Yuan, Wuyang Chen, Zhaowen Wang, Matthew Fisher, Zhifei Zhang, Zhangyang Wang, Hailin JinarXiv 2021

TL;DR

This paper introduces a novel graph-based representation for font glyphs, enabling more accurate and controllable font completion and manipulation. By cycling between image and graph modalities, their method captures both global structure and local style details better than existing image-to-image translation approaches.

What Problem Does This Paper Address?

Generating a complete set of font glyphs that share a consistent style, known as font completion, is a crucial but challenging task in graphic design. Traditional approaches treat this as an image-to-image translation problem, which often struggle to capture fine-grained local details and maintain style consistency, especially when only a few reference glyphs are available. The authors aim to improve font completion by leveraging a more intrinsic representation of font glyphs that can better disentangle style and content.

Methods

The core innovation is the introduction of a graph-based representation for font glyphs. This graph serves as an intermediate representation between image modalities. The proposed framework, termed "Font Multi-Modality Cycling," consists of:

  1. Image Encoder: Extracts a style vector from a reference glyph image.
  2. Point Set Decoder: Generates a set of points with attribute information (coordinates, tangents) for the target glyph.
  3. Graph Constructor: Maps these points to a structured graph representation, capturing both global contour connectivity and local stroke details. This is a key novel component.
  4. Neural Renderer: Converts the graph representation back into a rasterized glyph image.

This cross-modality auto-encoder framework allows the model to learn and transfer font styles more effectively by leveraging the structured nature of the graph representation. The graph representation is designed to be scalable, resolution-free, and amenable to manual manipulation.

Datasets

The experiments are conducted on the Google Fonts dataset. The authors mention filtering out irregular glyphs and focusing on the 26 Roman capital letters. They processed this dataset to include four modalities: SVG curves, rasterized images, point sets, and their proposed graph representation, creating a new benchmark for font glyph research.

Key Insights and Ideas

  • Graphs as Intrinsic Font Representations: Font glyphs, being vector objects, are better represented by structured graphs than by pixels alone. This graph structure can capture more intrinsic graphic properties.
  • Bridging Modalities: The graph representation acts as a crucial intermediate bridge between pixel-based images and vector-based descriptions, enabling a more robust learning process.
  • Disentangling Style and Content: The graph structure, combined with the encoder-decoder architecture, helps in disentangling font style (e.g., serif, weight) from glyph content (e.g., the letter 'A').
  • Manipulability: The graph representation offers an intuitive interface for designers to perform local edits (e.g., modifying stroke thickness, adding serifs) which can then be transferred to other glyphs.
  • Cross-Modality Learning: The framework demonstrates the power of learning across different data representations, showing that combining knowledge from multiple modalities can lead to superior results.

Key Results

  • Improved Font Completion: The proposed image-to-graph-to-image method significantly outperforms image-to-image translation baselines in terms of MSE, PSNR, and SSIM. For instance, it achieves a 35.3% reduction in MSE compared to the img2img baseline.
  • High-Quality Visuals: Qualitative results show that the model generates completed glyphs with clear appearance and consistent style, even for unseen glyphs.
  • Effective Manipulation and Interpolation: The graph representation enables intuitive font manipulation (e.g., changing font weight, italicization) and smooth font interpolation in the latent space, demonstrating the controllability of the learned representation.

Limitations and Future Work

  • Graph Template Dependency: The creation of graph templates for each glyph is an automatic procedure but might be sensitive to errors in keypoint detection, especially for characters with complex structures or unusual designs.
  • Renderer Limitations: The paper notes that some font completion errors can stem from the graph renderer, suggesting that improvements in this component could further enhance performance.
  • Future Directions: The authors suggest that their cross-modality representation learning approach has potential applications in other domains where prior knowledge from different data modalities can be leveraged. They also highlight the possibility of using conventional graphics renderers as an alternative to their neural renderer.

Summary updated

Abstract

Generating font glyphs of consistent style from one or a few reference glyphs, i.e., font completion, is an important task in topographical design. As the problem is more well-defined than general image style transfer tasks, thus it has received interest from both vision and machine learning communities. Existing approaches address this problem as a direct image-to-image translation task. In this work, we innovate to explore the generation of font glyphs as 2D graphic objects with the graph as an intermediate representation, so that more intrinsic graphic properties of font styles can be captured. Specifically, we formulate a cross-modality cycled image-to-image model structure with a graph constructor between an image encoder and an image renderer. The novel graph constructor maps a glyph's latent code to its graph representation that matches expert knowledge, which is trained to help the translation task. Our model generates improved results than both image-to-image baseline and previous state-of-the-art methods for glyph completion. Furthermore, the graph representation output by our model also provides an intuitive interface for users to do local editing and manipulation. Our proposed cross-modality cycled representation learning has the potential to be applied to other domains with prior knowledge from different data modalities. Our code is available at https://github.com/VITA-Group/Font_Completion_Graph.
BibTeX
@misc{yuan2021font,
  author = {Ye Yuan and Wuyang Chen and Zhaowen Wang and Matthew Fisher and Zhifei Zhang and Zhangyang Wang and Hailin Jin},
  title = {{Font Completion and Manipulation by Cycling Between Multi-Modality Representations}},
  year = {2021},
  eprint = {2108.12965},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2108.12965},
}
Figure