Files
openchamber/patches/ghostty-web+0.3.0.patch
T

34 lines
2.8 KiB
Diff
Raw Normal View History

diff --git a/node_modules/ghostty-web/dist/ghostty-web.js b/node_modules/ghostty-web/dist/ghostty-web.js
index 0000000000000000000000000000000000000000..1111111111111111111111111111111111111111 100644
--- a/node_modules/ghostty-web/dist/ghostty-web.js
+++ b/node_modules/ghostty-web/dist/ghostty-web.js
@@ -1285,1 +1285,1 @@
- C === 0 || C < 32 ? B.push(" ") : B.push(String.fromCodePoint(C));
+ C === 0 || C < 32 || C > 1114111 || (C >= 55296 && C <= 57343) ? B.push(" ") : B.push(String.fromCodePoint(C));
@@ -1328,1 +1328,1 @@
- this.ctx = Q, this.fontSize = B.fontSize ?? 15, this.fontFamily = B.fontFamily ?? "monospace", this.cursorStyle = B.cursorStyle ?? "block", this.cursorBlink = B.cursorBlink ?? !1, this.theme = { ...r, ...B.theme }, this.devicePixelRatio = B.devicePixelRatio ?? window.devicePixelRatio ?? 1, this.palette = [
+ this.ctx = Q, this.fontSize = B.fontSize ?? 15, this.fontFamily = B.fontFamily ?? "monospace", this.lineHeight = B.lineHeight ?? 1, this.cursorStyle = B.cursorStyle ?? "block", this.cursorBlink = B.cursorBlink ?? !1, this.theme = { ...r, ...B.theme }, this.devicePixelRatio = B.devicePixelRatio ?? window.devicePixelRatio ?? 1, this.palette = [
@@ -1353,1 +1353,1 @@
- const Q = B.measureText("M"), g = Math.ceil(Q.width), C = Q.actualBoundingBoxAscent || this.fontSize * 0.8, I = Q.actualBoundingBoxDescent || this.fontSize * 0.2, w = Math.ceil(C + I) + 2, o = Math.ceil(C) + 1;
+ const Q = B.measureText("M"), g = Math.ceil(Q.width), C = Q.actualBoundingBoxAscent || this.fontSize * 0.8, I = Q.actualBoundingBoxDescent || this.fontSize * 0.2, w0 = Math.ceil(C + I), extra = Math.max(0, Math.round((this.lineHeight - 1) * w0)), w = w0 + 2 + extra, o = Math.ceil(C) + 1;
@@ -1484,1 +1484,1 @@
- const s = g, F = C + this.metrics.baseline, a = String.fromCodePoint(A.codepoint || 32);
+ const s = g, F = C + this.metrics.baseline, a = (A.codepoint === 0 || A.codepoint == null || A.codepoint < 0 || A.codepoint > 1114111 || (A.codepoint >= 55296 && A.codepoint <= 57343)) ? " " : String.fromCodePoint(A.codepoint);
@@ -1730,1 +1730,1 @@
- if (s && s.codepoint !== 0) {
+ if (s && s.codepoint !== 0 && s.codepoint <= 1114111 && !(s.codepoint >= 55296 && s.codepoint <= 57343)) {
@@ -1995,1 +1995,1 @@
- if (!w || w.codepoint === 0)
+ if (!w || w.codepoint === 0 || w.codepoint > 1114111 || (w.codepoint >= 55296 && w.codepoint <= 57343))
@@ -2147,4 +2147,5 @@
scrollback: A.scrollback ?? 1e3,
fontSize: A.fontSize ?? 15,
fontFamily: A.fontFamily ?? "monospace",
+ lineHeight: A.lineHeight ?? 1,
allowTransparency: A.allowTransparency ?? !1,
@@ -2267,3 +2267,4 @@
fontSize: this.options.fontSize,
fontFamily: this.options.fontFamily,
+ lineHeight: this.options.lineHeight,
cursorStyle: this.options.cursorStyle,