Signed-off-by: Gijs Vermeulen gijsvrm@codeweavers.com --- programs/wineconsole/wineconsole.c | 4 ++++ server/console.c | 14 ++++++++++++++ server/protocol.def | 4 ++++ 3 files changed, 22 insertions(+)
diff --git a/programs/wineconsole/wineconsole.c b/programs/wineconsole/wineconsole.c index 439099c37a..98bd32fda8 100644 --- a/programs/wineconsole/wineconsole.c +++ b/programs/wineconsole/wineconsole.c @@ -458,6 +458,10 @@ void WINECON_SetConfig(struct inner_data* data, const struct config_data* cf req->max_height = (r.bottom - r.top - GetSystemMetrics(SM_CYCAPTION)) / cfg->cell_height; req->font_width = cfg->cell_width; req->font_height = cfg->cell_height; + req->font_weight = cfg->font_weight; + req->font_pitch_family = FIXED_PITCH | FF_DONTCARE; + req->face_namelen = lstrlenW(cfg->face_name) * sizeof(WCHAR); + wine_server_add_data( req, cfg->face_name, req->face_namelen ); wine_server_call( req ); } SERVER_END_REQ; diff --git a/server/console.c b/server/console.c index 7d1fc5d268..e93dec2501 100644 --- a/server/console.c +++ b/server/console.c @@ -131,6 +131,9 @@ struct font_info { short int width; short int height; + short int weight; + short int pitch_family; + WCHAR *face_name; };
struct screen_buffer @@ -433,6 +436,9 @@ static struct screen_buffer *create_console_output( struct console_input *consol screen_buffer->data = NULL; screen_buffer->font.width = 0; screen_buffer->font.height = 0; + screen_buffer->font.weight = 400; + screen_buffer->font.pitch_family = 1; + screen_buffer->font.face_name = NULL; memset( screen_buffer->color_map, 0, sizeof(screen_buffer->color_map) ); list_add_head( &screen_buffer_list, &screen_buffer->entry );
@@ -1041,8 +1047,16 @@ static int set_console_output_info( struct screen_buffer *screen_buffer, } if (req->mask & SET_CONSOLE_OUTPUT_INFO_FONT) { + data_size_t total; screen_buffer->font.width = req->font_width; screen_buffer->font.height = req->font_height; + screen_buffer->font.weight = req->font_weight; + screen_buffer->font.pitch_family = req->font_pitch_family; + if (screen_buffer->font.face_name) free(screen_buffer->font.face_name); + total = min( req->face_namelen, get_req_data_size() ); + screen_buffer->font.face_name = mem_alloc( total + sizeof(WCHAR) ); + memcpy( screen_buffer->font.face_name, get_req_data(), total ); + screen_buffer->font.face_name[total/sizeof(WCHAR)] = 0; } if (req->mask & SET_CONSOLE_OUTPUT_INFO_COLORTABLE) { diff --git a/server/protocol.def b/server/protocol.def index 6af0ae0cff..6030a0152c 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -1634,6 +1634,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 #define SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM 0x0001