13
2
Don't you find that reading simple text isn't appealing enough? Try our
##### ### ### ##### ##### ##### ##### # # ##### #
# # # # # # # # # # # # #
##### ### # # # # #### # # #
# # # # # # # # # # # #
# # ### ### ##### ##### # ##### # # # #
Much more fancy isn't it? But it's pretty long to write by hand, it would be wonderful if someone did a program that do it for me !
Your task, if you volunteer to help me, will be to write a program or a function that takes a string containing [a-zA-Z\s\n]
only, and output (or return) the ascii writing of it!
You must use the following alphabet to format your output:
##### #### ### #### ##### ##### ### # # ##### ##### # # # # #
# # # # # # # # # # # # # # # # # # ## ##
##### #### # # # #### #### # ## ##### # # ### # # # #
# # # # # # # # # # # # # # # # # # # # # #
# # #### ### #### ##### # ### # # ##### ### # # ##### # #
# # ### #### ### #### ### ##### # # # # # # # # # # #####
## # # # # # # # # # # # # # # # # # # # # # #
# # # # # #### # # #### ### # # # # # # # # # # #
# ## # # # # ## ## # # # # # # ## ## # # # #
# # ### # #### # # ### # ### # # # # # # #####
The space:
|
| it's a 5x5 square of spaces
| but had to pad it with |s to make it appear in this post
|
|
As this is a fixed-width font, the space character is also surrounded by spaces, resulting in a 7-width space between the two letters.
a b
1234567 -- these numbers are just for the example, you don't have to output them
##### ####
# # # #
##### ####
# # # #
# # ####
a b
1234567890123
##### ####
# # # #
##### ####
# # # #
# # ####
When you encounter a newline, as in the input
ascii
text
Just make sure to separate the two blocks of text by at least one empty line
##### ### ### ##### #####
# # # # # # #
##### ### # # #
# # # # # # #
# # ### ### ##### #####
##### ##### # # #####
# # # # #
# #### # #
# # # # #
# ##### # # #
Also, you are allowed to replace the #
s with any other character as long as it is in the printable ASCII range, and is not spaces. You could for instance use A
s for the letter A, B
for the letter B and so on.
As this is code-golf (and moreover kolmogorov-complexity) the winning submission will be the one that solve this challenge in the least byte possible, have fun!
Is the 5-char space also to be surrounded by single-spaces, or is this a variable width font? – Adám – 2016-05-30T07:10:04.560
@Adám you're right, it is supposed to be surrounded by spaces, I'll update regarding this point – Katenkyo – 2016-05-30T07:11:20.223
Can we somehow retrieve the pixel alphabet as input or do we have to construct those characters inside our rated code snippet? – Byte Commander – 2016-05-30T12:52:41.707
@ByteCommander One (big) part of this challenge is about string compressing, you have to find the best way to compress this alphabet in your code, while still being able to retrieve it and use it :). So yes, it is included in your golfed-code and can't be inputed to your program – Katenkyo – 2016-05-30T12:55:19.557
@Katenkyo Aha, okay. Thanks for the clarification. – Byte Commander – 2016-05-30T12:56:27.520
@muddyfish I don't know what to say, I feel that it is really close, but can't decide if it really is a duplicate or no. I'll leave this question as it is (rather than closing it myself), and let the potential voters the freedom of bashing it :). – Katenkyo – 2016-05-30T12:56:33.080
Well, that one doesn't specify a specific alphabet... And this one uses different spacing, offset... – wizzwizz4 – 2016-05-30T13:22:08.513
Are trailing whitespaces in the end of each line allowed or can we leave the padding there? – Byte Commander – 2016-05-30T14:48:56.480
@ByteCommander You are allowed to leave a padding of one column of spaces at the end of a line, but it's not mandatory. – Katenkyo – 2016-05-30T14:54:26.343
Also, what about leading or trailing newlines in the output? – Byte Commander – 2016-05-30T15:45:33.647
@ByteCommander No trailing or leading newlines are allowed, as it would make the output not a direct translation of the input. Let the program you actually have to make be a function
f()
, the input be x and a function converting the ascii alphabet to a "standard" stringg()
, theng(f(x))==x
– Katenkyo – 2016-05-31T06:46:33.367