Skip to content
This repository was archived by the owner on Nov 12, 2024. It is now read-only.

Commit 75cc90c

Browse files
authored
fix: skip zero-width character render (#787)
1 parent 925eb13 commit 75cc90c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/kaboom.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2219,6 +2219,7 @@ export default (gopt: KaboomOpt = {}): KaboomCtx => {
22192219
c2d.fillStyle = "#ffffff"
22202220
const m = c2d.measureText(ch)
22212221
let w = Math.ceil(m.width)
2222+
if (!w) continue
22222223
let h = font.size
22232224
if (atlas.outline) {
22242225
c2d.lineJoin = "round"

0 commit comments

Comments
 (0)