From: yutaka Date: Wed, 8 Mar 2017 05:12:25 +0000 (+0000) Subject: Use rendered height for detect broken bold font. X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=4b2ae6a79fb0f899e895093ef440ac9977210d8f;p=mirror_xterm.js.git Use rendered height for detect broken bold font. --- diff --git a/src/Renderer.ts b/src/Renderer.ts index a839e7d..4131abc 100644 --- a/src/Renderer.ts +++ b/src/Renderer.ts @@ -297,8 +297,10 @@ function checkBoldBroken(terminal) { el.innerHTML = 'hello world'; terminal.appendChild(el); const w1 = el.offsetWidth; + const h1 = el.offsetHeight; el.style.fontWeight = 'bold'; const w2 = el.offsetWidth; + const h2 = el.offsetHeight; terminal.removeChild(el); - return w1 !== w2; + return w1 !== w2 || h1 !== h2; }