]> git.proxmox.com Git - mirror_xterm.js.git/commitdiff
Use rendered height for detect broken bold font.
authoryutaka <shigure@refy.net>
Wed, 8 Mar 2017 05:12:25 +0000 (05:12 +0000)
committeryutaka <shigure@refy.net>
Wed, 8 Mar 2017 11:30:23 +0000 (11:30 +0000)
src/Renderer.ts

index a839e7d91f81abedc271c598fd2e00ec3abd2f13..4131abc4b2476441a481d5c305ddcef0f6287697 100644 (file)
@@ -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;
 }