There have of course been challenges to render ASCII art fonts here and there. This challenge doesn't add anything to those. In contrary, it subtracts from them for a good reason. If you allow all characters,
- it's a lot of boring work
- the task is mainly about clever compression of the font and short extraction
This one shall be different, because it is restricted to only five letters to be rendered: BDIOP
#### # ### #### ####
# # # # # # # # #
#### # # # #### # #
# # # # # # # #
#### # ### # ####
Those are obviously chosen for a reason, they share some symmetry, some common elements, but not all of them:
- They are vertically symmetrical, except for the
P
- The start with a vertical bar, except for the
O
- The second line is the same, except for the
I
I think these subtile differences open the field for a lot of possible golfing improvements.
The input is a sequence of up to 13 uppercase characters out of those five (put as extended regex [BDIOP]{,13}
) in a form that fits your language.
The output is the ASCII art output of the string with the given 5*x variable width font, using a whitespace for the background and a character of your choice for the letters, with two whitespaces between the letters. Trailing whitespaces on the lines are allowed, as well as one trailing newline.
The shortest code for each language wins.
5×4
, but how should theI
be rendered in that box, or is it really5×1
? \$\endgroup\$BIPOD
(found in/usr/share/dict/words
on TIO). \$\endgroup\$