From b0930a3b7ef84aaed9690a8a6a976f9dfffdcea9 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 19 Jul 2016 20:58:51 -0600 Subject: [PATCH] Add setSyncTermFontWithAlias() --- core/ansi_term.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/ansi_term.js b/core/ansi_term.js index 869768b9..06bf864f 100644 --- a/core/ansi_term.js +++ b/core/ansi_term.js @@ -30,6 +30,7 @@ exports.goHome = goHome; exports.disableVT100LineWrapping = disableVT100LineWrapping; exports.setSyncTERMFont = setSyncTERMFont; exports.getSyncTERMFontFromAlias = getSyncTERMFontFromAlias; +exports.setSyncTermFontWithAlias = setSyncTermFontWithAlias; exports.setCursorStyle = setCursorStyle; exports.setEmulatedBaudRate = setEmulatedBaudRate; @@ -299,6 +300,11 @@ function getSyncTERMFontFromAlias(alias) { return FONT_ALIAS_TO_SYNCTERM_MAP[alias.toLowerCase().replace(/ /g, '_')]; } +function setSyncTermFontWithAlias(nameOrAlias) { + nameOrAlias = getSyncTERMFontFromAlias(nameOrAlias) || nameOrAlias; + return setSyncTERMFont(nameOrAlias); +} + const DEC_CURSOR_STYLE = { 'blinking block' : 0, 'default' : 1,