billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=ef8ee3fbdab5445e2eacf27ed126fcc65f91250e

commit ef8ee3fbdab5445e2eacf27ed126fcc65f91250e
Author: Arnout Engelen <[email protected]>
Date:   Sat May 21 14:40:41 2016 +0200

    Allow font size to be updated via escape sequence
---
 src/bin/termptyesc.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index 0daeda4..cd920d1 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -1212,6 +1212,22 @@ err:
    return -1;
 }
 
+static void
+_handle_xterm_50_command(Termpty *ty,
+                         char *s,
+                         int len)
+{
+  int i;
+  int size;
+  for (i = 0; i < len - strlen(":size="); i++)
+    {
+       if (strncmp(s + i, ":size=", strlen(":size=")) == 0)
+         {
+            size = strtol(s + i + strlen(":size="), NULL, 10);
+            termio_font_size_set(ty->obj, size);
+         }
+    }
+}
 
 static void
 _handle_xterm_777_command(Termpty *ty EINA_UNUSED,
@@ -1417,6 +1433,17 @@ _handle_esc_xterm(Termpty *ty, const Eina_Unicode *c, 
Eina_Unicode *ce)
 #endif
           }
         break;
+      case 50:
+        DBG("xterm font support");
+        if (!*p)
+          goto err;
+        s = eina_unicode_unicode_to_utf8(p, &len);
+        if (s)
+          {
+             _handle_xterm_50_command(ty, s, len);
+             free(s);
+          }
+        break;
       case 777:
         DBG("xterm notification support");
         s = eina_unicode_unicode_to_utf8(p, &len);

-- 


Reply via email to