Brifing

Bastardica: Create Hybrid Fonts by Mixing Glyphs

A browser-based tool that lets you combine fonts with contextual substitutions

Hacker News2 min

1Font mixing mechanics

Bastardica creates hybrid fonts by replacing every nth glyph with characters from a secondary font using OpenType ligature substitutions. The tool runs entirely in-browser using Pyodide and fontTools, with no server processing required. Contextual substitutions ensure compatibility across browsers and design software where OpenType shaping is supported.

2Technical implementation

The tool registers ligature substitutions for every script, automatically enabled by browsers. Users can adjust Y-offset and scale effects for precise glyph alignment. When mixing multiple fonts, collisions occur at intervals where substitution patterns intersect (e.g., every 35th glyph for 5th and 7th stride combinations). The first font's glyph takes precedence in collision scenarios.

3Design considerations

Prime number strides minimize glyph collisions between mixed fonts. The tool preserves all OpenType features of base fonts while adding the substitution layer. Users should verify font licenses when creating commercial derivative works, as Bastardica adds no additional restrictions beyond the original fonts' terms. Proper attribution to source fonts is recommended.

4Creative applications

Designers can use mixed fonts to create distinctive typographic textures or subtly enhance readability. The tool works with any OpenType-compatible font, including variable fonts. Effects can range from subtle character variations to dramatic stylistic contrasts. Sample outputs demonstrate how mixed fonts can add visual interest while maintaining text legibility.

5Workflow integration

Generated fonts download as standard OpenType files (TTF, OTF, WOFF2) ready for use in design applications. The tool includes live previews with adjustable parameters. Users can upload custom fonts or select from suggested free font sources like Google Fonts and Velvetyne. Output works in print and digital media where OpenType is supported.

6Typography community roots

Bastardica draws inspiration from experimental type projects like Times New Bastard and Easy Pete. The tool lowers barriers to creating custom font variations that previously required specialized software. By running locally in-browser, it enables rapid iteration without font editing expertise or desktop software requirements.

7Technical constraints

Font mixing requires both source fonts to support the same scripts. Apps with disabled ligature features may not display mixed fonts correctly. The tool currently focuses on character substitution rather than more complex interpolations. Users should test outputs across target platforms to ensure consistent rendering.

8Future typography possibilities

Browser-based tools like Bastardica democratize advanced typographic experimentation. The approach could evolve to support dynamic font variations or responsive typography. As variable fonts gain adoption, similar techniques might enable runtime font customization. The project demonstrates web technologies' potential for creative type design tools.

Original article: Hacker News — Bastardica: Create Hybrid Fonts by Mixing Glyphs