                                                 char-width
                                                 y))))
                                (.dispose offscreen-graphics-2d)
-                               glyph-image)))
+                               glyph-image))
           key-queue        (LinkedBlockingQueue.)
           on-key-fn        (or on-key-fn
                                (fn default-on-key-fn [k]

               "\u2500"
               "\u2500")))

(def character-layout
  (let [character-matrix (partition (int (inc (.sqrt js/Math (count characters)))) characters)]
    (mapcat

                                  line))
                   character-matrix))))

;; A map from \character to [x1 y1 x2 y2] in the character atlas where
;;    [x1 y1]
;;    +--------+
;;    |        |
;;    |        |
;;    +--------+
;;              [x2 y2]
(def character->pos
  (reduce (fn [m [c x y]]
            (assoc m c [x y (+ x 12) (+ y 16)]))
