Skip to content

Commit

Permalink
Fix bbox right scan start offset
Browse files Browse the repository at this point in the history
This causes particularly wide glyphs like italic emoji to get clipped
even if they're within the allowed padding.

Fixes xtermjs#4229
  • Loading branch information
Tyriar committed Oct 28, 2022
1 parent e7b347a commit 8b545a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/browser/renderer/shared/TextureAtlas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ export class TextureAtlas implements ITextureAtlas {
}
boundingBox.right = width;
found = false;
for (let x = width - 1; x >= 0; x--) {
for (let x = padding + width - 1; x >= 0; x--) {
for (let y = 0; y < height; y++) {
const alphaOffset = y * this._tmpCanvas.width * 4 + x * 4 + 3;
if (imageData.data[alphaOffset] !== 0) {
Expand Down

0 comments on commit 8b545a3

Please sign in to comment.