Use rendered height for detect broken bold font.

This commit is contained in:
yutaka
2017-03-08 11:30:23 +00:00
parent 2ec756fd6b
commit 4b2ae6a79f
+3 -1
View 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;
}