xterm-addon-webgl
Advanced tools
Comparing version 0.12.0-beta.28 to 0.12.0-beta.29
{ | ||
"name": "xterm-addon-webgl", | ||
"version": "0.12.0-beta.28", | ||
"version": "0.12.0-beta.29", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "name": "The xterm.js authors", |
@@ -16,2 +16,3 @@ /** | ||
import { tryDrawCustomChar } from 'browser/renderer/CustomGlyphs'; | ||
import { isPowerlineGlyph } from 'browser/renderer/RendererUtils'; | ||
@@ -374,13 +375,4 @@ // For debugging purposes, it can be useful to set this to a really tiny value, | ||
// Check if the char is a powerline glyph, these will be restricted to a single cell glyph, no | ||
// padding on either side that are allowed for other glyphs since they are designed to be pixel | ||
// perfect but may render with "bad" anti-aliasing | ||
let isPowerlineGlyph = false; | ||
if (chars.length === 1) { | ||
const code = chars.charCodeAt(0); | ||
if (code >= 0xE0A0 && code <= 0xE0D6) { | ||
isPowerlineGlyph = true; | ||
} | ||
} | ||
this._tmpCtx.fillStyle = this._getForegroundCss(bg, bgColorMode, bgColor, fg, fgColorMode, fgColor, inverse, bold, isPowerlineGlyph); | ||
const powerLineGlyph = chars.length === 1 && isPowerlineGlyph(chars.charCodeAt(0)); | ||
this._tmpCtx.fillStyle = this._getForegroundCss(bg, bgColorMode, bgColor, fg, fgColorMode, fgColor, inverse, bold, powerLineGlyph); | ||
@@ -393,3 +385,3 @@ // Apply alpha to dim the character | ||
// For powerline glyphs left/top padding is excluded (https://github.com/microsoft/vscode/issues/120129) | ||
const padding = isPowerlineGlyph ? 0 : TMP_CANVAS_GLYPH_PADDING; | ||
const padding = powerLineGlyph ? 0 : TMP_CANVAS_GLYPH_PADDING; | ||
@@ -464,3 +456,3 @@ // Draw custom characters if applicable | ||
const rasterizedGlyph = this._findGlyphBoundingBox(imageData, this._workBoundingBox, allowedWidth, isPowerlineGlyph, drawSuccess); | ||
const rasterizedGlyph = this._findGlyphBoundingBox(imageData, this._workBoundingBox, allowedWidth, powerLineGlyph, drawSuccess); | ||
const clippedImageData = this._clipImageData(imageData, this._workBoundingBox); | ||
@@ -467,0 +459,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
483152
3104