C (clang), 170 147 143 143137 bytes
a,j,i;f(m*m,x,z)char*m;{for(;*m;m+=x)for(j=z;j--;puts(""))for(i=-1;++i<x*z;putchar((a-92?a-47?a-45?a-95|j:j-~j-z:i%z-j:~j+z-i%z)?32:a))a=m[i/z];} - thanks to @ceilingcat suggestion !
- added for loop instead of recursion
- thanks to @Johan du Toit for suggesting using int*array as input!
f(m*m,x,z)char*m;{ function taking:
- m : char
charint array without newlines - x : width
- z : scale
=> m+=x;*m&&f(m,x,z);for(;*m;m+=x)
for every row of input, loop actually better than recursion.
for(j=z;j--;puts(""))
we iterate z times every row of input and put \n each time.
for(i=-1;++i<x*z;putchar(..) )
we put x*z characters.
a=m[i/z]
we use a to save on m[i/z] repetitions which is current input being enlarged.
putchar(( ... )?32:a
... => many nested ternary operators to select proper character based on a and i / j relations which evaluates to 1 or 0 , we then puts a space or a.