Commit 891bc75c authored by Matan Ziv-Av's avatar Matan Ziv-Av Committed by Kurt Hindenburg
Browse files

Add support for `CSI 16 t` - report character cell size in pixels

(cherry picked from commit 3a6a62ed)
parent fe2a737d
......@@ -983,7 +983,8 @@ void Vt102Emulation::processToken(int token, int p, int q)
break;
case token_csi_ps('t', 14) : reportPixelSize(); break;
case token_csi_ps('t', 18) : reportSize(); break;
case token_csi_ps('t', 16) : reportCellSize(); break;
case token_csi_ps('t', 18) : reportSize(); break;
// change tab text color : \e[28;<color>t color: 0-16,777,215
case token_csi_ps('t', 28) : /* IGNORED: konsole-specific KDE3-era extension, not implemented */ break;
......@@ -1562,6 +1563,17 @@ void Vt102Emulation::reportPixelSize()
sendString(tmp);
}
void Vt102Emulation::reportCellSize()
{
char tmp[30];
snprintf(tmp,
sizeof(tmp),
"\033[6;%d;%dt",
_currentScreen->currentTerminalDisplay()->terminalFont()->fontHeight(),
_currentScreen->currentTerminalDisplay()->terminalFont()->fontWidth());
sendString(tmp);
}
void Vt102Emulation::reportSize()
{
char tmp[30];
......
......@@ -161,6 +161,7 @@ private:
void reportAnswerBack();
void reportCursorPosition();
void reportPixelSize();
void reportCellSize();
void reportSize();
void reportTerminalParms(int p);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment