🐛 Calculate text-length in bytes correctly
Some checks are pending
Commit Message Check / Check Commit Message (push) Waiting to run

This commit is contained in:
Elena Torro
2025-04-24 17:31:05 +02:00
committed by Belén Albeza
parent 9e4c9d3101
commit 44d68ad723

View File

@@ -72,7 +72,8 @@
font-id (f/serialize-font-id (:font-id leaf))
font-family (hash (:font-family leaf))
font-variant-id (sr/serialize-uuid (:font-variant-id leaf))
text-length (count (:text leaf))]
text-buffer (utf8->buffer (:text leaf))
text-length (.-byteLength text-buffer)]
(.setUint8 dview offset font-style)
(.setFloat32 dview (+ offset 4) font-size)