From 2f8b7cd587558944532f587abb5203ce54badba9 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 11 Mar 2019 14:51:27 +0100 Subject: curses: add option to specify VGA font encoding This uses iconv to convert glyphs from the specified VGA font encoding to unicode, and makes use of cchar_t instead of chtype when using ncursesw, which allows to store all wide char as well as the WACS values. The default charset is made CP437 since that is the charset of the hardware default VGA font. This also makes the curses backend set the LC_CTYPE locale to "" to allow curses to emit wide characters. Signed-off-by: Samuel Thibault Cc: Eddie Kohler Acked-by: Markus Armbruster Message-Id: <20190311135127.2229-3-samuel.thibault@ens-lyon.org> Signed-off-by: Gerd Hoffmann --- qapi/ui.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'qapi/ui.json') diff --git a/qapi/ui.json b/qapi/ui.json index c5d1d7f099..59e412139a 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -1080,6 +1080,19 @@ { 'enum' : 'DisplayGLMode', 'data' : [ 'off', 'on', 'core', 'es' ] } +## +# @DisplayCurses: +# +# Curses display options. +# +# @charset: Font charset used by guest (default: CP437). +# +# Since: 4.0 +# +## +{ 'struct' : 'DisplayCurses', + 'data' : { '*charset' : 'str' } } + ## # @DisplayType: # @@ -1142,6 +1155,7 @@ '*gl' : 'DisplayGLMode' }, 'discriminator' : 'type', 'data' : { 'gtk' : 'DisplayGTK', + 'curses' : 'DisplayCurses', 'egl-headless' : 'DisplayEGLHeadless'} } ## -- cgit v1.2.3