diff --git a/src/protocols/ssh/client.c b/src/protocols/ssh/client.c index 95b3247b..a1430591 100644 --- a/src/protocols/ssh/client.c +++ b/src/protocols/ssh/client.c @@ -191,6 +191,7 @@ int guac_client_init(guac_client* client, int argc, char** argv) { /* Create terminal */ client_data->term = guac_terminal_create(client, client_data->font_name, client_data->font_size, + client->info.optimal_resolution, client->info.optimal_width, client->info.optimal_height); /* Fail if terminal init failed */ diff --git a/src/protocols/ssh/display.c b/src/protocols/ssh/display.c index 5d2976a2..128277a8 100644 --- a/src/protocols/ssh/display.c +++ b/src/protocols/ssh/display.c @@ -341,7 +341,7 @@ int __guac_terminal_set(guac_terminal_display* display, int row, int col, int co guac_terminal_display* guac_terminal_display_alloc(guac_client* client, - const char* font_name, int font_size, + const char* font_name, int font_size, int dpi, int foreground, int background) { PangoFontMap* font_map; @@ -366,6 +366,7 @@ guac_terminal_display* guac_terminal_display_alloc(guac_client* client, pango_font_description_set_size(display->font_desc, font_size*PANGO_SCALE); font_map = pango_cairo_font_map_get_default(); + pango_cairo_font_map_set_resolution((PangoCairoFontMap*) font_map, dpi); context = pango_font_map_create_context(font_map); font = pango_font_map_load_font(font_map, context, display->font_desc); diff --git a/src/protocols/ssh/display.h b/src/protocols/ssh/display.h index c0f5c520..56cd1fcc 100644 --- a/src/protocols/ssh/display.h +++ b/src/protocols/ssh/display.h @@ -238,7 +238,7 @@ typedef struct guac_terminal_display { * colors. */ guac_terminal_display* guac_terminal_display_alloc(guac_client* client, - const char* font_name, int font_size, + const char* font_name, int font_size, int dpi, int foreground, int background); /** diff --git a/src/protocols/ssh/terminal.c b/src/protocols/ssh/terminal.c index b983931a..80c29fbf 100644 --- a/src/protocols/ssh/terminal.c +++ b/src/protocols/ssh/terminal.c @@ -94,7 +94,7 @@ void guac_terminal_reset(guac_terminal* term) { } guac_terminal* guac_terminal_create(guac_client* client, - const char* font_name, int font_size, + const char* font_name, int font_size, int dpi, int width, int height) { guac_terminal_char default_char = { @@ -115,7 +115,7 @@ guac_terminal* guac_terminal_create(guac_client* client, /* Init display */ term->display = guac_terminal_display_alloc(client, - font_name, font_size, + font_name, font_size, dpi, default_char.attributes.foreground, default_char.attributes.background); diff --git a/src/protocols/ssh/terminal.h b/src/protocols/ssh/terminal.h index 569cce46..a5dec1da 100644 --- a/src/protocols/ssh/terminal.h +++ b/src/protocols/ssh/terminal.h @@ -260,7 +260,7 @@ struct guac_terminal { * rendering to the given client. */ guac_terminal* guac_terminal_create(guac_client* client, - const char* font_name, int font_size, + const char* font_name, int font_size, int dpi, int width, int height); /**