From: Hugh McMaster Subject: wineconsole: Correctly handle TrueType font widths Message-Id: Date: Tue, 1 Nov 2016 11:59:30 +0000 Signed-off-by: Hugh McMaster --- programs/wineconsole/user.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/programs/wineconsole/user.c b/programs/wineconsole/user.c index eb68373..b6734cc 100644 --- a/programs/wineconsole/user.c +++ b/programs/wineconsole/user.c @@ -461,7 +461,11 @@ HFONT WCUSER_CopyFont(struct config_data* config, HWND hWnd, const LOGFONTW* lf, SelectObject(hDC, hOldFont); ReleaseDC(hWnd, hDC); - config->cell_width = tm.tmMaxCharWidth; + if (tm.tmPitchAndFamily & (TMPF_VECTOR | TMPF_TRUETYPE)) + config->cell_width = tm.tmAveCharWidth; + else + config->cell_width = tm.tmMaxCharWidth; + config->cell_height = tm.tmHeight + tm.tmExternalLeading; config->font_weight = tm.tmWeight; lstrcpyW(config->face_name, lf->lfFaceName); -- 2.7.4