diff --git a/backend/src/app/rpc/queries/viewer.clj b/backend/src/app/rpc/queries/viewer.clj index 3ed2bbbc5..f346e53ef 100644 --- a/backend/src/app/rpc/queries/viewer.clj +++ b/backend/src/app/rpc/queries/viewer.clj @@ -50,9 +50,14 @@ libs (files/retrieve-file-libraries conn false file-id) users (teams/retrieve-users conn (:team-id project)) + fonts (db/query conn :team-font-variant + {:team-id (:team-id project) + :deleted-at nil}) + bundle {:file file :page page :users users + :fonts fonts :project project :libraries libs}] diff --git a/frontend/src/app/main/data/viewer.cljs b/frontend/src/app/main/data/viewer.cljs index 99e42310e..c4eb65292 100644 --- a/frontend/src/app/main/data/viewer.cljs +++ b/frontend/src/app/main/data/viewer.cljs @@ -12,9 +12,10 @@ [app.common.spec :as us] [app.common.uuid :as uuid] [app.main.constants :as c] + [app.main.data.comments :as dcm] + [app.main.data.fonts :as df] [app.main.repo :as rp] [app.main.store :as st] - [app.main.data.comments :as dcm] [app.util.avatars :as avatars] [app.util.router :as rt] [beicon.core :as rx] @@ -97,7 +98,10 @@ :file-id file-id} (string? token) (assoc :token token))] (->> (rp/query :viewer-bundle params) - (rx/map bundle-fetched)))))) + (rx/mapcat + (fn [{:keys [fonts] :as bundle}] + (rx/of (df/fonts-fetched fonts) + (bundle-fetched bundle))))))))) (defn- extract-frames [objects]