Start work on documenting text sizing protocol

This commit is contained in:
Kovid Goyal
2025-01-15 12:21:48 +05:30
parent 4e76a3d1c6
commit 484155ca89
2 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
The text sizing protocol
==============================================
Classically, because the terminal is a grid of equally spaced characters, only
a single text size was supported in terminals, with one minor exception, some
characters were allowed to be rendered in two cells, to accommodate East Asian
square aspect ratio characters and Emoji. Here by single text size we mean the
font size of all text on the screen is the same.
This protocol allows text to be displayed in the terminal in different sizes
both larger and smaller than the base text. It also solves the long standing
problem of robustly determining the width (in cells) a character should have.
Applications can interleave text of different sizes on the screen allowing for
typographic niceties like headlines, superscripts, etc.
Note that this protocol is fully backwards compatible, terminals that implement
it will continue to work just the same with applications that do not use it.
Because of this, it is not fully flexible in the font sizes it allows, as it
still has to work with the grid based character cell fundamental nature of the
terminal.
Quickstart
--------------