Comparing version 5.3.0-beta.25 to 5.3.0-beta.26
{ | ||
"name": "xterm", | ||
"description": "Full xterm terminal, in your browser", | ||
"version": "5.3.0-beta.25", | ||
"version": "5.3.0-beta.26", | ||
"main": "lib/xterm.js", | ||
@@ -6,0 +6,0 @@ "style": "css/xterm.css", |
@@ -245,8 +245,8 @@ /** | ||
public getRasterizedGlyphCombinedChar(chars: string, bg: number, fg: number, ext: number): IRasterizedGlyph { | ||
return this._getFromCacheMap(this._cacheMapCombined, chars, bg, fg, ext); | ||
public getRasterizedGlyphCombinedChar(chars: string, bg: number, fg: number, ext: number, restrictToCellHeight: boolean): IRasterizedGlyph { | ||
return this._getFromCacheMap(this._cacheMapCombined, chars, bg, fg, ext, restrictToCellHeight); | ||
} | ||
public getRasterizedGlyph(code: number, bg: number, fg: number, ext: number): IRasterizedGlyph { | ||
return this._getFromCacheMap(this._cacheMap, code, bg, fg, ext); | ||
public getRasterizedGlyph(code: number, bg: number, fg: number, ext: number, restrictToCellHeight: boolean): IRasterizedGlyph { | ||
return this._getFromCacheMap(this._cacheMap, code, bg, fg, ext, restrictToCellHeight); | ||
} | ||
@@ -262,7 +262,8 @@ | ||
fg: number, | ||
ext: number | ||
ext: number, | ||
restrictToCellHeight: boolean = false | ||
): IRasterizedGlyph { | ||
$glyph = cacheMap.get(key, bg, fg, ext); | ||
if (!$glyph) { | ||
$glyph = this._drawToCache(key, bg, fg, ext); | ||
$glyph = this._drawToCache(key, bg, fg, ext, restrictToCellHeight); | ||
cacheMap.set(key, bg, fg, ext, $glyph); | ||
@@ -419,3 +420,3 @@ } | ||
private _drawToCache(codeOrChars: number | string, bg: number, fg: number, ext: number): IRasterizedGlyph { | ||
private _drawToCache(codeOrChars: number | string, bg: number, fg: number, ext: number, restrictToCellHeight: boolean = false): IRasterizedGlyph { | ||
const chars = typeof codeOrChars === 'number' ? String.fromCharCode(codeOrChars) : codeOrChars; | ||
@@ -540,2 +541,3 @@ | ||
const yBot = Math.ceil(padding + this._config.deviceCharHeight + lineWidth * 2) - yOffset; | ||
const ySpace = lineWidth * 2; | ||
@@ -549,6 +551,13 @@ for (let i = 0; i < chWidth; i++) { | ||
case UnderlineStyle.DOUBLE: | ||
this._tmpCtx.moveTo(xChLeft, yTop); | ||
this._tmpCtx.lineTo(xChRight, yTop); | ||
this._tmpCtx.moveTo(xChLeft, yBot); | ||
this._tmpCtx.lineTo(xChRight, yBot); | ||
if (restrictToCellHeight) { | ||
this._tmpCtx.moveTo(xChLeft, yTop - ySpace); | ||
this._tmpCtx.lineTo(xChRight, yTop - ySpace); | ||
this._tmpCtx.moveTo(xChLeft, yTop); | ||
this._tmpCtx.lineTo(xChRight, yTop); | ||
} else { | ||
this._tmpCtx.moveTo(xChLeft, yTop); | ||
this._tmpCtx.lineTo(xChRight, yTop); | ||
this._tmpCtx.moveTo(xChLeft, yBot); | ||
this._tmpCtx.lineTo(xChRight, yBot); | ||
} | ||
break; | ||
@@ -555,0 +564,0 @@ case UnderlineStyle.CURLY: |
@@ -110,4 +110,4 @@ /** | ||
clearTexture(): void; | ||
getRasterizedGlyph(code: number, bg: number, fg: number, ext: number): IRasterizedGlyph; | ||
getRasterizedGlyphCombinedChar(chars: string, bg: number, fg: number, ext: number): IRasterizedGlyph; | ||
getRasterizedGlyph(code: number, bg: number, fg: number, ext: number, restrictToCellHeight: boolean): IRasterizedGlyph; | ||
getRasterizedGlyphCombinedChar(chars: string, bg: number, fg: number, ext: number, restrictToCellHeight: boolean): IRasterizedGlyph; | ||
} | ||
@@ -114,0 +114,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2338293
24420