SGR 10..20 (font selection) support #2382
Replies: 1 comment 3 replies
-
I'm aware of this SGR from the standard but my understanding is that almost no terminals support it because it isn't clear how grid metrics are supposed to work with changing fonts. By "grid metrics", as background: every font defines a unique grid dimension, decoration position (underline, strikethrough), etc. This is unique to the font. If you configure Ghostty (or any other terminal) with one font and then a different one, your grid size (columns x rows) may change, or underline may move higher relative to the cell baseline, etc. My belief is SGR 10-20 was designed in an era more rampant with bitmap fonts (as opposed to scalable fonts) which fit into a predefined grid size rather than the grid size adapting to the font. This way, switching fonts is a complete non-issue. But with modern, scalable fonts, I'm not sure how this works. I think I have some questions:
|
Beta Was this translation helpful? Give feedback.
-
ECMA-48 defines SGR 10..20 for switching between different fonts. Although I'm not aware of any terminals actually supporting this, it would be a nice feature to have.
Beta Was this translation helpful? Give feedback.
All reactions