hterm-dev-0.7.6.3: Fix regression in bold-safe font detection.
* Fix regression that caused hterm to fail to load if the chosen font was not
"safe" for bold charcters.
BUG=chromium-os:28020
TEST=test_harness.html, 57/57 tests passed.
TEST=Fake out bold-safe test and ensure that console warning appears as
expected.
Change-Id: I27cc61a48960172bd21d1c74c2921f7a0a3101e7
Reviewed-on: https://gerrit.chromium.org/gerrit/18481
Reviewed-by: Zelidrag Hornung <zelidrag@chromium.org>
Commit-Ready: Robert Ginda <rginda@chromium.org>
Reviewed-by: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
diff --git a/hterm/js/terminal.js b/hterm/js/terminal.js
index 1b843ad..4b4b85a 100644
--- a/hterm/js/terminal.js
+++ b/hterm/js/terminal.js
@@ -327,7 +327,8 @@
var isBoldSafe = normalSize.equals(boldSize);
if (!isBoldSafe) {
console.warn('Bold characters disabled: Size of bold weight differs ' +
- 'from normal. Font family is: ' + str);
+ 'from normal. Font family is: ' +
+ this.scrollPort_.getFontFamily());
}
this.screen_.textAttributes.enableBold = isBoldSafe;