question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OSC 50 (get/set font) VT sequence

See original GitHub issue

As per ctlseqs.txt from xterm, OSC 50 is used to query/set the use font.

I was actually looking into neofetch and how it is detecting the font being used, and I think they all got it wrong (fishing the font by looking into the config file of the detected terminal). The proper way to communicate with the TE is to use the PTY, so through some VT sequence.

There is already OSC 50 and at least xterm and mintty (and mine) are supporting that. I’d wonder if you have interest in supporting that too (at least the getter part).

Many thanks, Christian.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
minttycommented, Jun 12, 2021

get/set default font (OSC 50?)

This sequence refers to the currently selected font attribute in mintty. So SGR 12 OSC 50 SGR 10 would change alternative font 2 etc. Also works separately in Tek mode.

list fonts usable as default (aka installed fonts for the TE)

Mintty has a command-line option to report (monospace) fonts: mintty -Rf. I don’t think it’s too useful to retrieve the (long) list interactively.

upload a new font (old VTs had sequences for that)

This feature of historic VT terminals was applicable and defined for bitmap fonts. So it’s not really too useful nowadays and I would discourage any terminal to spend effort on it; there are no plans to ever implement it in mintty.

register a font to an SGR slot 11-19

Actually SGR 11-20, where 11 and 20 are slightly special cases.

2reactions
jerchcommented, Jun 12, 2021

Oh sorry, I mixed the TE names - I actually meant mintty, thats the TE which is far ahead in terms of font settings, not mlterm. I think the core maintainer is active on github under the same name.

Edit:

p.s.: unclear to me for font-uploads would be how to deal with font fallback. that’s an unknown complexity to me still.

Yes, once going that path it pulls quite a lot, it is def. not done in one Saturday afternoon. For your question - I’d say always fall back to default font handling, if a glyph is missing. But maybe @mintty has more insights here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Escape code 50 in xterm - Unix & Linux Stack Exchange
Looking at the list of xterm escape codes reveals that (esc)]50;name(bel) sets the xterm's font to the font name , or to an...
Read more >
Support fonts and fonts attributes through inline escape ...
Escape sequences to set fonts and their attributes are ignored, instead they are displayed as raw. Terminals support escape sequences to alter ...
Read more >
PIC18CXX2 Data Sheet - Farnell
The sequence of events that takes place when switch- ing from the Timer1 oscillator to the main oscillator will depend on the mode...
Read more >
PIC16C7X - All Products
PIC16C7X Microcontroller Core Features: • High-performance RISC CPU. • Only 35 single word instructions to learn. • All single cycle instructions except for ......
Read more >
PIC18C601/801 - Microchip Technology
50. 49. 62. I. I. CMOS/ST. CMOS. Oscillator crystal input or external clock source input. ... Figure 3-7 depict time-out sequences on power-up....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found