microsoft / cascadia-code

This is a fun, new monospaced font that includes programming ligatures and is designed to enhance the modern look and feel of the Windows Terminal.
Other
25.1k stars 793 forks source link

Feature Request: Large Type Pieces (Unicode 16.0) #709

Closed PhMajerus closed 2 months ago

PhMajerus commented 5 months ago

Description of the new feature

Back in the 1970's, terminals were expensive high-tech pieces of equipment. Several manufacturers competed to provide more features and justify paying more for a terminal than we pay for a microcomputer today. One of the high-end terminal was the Hewlett-Packard 2640 Series. It had lot of advanced features and tricks to improve the visual quality and flexibility, including the ability to add characters ROMs to support other alphabets, mathematical symbols, and semigraphics.

Everybody knows the Box Drawings set of characters to create tables and UI elements in text terminals, but HP went further, they decided to design a 64 extended characters ROM especially to display large characters. This isn't some width or height doubling control code like the DECDHL, but more like FIGlet, using normal-sized characters as pieces of a larger glyph. But unlike FIGlet, the idea was to design pieces of large characters that would fit together perfectly when composed in a grid instead of reusing existing characters.

image

They do not force the whole line to be double-size, instead they can just be composed in the original 80×25 grid by using 3×3 semigraphic characters for each large letter.

image

We're now 50 years later, and terminal emulators are rediscovering and catching up to the advanced features those devices had. In January 2022, Unicode approved a new set of legacy computing characters, that includes those Large Type Pieces, to be part of Unicode 16.0.

As they are inherited from those terminal devices back when competition was pushing interesting new features, those Symbols for Legacy Computing characters are highly interesting to improve modern terminal emulators as well. The proposal was even originally named "Terminals Supplement".

Proposed technical implementation details

Adding support for the large character set does not require any new features in terminals, all it requires is to add 55 new characters to the font (U+1CE1A to U+1CE50). They work similarly to box drawings and block elements, joining seamlessly when placed next to each other.

image

Even better, those characters are not limited to the terminal, as they are purely characters-based, they make it possible to use large text in any plain-text file, including readme, source code comments, social network posts, … The pieces are also designed as a font pieces system, so they can be combined to create other characters.

image Note the Visual Studio editor leaves an extra gap between lines, so they don't join vertically, but that's the same as with box drawings and block elements characters. Also, this screenshot uses an older set of glyphs

Easy support to compose large characters can be provided using existing software tools such as FIGlet:

image

CUI apps can also easily take advantage of them as they are simple characters.

As you can guess from these screenshots, I'm not really asking for the Cascadia team to provide those characters, I've been working on them already and am happy to submit them. I'm mostly looking for comments and suggestions, and to document the feature to go along with a future pull request.

Finally, the large characters can be further improved using ligatures to handle common horizontal combinations. For example, the following screenshot is similar to the one above, but using ligatures to round letters: image (This is still a work in progress, some other improvements will still be added)

Large Type Pieces can also complement DECDHL and DECDWL to provide a 3rd heading size: image (This can be tested with the following command line: echo 8Jy4nMKg8Jy4nMKgwqDCoMKgwqDwnLic8Jy4o8KgwqDCoMKgwqDCoPCcuKzwnLimwqDCoPCcuJrwnLil8Jy4nMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoPCcuJ7wnLig8Jy4pcKgwqDCoMKgwqDCoMKgwqDwnLib8Jy4n/CcuKTwnLijwqDCoMKgwqDCoMKgwqDCoPCcuJ7wnLikCvCcuKjwnLif8Jy4tvCcuJrwnLik8Jy4nvCcuKTwnLia8Jy4tvCcuJzwnLib8Jy4pPCcuJrwnLinwqDCoMKg8Jy4qcKgwqDwnLipwqDwnLipwqDCoPCcuJ7wnLik8Jy4mvCcuKXwnLia8Jy4p/CcuJrwnLikwqDCoMKg8Jy4qcKg8Jy4nPCcuJzwnLib8Jy4pPCcuJrwnLikwqDCoPCcuKjwnLif8Jy5g/CcuJzwnLia8Jy4pPCcuJrwnLil8Jy4mvCcuKTwnLia8Jy4pcKg8Jy4qQrwnLi8wqDwnLi88Jy4vvCcuKXwnLi+8Jy5hPCcuL7wnLmE8Jy4vPCcuLzwnLi88Jy4vvCcuLbCoMKg8Jy4nvCcuYDwnLilwqDwnLi+8Jy4pfCcuL3wnLif8Jy4pfCcuL7wnLmE8Jy4vMKg8Jy4vvCcuLbwnLi+8Jy4pcKgwqDCoPCcuLzCoPCcuL7wnLi28Jy4qPCcuYPwnLi+8Jy4pcKgwqDwnLi8wqDCoPCcuLzwnLi+8Jy4pfCcuL7wnLil8Jy4vvCcuKXwnLie8Jy5g/CcuJ7wnLmDCsKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoPCcuJ7wnLmDwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKg8Jy4nvCcuYPCoMKgwqDCoMKgwqDCoPCcuJ7wnLmD8Jy5kMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgChsjM0hlYWRpbmcgMiAoREVDREhMKQobIzRIZWFkaW5nIDIgKERFQ0RITCkKChsjNkhlYWRpbmcgMyAoREVDRFdMKQoKTm9ybWFsCgo= | base64 -d)

Let me know what you think!

PhMajerus commented 2 months ago

Here's a comparison between Iosevka Term, which uses the Unicode reference design, and my Cascadia design.

Iosevka:

image

Cascadia:

image

Iosevka follows the Unicode reference design, while my design for Cascadia uses rounded instead of bevelled/chamfered corners, the center piece of 7, and K have also been slightly rounded. The horizontal crossbar of the diagonal piece used as the center of Z was also removed, because it can never connect to anything, and Cascadia's 'Z' doesn't have a crossbar either. Note also the Q stem that diverge from its reference design to make it more reminiscent of Cascadia's Q. Finally, the connection of diagonals have been adjusted to create perfectly straight diagonal lines, which wasn't the case with the reference design:

Iosevka:

image

Cascadia:

image