@lethevimlet/sshift 1.4.7 → 1.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/webapp/js/app.js +18 -0
package/package.json
CHANGED
package/src/webapp/js/app.js
CHANGED
|
@@ -7451,6 +7451,24 @@ if (keepaliveCountMaxInput && this.sshKeepaliveCountMax) {
|
|
|
7451
7451
|
: Promise.resolve();
|
|
7452
7452
|
|
|
7453
7453
|
fontReady.then(() => {
|
|
7454
|
+
// Force the CharSizeService to re-measure the glyph dimensions now
|
|
7455
|
+
// that the web font has swapped in. xterm.js v6's CharSizeService
|
|
7456
|
+
// only re-measures on fontFamily/fontSize option changes or on
|
|
7457
|
+
// resize() — it does NOT observe document.fonts.ready itself. A
|
|
7458
|
+
// competing fit() (e.g. from the ResizeObserver) that runs before
|
|
7459
|
+
// font load completes leaves the renderer's dimensions stuck at the
|
|
7460
|
+
// fallback font's metrics. That mismatch paints every other row as
|
|
7461
|
+
// an empty black band (the "interlace" bug) because the atlas
|
|
7462
|
+
// rasters glyphs at the real font size while the cell layout keeps
|
|
7463
|
+
// the fallback's smaller row pitch. Calling measure() here fires
|
|
7464
|
+
// onCharSizeChange synchronously, which the RenderService listens to
|
|
7465
|
+
// and forwards to the renderer's handleCharSizeChanged so
|
|
7466
|
+
// _updateDimensions + _refreshCharAtlas run before our fit().
|
|
7467
|
+
const core = terminal._core;
|
|
7468
|
+
if (core && core._charSizeService && typeof core._charSizeService.measure === 'function') {
|
|
7469
|
+
try { core._charSizeService.measure(); } catch (_) {}
|
|
7470
|
+
}
|
|
7471
|
+
|
|
7454
7472
|
// Clear the WebGL texture atlas after the font swap — glyphs cached
|
|
7455
7473
|
// before the swap were rasterised at the fallback font's metrics.
|
|
7456
7474
|
if (session.webglAddon) {
|