Slim Type For Small Screens, With PixelFonts

Small displays are affordable and easy to use, but their size can present a challenge. To help address this, [mcer12] created PixelFonts, a family of condensed fonts designed specifically for low-resolution displays, making sure every line holds as much text as it can fit.

PixelFonts works alongside either the AdafruitGFX or U8g2 libraries; one writes to the display using the common syntax of the chosen library, and the font itself comes from PixelFonts. Text can be displayed in regular and 3D shadowed versions, as well as in a wide variety of heights and weights. There’s support for accented letters, albeit only in lowercase due to space constraints. Want to make some changes? Every font comes with a BDF file to make alterations as widely accessible as possible.

Making the most of every pixel is important with small displays, but there’s more than one way to do so. For example, when it comes to color LCDs, subpixel rendering can improve legibility of small fonts; another way to get the most out of limited display sizes.

The Commodore 64 Keyboard Font, For Everyone

There are some classic fonts which appeared in one place and became almost iconic, yet never made it into the digital age. The font on the Commodore 64 keyboard for example, with its its slightly narrow letters. If you’ve been yearning to see it again then help is at hand, because [Levente Szabadkai] has traced it from photographs and made it available as a vector font in a variety of formats on GitHub.

A font proof sheet for the C64 keyboard font.As you might expect, it’s an uppercase font only, as the hardware never sported lower case letters. But it doesn’t stop there, because it also contains the various punctuation and other marks, all the PETSCII glyphs, and the function keys. There’s even a Commodore logo for that key down in the left hand corner, but we’re guessing you’ll have to assemble CLR HOME yourself. We can’t help noticing the cursor arrows are solid in contrast to the outlined ones on our 64 here, but we’re guessing there may be some minor differences between models.

So download the font, and make all your stuff look like a 1980s home computer keyboard. And in case you are wondering why you find so many keyboard fonts familiar, we’ve talked about the Gorton font in the past.

An animation shows an open document in LibreOffice Write. In the document are some hexadecimal opcodes. The operator selects these opcodes and changes their font to Z80 Sans, at which point they are displayed as assembly mnemonic codes.

Disassembling Opcodes With A Font

Those who stay into the forbidden realm of font rendering quickly learn how convoluted and arcane it can be – LaTeX is a fully Turing-complete programming language, Unicode has over eighty invisible characters, and there are libraries that let you execute WebAssembly in a font. A great example of a font’s hidden capabilities is Z80 Sans, a font that disassembles Z80 opcodes to assembly mnemonics.

If one pastes Z80 opcodes into a word processor and changes their font to Z80 Sans, the codes are rendered as their assembly mnemonics. The font manages this by abusing the Glyph Substitution Table and Glyph Positioning Table, two components of the OpenType standard. Fonts define relations between characters (internal representations used by the computer, such as ASCII and Unicode) and glyphs (the graphics actually displayed).

In some cases, though, the way a character is displayed depends on where it appears in a word, or what appears around it (Arabic characters are a common example, but an example from English is the ligature “æ”). Z80 Sans defines all the possible glyphs for each nibble of the opcodes, then used a recursive descent parser to generate substitution rules which display the correct glyphs in context.

For a deeper dive into the pitfalls of text graphics, check out this font rendering engine written for a hobby OS. You can also use fonts to play games or talk to an LLM.

The Subtle Art Of Letterform Design

Typeface (such as Times New Roman) refers to the design that gives a set of letters, numbers, and symbols their signature “look”. Font, on the other hand, is a specific implementation of a typeface, for example, Times New Roman Italic 12 pt.

‘Q’ is a counterpoint to the idea that typography is just one fussy detail after another.

Right about this point, some of you are nodding along and perhaps thinking “oh, that’s interesting,” while the rest of you are already hovering over your browser’s Back button. If you’re one of the former, you may be interested in checking out the (sort of) interactive tour of typography design elements by the Ohno Type School, a small group that loves design.

On one hand, letters are simple and readily recognizable symbols. But at the same time, their simplicity puts a lot of weight on seemingly minor elements. Small changes can have a big visual impact. The tour lays bare answers to questions such as: What is the optimal parting of the cheeks of a capital ‘B’? At what height should the crossbar on an ‘A’ sit, and why does it look so weird if done incorrectly? And yet, the tail of a ‘Q’ can be just about anything? How and why does an ‘H’ define the spacing of the entire typeface? All these (and more) are laid bare.

Continue reading “The Subtle Art Of Letterform Design” →

The Most Personalized Font Is Your Own Handwriting

When making a personal website, one will naturally include a personal touch. What could be more personal than creating a font from your own handwriting? That’s what [Chris Smith] has done, and it looks great on his blog, which also has a post summarizing the process.

Like most of us [Chris] tried to use open-source toolkits first, but the workflow (and thus the result) was a bit wanting. Still, he details what it takes to create a font in Inkscape or Font Forge if anyone else wants to give it a try. Instead he ended up using a web app called Calligraphr designed for this exact use case.

Above is hand written; below is the font. Aside from the lighting the difference isn’t obvious.

Fair warning: the tool is closed-source and he needed to pay to get all the features he wanted — specifically ligatures, glyphs made from two joined letters. By adding ligatures his personalized font gets a little bit of variation, as the ‘l’ in an ‘lf’ ligature (for example) need not be identical to the stand-alone ‘l’. In a case of “you get what you pay for” the process worked great and to the credit of the folks at Calligraphr, while it is Software-As-Service they offer a one-time payment for one month’s use of the “pro” features. While nobody likes SaS, that’s a much more user-friendly way to do it — or perhaps “least-user-hostile”.

All [Chris] had to do was write out and scan a few sheets that you can see above, while the software handled most of the hard work automagically. [Chris] only had to apply a few tweaks to get the result you see here. Aside from websites, we could see a personalized font like this being a nice touch to laser cut, CNC or even 3D printed projects. If you don’t want a personalized touch, the “Gorton” lettering of retro machinery might be more to your liking.

You Know This Font, But You Don’t Really Know It

Typography enthusiasts reach a point at which they can recognise a font after seeing only a few letters in the wild, and usually identify its close family if not the font itself. It’s unusual then for a font to leave them completely stumped, but that’s where [Marcin Wichary] found himself. He noticed a font which many of you will also have seen, on typewriter and older terminal keys. It has a few unusual features that run contrary to normal font design such as slightly odd-shaped letters and a constant width line, and once he started looking, it appeared everywhere. Finding its origin led back well over a century, and led him to places as diverse as New York street furniture and NASA elevators.

The font in question is called Gorton, and it came from the Gorton Machine Co, a Wisconsin manufacturer. It’s a font designed for a mechanical router, which is why it appears on so much custom signage and utilitarian components such as keyboard keys. Surprisingly its history leads back into the 19th century, predating many of the much more well-know sans serif fonts. So keep an eye out for it on your retro tech, and you’ll find that you’ve seen a lot more of it than you ever knew. If you are a fellow font-head, you might also know the Hershey Font, and we just ran a piece on the magnetic check fonts last week.

Thanks [Martina] for the tip!

Llama.ttf Is AI, In A Font

It’s a great joke, and like all great jokes it makes you think. [Søren Fuglede Jørgensen] managed to cram a 15 M parameter large language model into a completely valid TrueType font: llama.ttf. Being an LLM-in-a-font means that it’ll do its magic across applications – in your photo editor as well as in your text editor.

What magic, we hear you ask? Say you have some text, written in some non-AI-enabled font. Highlight that, and swap over to llama.ttf. The first thing it does is to change all “o” characters to “ø”s, just like [Søren]’s parents did with his name. But the real magic comes when you type a length of exclamation points. In any normal font, they’re just exclamation points, but llama.ttf replaces them with the output of the TinyStories LLM, run locally in the font. Switching back to another font reveals them to be exclamation points after all. Bønkers!

This is all made possible by the HarfBuzz font extensions library. In the name of making custom ligatures and other text shaping possible, HarfBuzz allows fonts to contain Web Assembly code and runs it in a virtual machine at rendering time. This gives font designers the flexibility to render various Unicode combinations as unique glyphs, which is useful for languages like Persian. But it can just as well turn all “o”s into “ø”s or run all exclamation points through an LLM.

Something screams mischief about running arbitrary WASM while you type, but we remind you that since PostScript, font rendering engines have been able to run code in order to help with the formatting problem. This ability was inherited by PDF, and has kept malicious PDFs in the top-10 infiltration vectors for the last fifteen years. [Citation needed.] So if you can model a CPU in PDF, why not an LLM in TTF? Or a Pokemon clone in an OpenType font?

We don’t think [Søren] was making a security point here, we think he was just having fun. You can see how much fun in his video demo embedded below.

Continue reading “Llama.ttf Is AI, In A Font” →