Signed-off-by: Gijs Vermeulen gijsvrm@codeweavers.com --- server/console.c | 14 ++++++++++++-- server/protocol.def | 4 ++++ 2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/server/console.c b/server/console.c index e93dec2501..4500e23e13 100644 --- a/server/console.c +++ b/server/console.c @@ -1745,6 +1745,8 @@ DECL_HANDLER(set_console_output_info) DECL_HANDLER(get_console_output_info) { struct screen_buffer *screen_buffer; + void *data; + data_size_t total;
if ((screen_buffer = (struct screen_buffer *)get_handle_obj( current->process, req->handle, FILE_READ_PROPERTIES, &screen_buffer_ops))) @@ -1765,8 +1767,16 @@ DECL_HANDLER(get_console_output_info) reply->max_height = screen_buffer->max_height; reply->font_width = screen_buffer->font.width; reply->font_height = screen_buffer->font.height; - set_reply_data( screen_buffer->color_map, - min( sizeof(screen_buffer->color_map), get_reply_max_size() )); + reply->font_weight = screen_buffer->font.weight; + reply->font_pitch_family = screen_buffer->font.pitch_family; + reply->face_namelen = screen_buffer->font.face_name ? strlenW( screen_buffer->font.face_name ) * sizeof(WCHAR) : 0; + total = min( reply->face_namelen + sizeof(screen_buffer->color_map), get_reply_max_size() ); + if (total) + { + data = set_reply_data_size( total ); + if (screen_buffer->font.face_name) memcpy( data, screen_buffer->font.face_name, reply->face_namelen ); + memcpy( (char *)data + reply->face_namelen, screen_buffer->color_map, total - reply->face_namelen ); + } release_object( screen_buffer ); } } diff --git a/server/protocol.def b/server/protocol.def index 6030a0152c..1f64395284 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -1671,6 +1671,10 @@ struct console_renderer_event short int max_height; short int font_width; /* font size (width x height) */ short int font_height; + short int font_weight; /* font weight */ + short int font_pitch_family; /* font pitch & family */ + data_size_t face_namelen; /* length of face name in bytes */ + VARARG(face_name,unicode_str,face_namelen); /* font face name */ VARARG(colors,uints); /* color table */ @END