add render-char function

This commit is contained in:
Gered 2014-03-29 16:01:16 -04:00
parent 4f39c6b112
commit 3217e92c00

View file

@ -86,3 +86,17 @@
(parse-basic-chars header basic-chars)
(parse-ext-chars header ext-chars)
(parse-other-chars header other-chars))})))
(defn- render-char [c flf lines]
(let [char-lines (get-in flf [:chars c])
hardblank (str (get-in flf [:header :hardblank]))]
(if char-lines
(map
(fn [^String char-line ^String output-line]
(.concat output-line
(-> char-line
(.replaceAll "@" "")
(.replaceAll hardblank " "))))
char-lines
lines)
char-lines)))