Skip to content

Commit

Permalink
fix: skip zero-width character render (#787)
Browse files Browse the repository at this point in the history
  • Loading branch information
luluxia authored Nov 14, 2023
1 parent 925eb13 commit 75cc90c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/kaboom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2219,6 +2219,7 @@ export default (gopt: KaboomOpt = {}): KaboomCtx => {
c2d.fillStyle = "#ffffff"
const m = c2d.measureText(ch)
let w = Math.ceil(m.width)
if (!w) continue
let h = font.size
if (atlas.outline) {
c2d.lineJoin = "round"
Expand Down

0 comments on commit 75cc90c

Please sign in to comment.