One Font Tells Truths; The Other Only Lies ========================================== By George Mandis https://george.mand.is/2026/11/one-font-tells-truths-the-other-only-lies/ Saturday, November 28th 2026 After playing around with [Tokenizer Mono](/2026/11/the-tokenizer-font/) I was interested in continuing to push fonts into weird directions. In particular, I was intrigued by the idea of a font that could represent a completely different document than the words it was being applied to. That led me to build **Palimpsest**. Given two documents, A and B, you can set document A in a custom font that will yield document B to human readers. A [palimpsest](https://en.wikipedia.org/wiki/Palimpsest) is a manuscript page that has been scraped clean and written over, with the first text still faintly present underneath the second. I was originally going to call this font project [Knights and Knaves](https://en.wikipedia.org/wiki/Knights_and_Knaves), but after learning about the term in my research it felt more apropos on some level. Here is the source-code and an interactive builder to make your own Palimpsest Font and jump right into it: - The source code: [https://github.com/georgemandis/palimpsest-font](https://github.com/georgemandis/palimpsest-font) - The Palimpsest build tool: [george.mand.is/palimpsest](/palimpsest/) ## How does Palimpsest work? ![[Pasted image 20261129230905.png|The opening paragraph of Moby Dick but a search for 'Call me Ishmael' yields zero results]] You'll need two documents of approximately equal length. Document `A` goes into the page and what you'll see if you actually view the underlying source—HTML for our examples here, but it could technically also be a PDF or a Word document. Anywhere you can embed a font really. It is what copy and paste, find-in-page, search engines, screen readers, translation, and every bot that reads text will see. Document `B` is what a sighted human sees after the font loads and renders. The two documents need to be approximately the same length, but they don't have to be related in the slightest. In the sample linked to on the interactive builder page, `A` is a quarterly facilities memo and `B` is the first three paragraphs of *Moby-Dick*. The page contains: ```text Quarterly operations update for the regional facilities team. Thank you to everyone who ... ``` The reader sees: ```text Call me Ishmael. Some years ago—never mind how long precisely—having little or no money in ... ``` ![[Pasted image 20261129231014.png|A screenshot demonstrating how searching for 'Quarterly operations update for t' can be found in what appears to be the opening paragraph from Moby Dick]] Select all the words on the page, copy, and you have the memo sitting on your clipboard! Read it on the screen out-loud as you see it and you have Ishmael. Here is a video of the whole thing if you don't believe me: This idea actually came out of a different font project I was dabbling with around a "Cipher Font" where the font is the key to a substitution cipher. I realized after building that project first that a font is just a lookup table from characters to drawings, and nothing says the table has to be a permutation... It could be anything, including a completely different document. I will write about the cipher font another day, but for now you can [play with the source code](https://github.com/georgemandis/cipher-font) for that one as well. ## If fonts could count So the naive version is a little obvious: one giant ligature rule that matches all of A and replaces it with all of B. OpenType would let you write that rule, but it would never fire. That's because browsers don't shape documents, they shape *runs*, and a run ends at every hard line break and at any point the browser decides to re-shape. A rule that spans a soft wrap gets cut into two halves, each shaped alone, and neither half matches. It's part of the reason [Tokenizer Mono](/2026/11/the-tokenizer-font/) falls apart across line breaks. You'd see A leak through at the end of every line. The slightly cleverer version is the one I'd have told you about if you'd asked me a month-and-some ago: map words, and disambiguate repeated words by their neighbors. The word "the" might occur eighty times in document `A`, but "over the lazy" might only occur once, so a rule with a word of context on either side could pick out each occurrence. It's a nice idea, but it has exactly the same leak. [HarfBuzz](https://github.com/harfbuzz/harfbuzz) —a cool tool unknown to me until I went down this rabbit hole—marks any position that a context rule looked across as *unsafe to break*, and Chrome, when a line wraps at an unsafe position, re-shapes that line in isolation. The first and last word of every wrapped line would lose their context and show document `A`. Again, this bug exists with the Tokenizer font, but the trade-off is occasionally broken token delimiters for something that is otherwise 90% close-enough. With this idea, it would be much more noticeable. This would be easier if our fonts could count. But, alas, they cannot. There is no rule for "the 1,017th word of the document". There is only "this run of glyphs, right now". So the fix here was to stop fighting that and make every run exactly the size of one unique rule. ## Typesetting and trickery The generator breaks document `B` into lines itself the way a typesetter might, about sixty characters or so each. Then it tries to pour document `A` into the same number of lines, each roughly as long as its B line in proportion, so that someone who sees A without the font gets ordinary-looking prose rather than a poem with strange breaks. Then it checks that no two `A` lines are identical—since each line has to be a rule—and shifts a word across a boundary where they are to make it work. Now the font is simple! For each line there's a ligature rule that collapses the entire `A` line, spaces included, into one empty glyph, and a multiple-substitution rule that expands that glyph into the letters of the `B` line. Both go in `rlig`, the feature that exists for Arabic and Indic scripts. The base font's own substitutions are stripped first (IBM Plex Serif by default, though any of the seven open fonts I picked as a base will do), so its `fi` ligature can't fuse two letters of `A` before the rules get to see them. The rest of the magic happens in the actual HTML on the page layout itself. Each line has to go in its own block with `white-space: nowrap`. That way the browser never gets to choose a break. A shaping run is exactly one line, which is exactly one rule, in Chrome, Firefox and Safari alike. And because nothing may ever wrap, the font size can't be fixed: the generator knows the advance width of every `B` line from the font's own metrics, so it sets `font-size: min(22px, column / widest-line)`. On a phone the text shrinks instead of wrapping. There was one limit I learned about after the first build failed on the last line: HarfBuzz will not match a ligature longer than 64 glyphs, so no `A` line may exceed 64 characters. ## Who sees what? I already went over this, but this is the really fun part so I'll do it again, in-depth: - **Document A**: the clipboard, find-in-page, the search engine's index, the OS/browser translator, the accessibility tree (and so the screen reader), and any model or scraper that reads the DOM. Basically anything that's looking at the text and not taking a screenshot of some kind. - **Document B**: a person looking at the page. Also anything that works from pixels: a screenshot, OCR, or a vision model. It's a weird divide between "things that read" and "things that look." - **Neither, cleanly**: select some text and the highlight follows A's characters under B's glyphs, so it looks askew and slightly drunk. You can see the seams, but if I wanted to be truly duplicitous we're just a `user-select: none` away. It's sort of a Machiavellian cloaking device—one I was slightly tempted to put to the test, only to see if I *could*... but thought better of it. Showing one thing to Google and another to people is exactly what search engines penalize, though doing it at the typographic level feels so novel I wonder if any crawler would notice. FWIW, the font holds the entirety of `B` in its substitution table in plain sight, so nothing here is ever truly "hidden" from anyone who opens the file, so it really is like placing the key under the doormat. It only works where you can control the CSS/layout pretty precisely, on a line-by-line level. The `nowrap` is doing a lot of work here. Install the font and type `A` into a text box, and the box will wrap wherever it likes, and `A` will show through at every wrap. Palimpsest is better suited for a page you publish, not a font you "use" in a conventional sense. And it is a font specific to the document(s) you're combining. Every pair of texts produces its own unique font with its own fingerprint in the family name, because the font *is* the document. ## Make one right now! Since you made it this far, I'll plug it again: - The Palimpsest build tool: [george.mand.is/palimpsest](/palimpsest/) *And* I'll share a fun, bonus anecdote about making this interactive tool: After I built the POC in Python, I knew I'd want to have an interactive version for this blog post. I assumed the web version would need a server, a form, an upload, and a place to run the Python code in a container somewhere. But I was wrong! Because I remembered that WebAssembly exists and it is *awesome* sometimes. The generator is just a few hundred lines of Python on top of [fontTools](https://pypi.org/project/fonttools/), and the whole of CPython now compiles to WebAssembly, so the page just downloads Python (!!) and runs the same file I run on my laptop, unmodified. Honestly, as someone who's been making web-things professionally since 2005, it still blows my mind. So now you can paste two documents and your browser builds the font in about half a second, then checks it with HarfBuzz, the same text shaper inside Chrome and Firefox, which was also just sitting there as WebAssembly. This made the demo even better because now nothing is uploaded and it's much more privacy-oriented! I can understand the reluctance to upload a document to a stranger's server, but now you don't have to. It's all just happening in your browser. It just costs about 8 MB the first time you visit, which is a ridiculous amount to pay for a font toy and also less than a lot of hero images, sadly. ## Why? Why run a Python interpreter and a text-shaping engine in a browser tab to produce a typeface that exists for one document and lies about what it says, you ask? If you're even asking that question we might just be fundamentally different people. But I'll interpret it this way: The internet is already so hard to trust, why introduce one more thing to sow doubt? One more sinister way to watermark internal documents or see if you could use it for a legal document and see which version held up in court? If [P turns out to equal NP](https://www.axios.com/2026/11/28/ai-math-breakthroughs-encryption-p-vs-np), at least I can trust the words on the page are the actual words, right? Listen, this didn't introduce anything that wasn't already there. It's just a fun way to think about our tools and toys differently. Sometimes we play with them, sometimes we break them, sometimes we break them and then we play with them because they turn out to be more fun when they're broken. I'll part with this (incoming AI warning): I tested this idea out with GPT-6.2 after I got the basics working the way I wanted. I pointed it toward an HTML page I'd made, set in the font, and asked it to tell me what it said. It read the underlying quarterly report and I smiled. I said, no, there's more there and that's not what I'm seeing. Look harder. I kept nudging it... and eventually I had to tell it to take a closer look at the font. It figured it out after that and was able to decipher it was Moby Dick—though I'm curious how much of that was truly read versus surmised from the instantly recognizable bits. And for a brief moment in that test, I smiled, having felt like I duped the machine. I imagined for a moment a world in which we all start setting our content in Palimpsest for one another to read and share our inner thoughts and feelings, safe from the bots, while giving back to them dreary banality to feed the corpus. A silly, impractical vision of the future, but one that made me laugh. And that’s really what I like about projects like this. I’m pretty fond of AI, but perhaps because I continue to see it as a means to an end: a tool that lets me stretch a little further and try absurd ideas I might never otherwise have attempted. A bicycle for the mind, retrofitted into something more like an e-bike. I’m also not particularly worried about the idea that these tools will make human creativity obsolete. We’ve been having some version of that conversation about computers for decades, and yet people continue to find increasingly strange, wonderful, and unexpected things to do with them. I suspect we’ve consistently underestimated the capacity for human creativity, particularly when given new materials to work and play with. Palimpsest is a fairly ridiculous example of this. Nobody was asking for a font that tells two different stories depending on who’s looking at it. But a month ago it didn’t exist, and now it does. Somewhere between a typeface specification, a text-shaping engine, a browser, and a completely unnecessary idea, there was an itch I found to scratch and an idea I wanted to express. So I made it. I know I'll keep finding things like that.