Skip to content

Commit 1fcbd30

Browse files
SDF: Fix infinite layout loop (#224)
Another hack to prevent an infinite loop situation that was introduced in v0.8.0. I've written up an issue to address more wholistically the issues with the SDF layout engine - #223 Fixes #220
2 parents f38273b + 2b971d6 commit 1fcbd30

File tree

1 file changed

+3
-0
lines changed
  • src/core/text-rendering/renderers/SdfTextRenderer/internal

1 file changed

+3
-0
lines changed

src/core/text-rendering/renderers/SdfTextRenderer/internal/layoutText.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,9 @@ export function layoutText(
235235
);
236236
curX = lastWord.xStart;
237237
bufferOffset = lastWord.bufferOffset;
238+
// HACK: For the rest of the line when inserting the overflow suffix,
239+
// set contain = 'none' to prevent an infinite loop.
240+
contain = 'none';
238241
}
239242
} else {
240243
// This glyph fits, so we can add it to the buffer

0 commit comments

Comments
 (0)