Drop #242 (2023-04-18): Typography Tuesday
The GridMaster's Glyphs Report; There’s Nothing Comic About Dyslexia
As I note in the first of, yes, only two sections today, I let myself get hit by the curveball that is a new “Technical Report” by one of my all-time fav RStats heroes. This caused me to change-up what I had previously in store for today, and time was not on my side, especially after making another WebR experiment for folks. Plus, I kind of got carried away talking about fonts and R (a topic about which I could drone on for hours).
The GridMaster's Glyphs Report
Dr. Paul Murrell — a.k.a. the GridMaster — is one of the giants of the R ecosystem. I have been a huge fanboi of his since learning R and brazenly git stalk him to see what new, cool things he's up to.
Said gitstalking usually gives me a ~4-12hr head start on new “Technical Reports
” he is publishing, and it did so again today. This has forced me to change-up what was in store for y'all and re-spin the edition to focus on fonts.As all right-thinking humans know and fully acknowledge, R is the powerhouse for statistical computing, data analysis, and data visualization (the “data science” triumvirate) and has a rich ecosystem of packages and libraries. Among these, font support has evolved significantly over time, ensuring that we all can create visually appealing and accessible graphics.
The early days of R's development saw basic font support that gave us the capability to create core plots/visualizations. The base graphics package provided a fairly limited selection of fonts and font families, such as serif, sans-serif, and monospace, plus associated styles. However, this rudimentary support lacked many features and capabilities essential for what we might now call “professional” or “modern” visualizations and publications.
The introduction of the Dr. Murrell's {grid} package in the early 2000s marked a significant improvement in R's font support. This package built upon the core R graphics capabilities and provided a flexible, high-level graphics system that allowed users to create complex visualizations and handle various font types more easily. In addition, his {gridSVG} package enabled the export of grid graphics to SVG format. This functionality improved font rendering quality and allowed for better integration with web applications, further enhancing the flexibility and customization of R's font support. (There are other SVG packages as well, but I'm focusing, where possible, on Dr. Murrell's contributions.)
Up until the creation of {ggtext} by Dr. Claus Wilke, it was kind of a pain to put together a series of glyphs with different font characteristics. The ggtext package makes it possible to use a subset of markdown and CSS to render complex glyph formatting with relative ease. It’s pretty magical.
The later development of the {systemfonts}, {textshaping}, and {ragg} packages marked the beginning of what I'd call a “new era” in R's font support. These packages provide a comprehensive solution for font handling and text rendering, addressing many of the previous limitations (💙 🙏🏽 💪🏼 Thomas!):
systemfonts: This package enabled users to access system fonts and font files directly, allowing for more extensive font options and seamless integration of custom fonts in R graphics.
textshaping: Building on the capabilities of {systemfonts}, the {textshaping} package provided high-quality text layout and rendering using the HarfBuzz library. This package enabled proper rendering of complex scripts, bidirectional text, and various font features.
“ragg”: The ragg package introduced a modern graphics device for R, which improved performance and output quality. By leveraging the {systemfonts} and {textshaping} packages, {ragg} offered exceptional font support, enabling users to create visually appealing and accessible graphics across different platforms and devices.
Even with all these developments, R's font handling has still felt a tad kludgy, at least to me. I think that's about to change.
Dr. Murrell's “glyphs” report (GH) discusses the limitations of the aforementioned R graphics engine for text drawing and the need for more sophisticated text support. It covers the two main tasks involved in more sophisticated text drawing: rich text input and typeset glyph information.
The GridMaster takes us on a deep dive into exploring the challenges of allowing rich text to pass through to graphics devices and typeset glyphs to pass through to graphics devices. It gives a large nod to the aforementioned contributions by Thomas.
While the walk through R's typographic history would have been a fun read on its own, Dr. Murrell does not stop there! He shows off some enhancements to existing font packages, R itself, and a new {xvdir} package. When combined, this typographic Voltron enables the use of rich (ugh) LaTeX formatting to encode complex glyph styling and layout directives that give us newfound flexibility and control over how things are rendered.
While exciting, this, as the GridMaster notes, is “largely groundwork for others to build upon. There are two large problems to still resolve: an interface that allows the user to enter rich (marked up) text, and a typesetting engine that can layout the rich text to produce a set of typeset glyphs. The packages 'textshaping' and 'xdvir' that are mentioned in this document are examples of the sort of development that can now take place to bring sophisticated text layout to R”
Dedicate some time to read the whole Report (you'll learn a TON about typography in general) and wait patiently for (or use the development builds of) R 4.3, later this year, to level-up your visuals.
There’s Nothing Comic About Dyslexia
Dyslexia, as I gotta believe y'all know, is a neurological condition affecting an individual's ability to read and process written information. We've touched on it before in the Drop when discussing other dyslexia-friendly fonts. The condition is characterized by difficulties with decoding words, spelling, and reading comprehension, very often despite affected individuals having average or above-average intelligence
. Dyslexic individuals may have trouble recognizing and distinguishing between letters, particularly those with similar shapes. Consequently, it is essential to use fonts that are easy to read and distinguish for dyslexic readers.This post talks about and shows off “Inconstant Regular,” a new font which was created to be both dyslexia-friendly and appealing to designers (that is a far too rare occurrence). The typeface features irregular shapes, built-in variable accessibility features, and contextual alternatives that can be tailored to individual needs and desired typographic aesthetic. It is designed to be highly variable and comes in three different stylistic sets, with contextual alternatives that cycle through three different glyph sets to help the characters stand out.
The font is a product of “There's Nothing Comic About Dyslexia”, a campaign that aims to promote dyslexia-friendly typefaces and make design more inclusive for people with dyslexia. There's also a call to stop slamming Comic Sans (hence the name), which they make a compelling argument for.
“Inconstant Regular” is free to download for personal and commercial use and contains an expanded glyph-set supporting multiple languages, emphasizing inclusivity.
FIN
I could totally get used to a Typography Tuesday. ☮
Us mere and pedestrian mortals call them “blogs”.
this is important to note, as far too many humans wrongly judge and negatively categorize humans who have reading and speaking impediments
I’d welcome some more Typography Tuesdays. Thanks Bob.