mirror of
https://github.com/penpot/penpot.git
synced 2025-06-23 23:46:59 +02:00
Merge pull request #6602 from penpot/elenatorro-11214-use-text-decoration-from-leaf
🐛 Fix reading text-decoration and text-transform from leaf, and fallback to paragraph values
This commit is contained in:
commit
90744c182e
2 changed files with 27 additions and 9 deletions
|
@ -104,12 +104,17 @@
|
|||
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))
|
||||
leaf-text-decoration (or (sr/serialize-text-decoration (:text-decoration leaf)) (sr/serialize-text-decoration (:text-decoration paragraph)))
|
||||
leaf-text-transform (or (sr/serialize-text-transform (:text-transform leaf)) (sr/serialize-text-transform (:text-transform paragraph)))
|
||||
text-buffer (utf8->buffer (:text leaf))
|
||||
text-length (.-byteLength text-buffer)
|
||||
fills (:fills leaf)
|
||||
total-fills (count fills)]
|
||||
|
||||
(.setUint8 dview offset font-style le?)
|
||||
(.setUint8 dview (+ offset 1) leaf-text-decoration le?)
|
||||
(.setUint8 dview (+ offset 2) leaf-text-transform le?)
|
||||
|
||||
(.setFloat32 dview (+ offset 4) font-size le?)
|
||||
(.setUint32 dview (+ offset 8) font-weight le?)
|
||||
(.setUint32 dview (+ offset 12) (aget font-id 0) le?)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue