Adding insular script like it's 1626
Iâm a generation removed from when Irish children were taught to read and write in insular Irish script the ClĂł Gaelach. Hereâs a beautiful print of the full alphabet in old script, with a couple of e...
Iâm a generation removed from when Irish children were taught to read and write in insular Irish script the ClĂł Gaelach.
Hereâs a beautiful print of the full alphabet in old script, with a couple of extra symbols used for etcetera, from Nine Arrow, who has also fallen down this rabbit hole.
While my parentsâ primary association with it are literally being rapped on the knuckles for getting it wrong, for me itâs the type of official signage on old buildings and at historical sites - itâs antiquity and heritage. (For more examples, check out the CLĂSCAPE Project, dedicated to cataloging use around Dublin.)
The âold scriptâ was created when medieval monks evolved the latin script to encode the sound of Irish. It uses a dot over a consonant to indicate it should soften according to grammatical rules.
Few printers had insular typesets and typewriters were rare and difficult to use, with modifier dots rather than distinct characters. Applying them required typing the letter, then backspace, then typing the dot - not very ergonomic. This made producing print slow and expensive.
A Gaelic typewriter. (Image via Galway City Museum)
The solution was to switch to using a pure latin character set, with the dot being replaced with a âhâ after the letter. This is why you get Irish names like âSadhbhâ that improbably rhyme with âfiveâ. Itâs much less phonetic because you have to look at the preceeding letter to understand what the âhâ modifier is going to do, and you have to process letters in groups to understand what sound they make.
Iâm a bit wistful that something so distinctive and beautiful and endemic has been lost, and (not having to learn to write another character set) to my mind the old scriptâs approach of preserving the majority word shape while still capturing the phonetic content is a better writing system. I have been thinking about how use modern tools to add the old back into modern media gracefully. There have been typographers making Gaelic fonts for a long time - gaelchlo.com is the central repository of these, but we also need to perform some letter substitutions to really achieve the old script.
From an accessibility and data portability perspective the ship has sailed. While Google Translate can (impressively and improbably) handle ClĂł Gaelach, other Irish language reference sites of record like teanglann.ie or abair.ie cannot. There is a âgaâ language tag you can use to indicate to screen readers that text is in Irish, but I wouldnât expect Irish text in ClĂł Gaelach to work with the Irish language NVDA screenreader plugin (I donât have a copy of Windows to check though). So, while we might like to visually replace the âaitchesâ to achieve the look of the old script, we should preserve the original text.
Luckily there is a feature in OTF typefaces called âdiscretionary ligaturesâ - these allow us to modify a script font to define optional ligatures that can be selected on or off, that wonât mess with the original text. It seemed like adding some ligatures to the relevant consonant-sĂ©imhiĂș pairs might work.
I gave it a try - I opened my favorite ClĂł Gaelach font ĂrchlĂł GC using Font Forge and:
Added a discretionary ligature table
Added a subtable for substitutions - replace all the relevant consonant + h with the dotted constant. (And for flair replace the latin etcetera (&) with the Tironian et - a piece of shorthand credited to Tiro, scribe of Cicero, and still in use in Irish today.)
Because this is discretionary and so off by default, enable it by setting the font-variant-ligatures:
gaeilge {
font-family: "urgc", sans-serif;
font-variant-ligatures: discretionary-ligatures;
}
⊠and feidhmĂonn sĂ©! - it works!
This approach means that while the user sees the ligatures, the underlying text is still preserved for copy-paste and presentation to screen readers.
Ok, but you might say whatever about sprinkling Irish on a website not really about the Irish language, including it in an ancient ableit beautiful script thatâs niche even in Ireland might be a little self-indulgent. To which I say it might resonate with a few people, and itâs fun and youâve already agreed itâs beautiful but ok, I hear you. To preserve the flow for non-Irish readers, Iâm playing with repurposing the HTML element. These are ordinarily used to give pronunciation hints for east-Asian scripts, but for right now this seems like an interesing way to preserve reading flow for the cĂșpla focail (meaning: couple of words) of Irish Iâm ever liable to use.
Hmm, but what about screen readers? Well, trying to replicate the visual approach, which is to give priority to the gaelic script over the translation, I decided to have screenreaders speak â[the Irish text] meaning: [translation]â. It turns out the element does not have defined screenreader behavior yet, and wanting to provide both lang="ga" for the gaelic text and lang="en" for the translation out of principle was a bit tricky, you can see (and judge) my approach below.
Iâm using Astro as a blogging framework, it allows me to define components that I can use like HTML elements. My Gaeilge.astro component looks like
---
interface Props {
translation?: string;
}
const { translation } = Astro.props;
const slotContent = (await Astro.slots.render("default")).trim();
const plainText = slotContent.replace(/<[^>]*>/g, "");
---
{plainText}
{translation && (meaning: {translation})}
{
translation && (
)
}
I include this in my [..slug].astro file:
---
import Gaeilge from '../../components/Gaeilge.astro';
... stuff ...
This allows me to write
Failté romhait
in my blog markdown on any .mdx blog post, and to produce somethine like:
FĂĄilte romhait
(meaning: Welcome)
FĂĄilte romhait
on the actual page, resulting in the english-over-script look thatâs screenreader-friendly: FailtĂ© romhait. (meaning: welcome)
As an aside I wanted to try blogging again to get back to the spirit of the âold internetâ from pre-social media. I donât know why this topic is where I started, but in digging into the ClĂł Gaelach I discovered and enjoyed a number of other blogs: a talented graphic designer exploring the type, interesting material about Gaelic typewriters, scholarly material on the origins of the typeface as a tool for religious persuasion, and its connection with Leuven. Almost none of this information is surfaced by searches for Google Books or Scholar, nor is it on Wikipedia. Most of it is hearteningly from the 2020s. This is the web I want!
As a bonus I got to play with some accessibility and UX problems and now have a reusable element that allows me to `sprinkle the site with some idiosyncratic vernacular design elements that, for me, capture a little of wild-west spirit of the Geocities days, but with the more responsible accessibility and data portability considerations of the modern mature web.