Article ID: 2024EDP7262
Fonts play a crucial role in graphic design, conveying both text and information. However, selecting a proper font can be challenging due to the overwhelming variety and the need for semantic consistency between text and font shapes. While previous research has focused on word-level font retrieval, real-world design tasks often require selecting fonts for text sequences, such as titles or slogans. This study addresses these challenges by: (1) Proposing S2Font, a model using contrastive learning to create a multimodal embedding space for texts and fonts. (2) Developing a retrieval strategy based on font frequency weighting to handle similarity in retrieval results and the Pareto principle of font usage. (3) Introducing S2Font@Topic, a topic-based extension allowing identical text to return different fonts based on the topic. The methods offer several advantages: (1) Aligning sentence-level text input with real design tasks. (2) Leveraging existing text-font pairs from the Internet without manual annotations. (3) Achieving scalability by encoding new font candidates with the trained font encoder. Experiments demonstrated the methods' effectiveness. The top 3 retrieved fonts outperformed baseline models, and S2Font's top choice rivaled those of expert designers. Designers rated S2Font@Topic highly for usefulness (4.67/5) and interest (4.83/5) in design tasks.