SyncTERM Font Support Detection

* Attempt to detect SyncTERM font support using DSR/CPR
* If a terminal doesn't support DSR/CPR, assume it doesn't support SyncTERM fonts, either.
* Support is also disabled if term simply doesn't ignore the ESC sequence, either
This commit is contained in:
Bryan Ashby
2022-04-25 21:09:57 -06:00
parent ac010f2ca4
commit 15c3c87500
5 changed files with 164 additions and 143 deletions

View File

@@ -199,7 +199,8 @@ exports.getModule = class TelnetBridgeModule extends MenuModule {
self.client.removeListener('key press', connectionKeyPressHandler);
self.client.log.info(connectOpts, 'Telnet bridge connection established');
if(self.config.font) {
// put the font back how it was prior, if fonts are enabled
if(self.client.term.syncTermFontsEnabled && self.config.font) {
self.client.term.rawWrite(setSyncTermFontWithAlias(self.config.font));
}