mirror of
https://github.com/penpot/penpot.git
synced 2025-05-28 22:06:13 +02:00
🐛 Calculate text-length in bytes correctly
This commit is contained in:
parent
9e4c9d3101
commit
44d68ad723
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue