(load-font-cljs font-key callback)

Source

(defmacro load-font-cljs [font-key callback] (let [{:keys [width height] :as bitmap} (font-key bitmaps)] `(let [image# (js/Image. ~width ~height)] (doto image# (-> .-src (set! ~(text/bitmap->data-uri bitmap))) (-> .-onload (set! #(~callback {:data image# :width ~width :height ~height} ~(font-key baked-fonts))))))))