* Lots of work with fonts: Support mappings of various cterm/SyncTERM fonts.

* Load font info from SAUCE
* Better work with defaults & theme values
This commit is contained in:
Bryan Ashby 2015-04-16 22:29:53 -06:00
parent 586f3d60b3
commit 5faa11664b
15 changed files with 233 additions and 39 deletions

View file

@ -100,20 +100,9 @@ MCIViewFactory.prototype.createFromMCI = function(mci) {
setOption(1, 'textStyle');
if(options.textStyle === 'P') {
// Supply from theme, if available
// :TODO: Move this logic elsewhere
if(this.client.currentThemeInfo && this.client.currentThemeInfo.config) {
var themePwChar = this.client.currentThemeInfo.config.passwordChar;
if(_.isString(themePwChar)) {
options.textMaskChar = themePwChar.substr(0, 1);
} else if(_.isNumber(themePwChar)) {
options.textMaskChar = String.fromCharCode(themePwChar);
} else {
options.textMaskChar = '*';
}
} else {
options.textMaskChar = '*';
}
// Assign the proper password character / text mask
assert(_.isObject(this.client.currentThemeInfo));
options.textMaskChar = this.client.currentThemeInfo.getPasswordChar();
}
setFocusOption(0, 'focusTextStyle');