module Clacky::BlockFont

def self.render(text)

Returns a multi-line string (6 lines joined by newlines).
Render a string as block-font art. Unknown characters fall back to space.
def self.render(text)
  chars = text.downcase.chars
  glyphs = chars.map { |c| GLYPHS[c] || GLYPHS[" "] }
  HEIGHT.times.map do |row|
    glyphs.map { |g| g[row] }.join(GLYPH_GAP)
  end.join("\n")
end

def self.width(text)

Return the pixel width of the rendered text (longest line length).
def self.width(text)
  render(text).lines.map { |l| l.chomp.length }.max.to_i
end