🐛 Fix custom fonts not rendered correctly

This commit is contained in:
Alejandro Alonso 2023-02-24 10:50:35 +01:00 committed by Alonso Torres
parent 1f3f6ce1e9
commit ccf91a129c
2 changed files with 54 additions and 45 deletions

View file

@ -3,6 +3,7 @@
### :bug: Bugs fixed ### :bug: Bugs fixed
- Fix copy and paste very nested inside itself [Taiga #4848](https://tree.taiga.io/project/penpot/issue/4848) - Fix copy and paste very nested inside itself [Taiga #4848](https://tree.taiga.io/project/penpot/issue/4848)
- Fix custom fonts not rendered correctly [Taiga #4874](https://tree.taiga.io/project/penpot/issue/4874)
## 1.17.2 ## 1.17.2

View file

@ -177,12 +177,20 @@
(watch [_ _ stream] (watch [_ _ stream]
(let [team-id (:team-id project) (let [team-id (:team-id project)
stoper (rx/filter (ptk/type? ::bundle-fetched) stream)] stoper (rx/filter (ptk/type? ::bundle-fetched) stream)]
(->> (rx/merge (->> (rx/concat
;; Initialize notifications & load team fonts ;; Initialize notifications
(rx/of (dwn/initialize team-id id) (rx/of (dwn/initialize team-id id)
(dwsl/initialize) (dwsl/initialize))
(df/load-team-fonts team-id))
;; Load team fonts. We must ensure custom fonts are fully loadad before starting the workspace load
(rx/merge
(->> stream
(rx/filter (ptk/type? :app.main.data.fonts/team-fonts-loaded))
(rx/take 1)
(rx/ignore))
(rx/of (df/load-team-fonts team-id)))
(rx/merge
;; Load all pages, independently if they are pointers or already ;; Load all pages, independently if they are pointers or already
;; resolved values. ;; resolved values.
(->> (rx/from (seq (:pages-index data))) (->> (rx/from (seq (:pages-index data)))
@ -226,7 +234,7 @@
(resolve-pointers id) (resolve-pointers id)
(rx/map #(update file :data merge %))))) (rx/map #(update file :data merge %)))))
(rx/reduce conj []) (rx/reduce conj [])
(rx/map libraries-fetched))))))) (rx/map libraries-fetched))))))))
(rx/take-until stoper))))))) (rx/take-until stoper)))))))