Drop #541 (2024-10-15): Typography Tuesday

fontTools; ots; Featured Typographer: Anna Giedryś (+ 4 Free Fonts)

The Drops are back after a work offsite-induced hiatus!

Since this is the typography-centric edition of the Drop, I’ll save some ramblings about migrating the Drop from WordPress until tomorrow.

🇺🇸 U.S. Drop fam: please ensure you are registered to vote 🗳️, as some evil folks in many equally evil states have been doing what they can to game the upcoming POTUS election. Sadly, the U.S. gov web properties do sell you out to Meta, Alphabet, Adobe, and others, so please make sure to use third-party content blockers when visiting that link and other gov links. Some states may block Tor, but it can’t hurt to try using that as well.


TL;DR

(This is an AI-generated summary of today’s Drop using Ollama + llama 3.2 and a custom prompt.)

  • FontTools is a comprehensive Python library for manipulating fonts, offering utilities and tools for font engineering, requiring Python 3.8 or later installation using pip: https://github.com/fonttools/fonttools?tab=readme-ov-file
  • OpenType Sanitizer (OTS) enhances the security and reliability of web typography by parsing, validating, and sanitizing OpenType font files, providing a consistent layer of font security across platforms: https://github.com/khaledhosny/ots
  • Anna Giedryś is a graphic designer specializing in visual identities, illustrations, and typeface design, with notable typefaces including Signika, Yrsa, Rasa, and Laconia available on Google Web Fonts: https://fonts.google.com/?query=Anna+Giedryś

fontTools

Photo by Miguel u00c1. Padriu00f1u00e1n on Pexels.com

I caught the GrobMaster (a.k.a. Dr. Paul Murrell, one of my R heroes) dropping a new dev-mode R package (ttx), today, which led me to this section’s resource.

fontTools is a comprehensive icky Python library for manipulating fonts, offering a wide range of utilities and tools for font engineering. It requires Python 3.8 or later and can be easily installed using pip:

$ python3 -m pip install fonttools

The package provides several command-line utilities for various font-related tasks:

  • pyftmerge: Merges multiple fonts
  • pyftsubset: Subsets fonts
  • ttx: Converts between OpenType Font (OTF) and XML representation
  • fonttools: A meta-tool for accessing other fontTools components

The fonttools command offers subcommands for specific operations, such as:

  • Converting UFO fonts from cubic to quadratic curves
  • Adding features from a .fea file to an OTF font
  • Building variable fonts from designspace files and masters
  • Converting MS VOLT to AFDKO feature files

The main library for font engineering is ttLib, which handles TrueType and OpenType fonts. Other fun libraries include:

  • fontTools.colorLib: Handles colors in CPAL/COLR fonts
  • fontTools.cu2qu: Converts cubic to quadratic curves
  • fontTools.designspaceLib: Reads and writes designspace files
  • fontTools.feaLib: Reads and writes AFDKO feature files
  • fontTools.fontBuilder: Constructs TTF/OTF fonts from scratch
  • fontTools.merge: Provides tools for merging font files
  • fontTools.varLib: Deals with ‘gvar’-style font variations

fontTools is designed to be flexible, with no external dependencies beyond the Python Standard Library (which is kind of impressive). However, some optional features may require additional modules for enhanced functionality.

I guess I was asleep last year (or distracted), since Paul also has a full-on fonttools R package wrapper to this Python library.


ots

OpenType Sanitizer (OTS) is an open-source project that focuses on enhancing the security and reliability of web typography. It is designed to parse, validate, and sanitize (i.e., removes potential security threats) OpenType font files (OTF, TTF) as well as WOFF and WOFF2 font files. Its primary goal is to ensure that font files are safe to use in web browsers, mitigating potential security risks associated with malformed or malicious font files.

OTS is integrated into major web browsers like Chromium and Firefox, providing a consistent layer of font security across platforms, but it also has a fairly straightforward set of command-line tools for offline font file checking.

The need for OTS stems from the potential security risks associated with font rendering. System-level TrueType font renderers, especially on platforms like Windows, have not traditionally been part of the attack surface and may run with high privileges. It’s 2024 and font rendering still lives deep within the OS kernel for most operating systems. And, as web typography has evolved to use vector fonts instead of images (ah, you younger readers will not remember those days), the need for secure font handling has increased.

OTS can be built from source using the Meson build system:

$ meson build    # https://github.com/mesonbuild/meson
$ ninja -C build # https://github.com/ninja-build/ninja

You may never need to run ots-proper, but knowing it’s baked into popular web browsers should provide some level of comfort (something we all kind of need right now).


Anna Giedrys is a graphic designer, splitting her time between Lidzbark Warmiński, Poland, and the Czech Republic. She specializes in visual identities, illustrations, and typeface design. Anna earned her Master’s degree in graphic design and visual communication from the University of Fine Arts in Poznań, focusing on sign and typography. While on an exchange program studying graphic and fashion design at the Vilnius Fine Arts Academy in Lithuania, she discovered her love for calligraphy, lettering, and pattern design.

Currently, Anna runs her own studio called Ancymonic and collaborates with Rosetta Type Foundry. Her notable (and free!) typefaces include:

  • Signika and Signika Negative: This is a free sans-serif type family available on Google Web Fonts, designed specifically for pedestrian signage.
  • Yrsa and Rasa: Open-source type families published by Rosetta with financial support from Google. These fonts support over 92 languages in the Latin script and two languages in the Guarati script—Gujarati and Kachchi. Co-designed with David Brezina, Yrsa is the Latin-only type family, while Rasa is the Gujarati type family. Both are intended for comfortable reading on the web, and is a spiffy choice for longer articles in online news, magazines, and blogs. Yrsa pays special attention to Central and Eastern European languages and their accents, while Rasa supports a wide array of basic and compound syllables used in Gujarati. Interestingly, Rasa is a superset of Yrsa, including the complete Latin script. The project is fairly unique because it experiments with remixing existing typefaces to create new ones—the Latin part is based on Eben Sorkin‘s Merriweather, and the Gujarati is based on David Brezina’s Skolar Gujarati. Anna significantly updated Yrsa in 2021.
  • Laconia: A 14-style sans-serif family co-designed with Ross Mills and Paul Hanslow at Tiro Typeworks.

FIN

Remember, you can follow and interact with the full text of The Daily Drop’s free posts on Mastodon via @dailydrop.hrbrmstr.dev@dailydrop.hrbrmstr.dev ☮️

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.