[Question]
  [
[Related](https://codegolf.stackexchange.com/questions/19450/enlarge-ascii-art)
Given a piece of ascii art and a factor to enlarge it by, which will always be an odd number >1, replace each character with the corresponding ascii-art, resized to fit on a grid the size of the input number:
| Character | What to do |
| --- | --- |
| `\` | 
```
\   \   \
```
A line of `\` to the length of the enlarging factor, padded to form a line. |
| `/` | 
```
  / / /  
```
A line of `/` to the length of the enlarging factor, padded to form a line. |
| `|` | 
```
 |  |  | 
```
A line of `|` to the length of the enlarging factor, centred horizontally. |
| `-` | 
```
   ---   
```
A line of `-` to the length of the enlarging factor, centered vertically. |
| `_` | 
```
      ___
```
A line of `_` to the length of the enlarging factor, at the bottom of the square it's in. |
And of course, a space should be resized to a n-by-n grid of spaces. The input will only contain these six characters, plus newlines.
You may take input as a list of lines, a matrix of characters, whatever.
This is a bit confusing, so here's an example:
```
-\
 /, 3 =>
   \  
--- \ 
     \
     /
    / 
   /  
```
Because each character is enlarged to size 3.
Any trailing whitespace is allowed.
# Scoring
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), shortest wins!
# Testcases
```
\, 3 =>
\
 \
  \
---, 3 =>
         
---------
         
|
|
|, 3 =>
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
|\_/|
|   |
 \_/ , 3 =>
 | \       / | 
 |  \     /  | 
 |   \___/   | 
 |           | 
 |           | 
 |           | 
   \       /   
    \     /    
     \___/     
_____
\   /
/   \
\___/, 3 => 
               
               
_______________
\             /
 \           / 
  \         /  
  /         \  
 /           \ 
/             \
\             /
 \           / 
  \_________/  
  /\  
 /  \ 
/____\
  ||  
  ||  
_/__\_, 3 => 
        /\        
       /  \       
      /    \      
     /      \     
    /        \    
   /          \   
  /            \  
 /              \ 
/  ____________  \
       |  |       
       |  |       
       |  |       
       |  |       
       |  |       
       |  |       
     /      \     
    /        \    
___/  ______  \___
\/
\/, 5 =>
\        /
 \      / 
  \    /  
   \  /   
    \/    
\        /
 \      / 
  \    /  
   \  /   
    \/    
/-/
\-\, 7 => 
      /             /
     /             / 
    /             /  
   /   -------   /   
  /             /    
 /             /     
/             /      
\             \      
 \             \     
  \             \    
   \   -------   \   
    \             \  
     \             \ 
      \             \
 _   _ 
/ \_/ \
| | | |
|_| |_|, 11 => 
                                                                             
                                                                             
                                                                             
                                                                             
                                                                             
                                                                             
                                                                             
                                                                             
                                                                             
                                                                             
           ___________                                 ___________           
          /           \                               /           \          
         /             \                             /             \         
        /               \                           /               \        
       /                 \                         /                 \       
      /                   \                       /                   \      
     /                     \                     /                     \     
    /                       \                   /                       \    
   /                         \                 /                         \   
  /                           \               /                           \  
 /                             \             /                             \ 
/                               \___________/                               \
     |                     |                     |                     |     
     |                     |                     |                     |     
     |                     |                     |                     |     
     |                     |                     |                     |     
     |                     |                     |                     |     
     |                     |                     |                     |     
     |                     |                     |                     |     
     |                     |                     |                     |     
     |                     |                     |                     |     
     |                     |                     |                     |     
     |                     |                     |                     |     
     |                     |                     |                     |     
     |                     |                     |                     |     
     |                     |                     |                     |     
     |                     |                     |                     |     
     |                     |                     |                     |     
     |                     |                     |                     |     
     |                     |                     |                     |     
     |                     |                     |                     |     
     |                     |                     |                     |     
     |                     |                     |                     |     
     |     ___________     |                     |     ___________     |     
                       __    __   __             __  ___
  /\  /\    |  |\  |  |     /    |  |     /\    |     | 
 /  \/  \   |  | \ |  |--  |     |--\    /__\   |--   | 
/        \  |  |  \|  |__   \__  |   \  /    \  |     | , 5 =>
                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                        
                                                                                                                   __________                    __________               __________                                                                 __________          _______________
              /\                  /\                          |              |  \                |              |                               /                      |              |                               /\                          |                             |       
             /  \                /  \                         |              |   \               |              |                              /                       |              |                              /  \                         |                             |       
            /    \              /    \                        |              |    \              |              |                             /                        |              |                             /    \                        |                             |       
           /      \            /      \                       |              |     \             |              |                            /                         |              |                            /      \                       |                             |       
          /        \          /        \                      |              |      \            |              |                           /                          |              |                           /        \                      |                             |       
         /          \        /          \                     |              |       \           |              |                        |                             |            \                            /          \                     |                             |       
        /            \      /            \                    |              |        \          |              |                        |                             |             \                          /            \                    |                             |       
       /              \    /              \                   |              |         \         |              |  ----------            |                             |  ----------  \                        /              \                   |  ----------                 |       
      /                \  /                \                  |              |          \        |              |                        |                             |               \                      /                \                  |                             |       
     /                  \/                  \                 |              |           \       |              |                        |                             |                \                    /    __________    \                 |                             |       
    /                                        \                |              |            \      |              |                           \                          |                 \                  /                    \                |                             |       
   /                                          \               |              |             \     |              |                            \                         |                  \                /                      \               |                             |       
  /                                            \              |              |              \    |              |                             \                        |                   \              /                        \              |                             |       
 /                                              \             |              |               \   |              |                              \                       |                    \            /                          \             |                             |       
/                                                \            |              |                \  |              |  __________                   \__________            |                     \          /                            \            |                             |       
```
[Reference implementation](https://lyxal.pythonanywhere.com?flags=&code=%E2%86%B5%C6%9B%60%5C%2F_-%7C%20%60%E2%9F%A8%E2%81%B0%CA%81%5C%5C%EA%98%8D%E2%81%B0%E2%86%B2%7C%E2%81%B0%CA%81%5C%2F%EA%98%8D%E2%81%B0%E2%86%B2v%E1%B9%98%7C%E2%81%B0%C3%B0*%E2%81%B0%E2%80%B9%3A%E2%80%9F*%E2%80%9E%2F%E2%81%B0%5C_*J%7C%E2%81%B0%C3%B0*%E2%81%B0%E2%80%B9%C2%BD%3A%E2%80%9F*%E2%80%9E%2F%C2%A4%E2%81%B0-J%C3%B8m%7C%E2%81%B0%E2%80%B9%C2%BD%5C%7C%EA%98%8D%C3%B8m%E2%81%B0*%7C%E2%81%B0%C2%B2%C3%B0*%E2%9F%A9v%E2%88%91%C4%BF%E2%81%B0%C2%B2%E1%BA%87v%C2%B2%C3%9ETv%E2%88%91%E2%81%8B%2C&inputs=%27%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20__%20%20%20%20__%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5Cn%5C%20%20%20%20%20%20%20%20%2F%20%20%7C%20%20%7C%20%20%2F%7C%20%20%7C%20%20%20%20%20%2F%20%20%20%20%7C%20%20%20%2F%20%20%5C%20__%20%2F%20%20%7C%20%20%20%20%20%7C%20%5Cn%20%5C%20%20%2F%5C%20%20%2F%20%20%20%7C%20%20%7C%20%2F%20%7C%20%20%7C--%20%20%7C%20%20%20%20%20%7C--%2F%20%20%20%20%5C%20%20%2F%20%20%20%7C--%20%20%20%7C%20%5Cn%20%20%5C%2F%20%20%5C%2F%20%20%20%20%7C%20%20%7C%2F%20%20%7C%20%20%7C__%20%20%20%5C__%20%20%7C__%7C%20%20%20%20%20%5C%2F%20%20%20%20%7C__%20%20_%7C_%27%0A5&header=&footer=)
  
[Answer]
# [APL(Dyalog Unicode)](https://dyalog.com), ~~118 114 90 88 83~~ 80 bytes [SBCS](https://github.com/abrudz/SBCS)
```
{⊃,/⍪⌿⍵{' '⍺[⍵]}¨1+(⍺ ⍺∘⍴¨o(⌽o←∘.=⍨⍳⍺)i(⌽⍺/⍺↑1)(⍉⍺ ⍺⍴i←(⌈⍺÷2)=⍳⍺)0)['\/|_- '⍳⍵]}
```
[Try it on APLgolf!](https://razetime.github.io/APLgolf/?h=AwA&c=q37U1ayj/6h31aOe/Y96t1arK6g/6t0VDWTG1h5aYaitAeQpAPGjjhmPerccWpGv8ahnb/6jtglAAT3bR70rHvVuBkprZoLEgQx9kNq2iYaaQI2dML29WzKBOoAqOoC8w9uNNG2hugw0o9Vj9GvidUG2bgZbCgA&f=bVAxbsMwDNz9Cm6aCMJxYn@GALfmEWE6djPQd3ROljxHLyl5tF0EqAycdLojefJw7V/ft0atrz/tE4hzX18ffX3eh4muNNLY10fTtrEpGTMXn0p1951fwNXEnYic4kSlnUuzXBqaSIBqMCnDTHMaQoEcIslmRjOgxZVaGy5Ic0K2qF@CniqcsChH3nHE0AU9LcotemYcdcLnFmBevSLdNv3fZXZgHd8US8jUSB69ybU2WGS/LLZ7CvOdeOtmUWzMh4UZBVJ/DUpIss8/BmluCKeJXpr8eVDXfgE&i=AwA&r=tryapl&l=apl-dyalog&m=dfn&n=f)
A dfn submission which takes a char matrix on the right and a scale factor on the left.
Indexes each character into its specific pattern, and then uses the original matrix to index back into it.
More byte saves can be done by figuring out a formula for getting the boolean arrays.
[Answer]
# [V (vim)](https://github.com/DJMcMayhem/V), 311 bytes
```
"aDj:%s:\([ \-_]\):=repeat("\\1",a)
:g
:%s:\\:\\=repeat(" ",a-1)
:g
:%s:/:=repeat(" ",a-1)
/:g
:%s:|:=repeat(" ",a/2)
|=repeat(" ",a/2)
:g
{qqYp:s:\\ : \\:ge
:s: /:/ :ge
qdkG{Go
ggqtjjkk@a@qdd@tq@tggqb@ajk:s:_:Y:ge
j@bq@bi=a/2+1
D@"kkqc:s:-:X:ge
@ak@cq@c:%s:[-_]: :g
:%s:X:-:g
:%s:Y:_:g
gg:s:-: :g
```
[Try it online!](https://tio.run/##bZA9awMxDEB3jbdmEQeBHK0x126CgIZA/kKOuBjfB6b20Lg9suT@uysnoYUQY7Cs9ywJn3Ou3S7Q@ofM5ohG2Q/TULX9nk6Tmze1MW39WrkGyMNVMrL/MRao2j@s6QnTd7g8Qv3WwPIkJ/4lpe5EpR8SSlM/gdxQk8YSpzHuL/svWHmf5hBiZMdpHHlOPEuqZxei@Ja6YgfuE/ef1baUf2lhteM6xjSIoehQDHaRh8RDGfMof0B4n/kgxi3qpJoH76@PBOf8DojaIAJqRIOgrSwjyWUpydthtVLGZnX@BQ "V (vim) – Try It Online")
Thanks to PyGamer for the idea of solving this in Vim. It's not extremely well golfed, can change some substitutions and bad hacks around the many macros that are in use.
Outputs the required art with two trailing newlines.
[Answer]
# [C (clang)](http://clang.llvm.org/), ~~170 147 143~~  137 bytes
```
a,j,i;f(*m,x,z){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];}
```
[Try it online!](https://tio.run/##TU5bCsIwEPzPKUJASNos4qOIXYMX8AYqEorVBFOlrVBS7dVroyLOxzAzOwObQXbRxanvtbTSYM4jJxvpRZtfS46RQxerRgRjlUcLgLd7XXHGxDs0CiYYx2bVRD5csrMuOdewnK41zBeBkoGWycOmFjoLPjUjDzbtbOxhkGI9m6ZaCK3c1oz9Hp@9KWpaH6t6u1eEbhgA7Hbsq8ZvcRjAkJDQdNoUlIuW0JyHlZzLhUBCP29Gf2Ah/pWSwT37Fw "C (clang) – Try It Online")
* thanks to @ceilingcat suggestion !
* added for loop instead of recursion
* thanks to @Johan du Toit for suggesting using int\*array as input!
`f(*m,x,z){` function taking:
* m : ~~char~~ int 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`.
[Answer]
# [J](http://jsoftware.com/), 89 bytes
```
[(a{~[:,/[:,./"3[*({0:0}(,:|.)@=@i.,/@,~(1,>.@-:)(,:~|:)@|."{1:0},~$0:))~(a=.' _|-\/')i.]
```
[Try it online!](https://tio.run/##VY4xawMxDIV3/QpxFGwVW3KaoeByxVDo1KnrKZgQEpouGZLtXP/1q44s7fD04L3vgb6Xgd0Jx4wOAybMpsj49vnxvkx@P/cpBzGxDNvp0c8ppx8fcmMqYzlzkBK634RXLjGTFb1lKo2HeWNg6A8pE3W/H9lhbVHF0Zl3C8HteL2NjM7h8fB1KdPd/Al3L1yfCGCLK7J@lEARUUDsKmitVYD@9dYaAmiEIogRVS1sbQ3vVi3VarvnPzuJAhoVaPkF "J – Try It Online")
[Answer]
# [K (oK)](https://github.com/JohnEarnest/ok), ~~261~~ ~~184~~ ~~165~~ ~~163~~ 159 bytes
```
{k:y;v:" ";a:{[g]{(x#v),g,(k-x+1)#v}'!k};h:{[s]{k#s@x=_k%2}'!k};,/{,/'+{$[92=x;a x;47=x;|:'a x;45=x;h v,x;95=x;{k#" _"@x=k-1}'!k;v=x;(k;k)#v;+h v,x]}'x}'";"\x}
```
[Try it online!](https://tio.run/##JY5NCoMwEIX3niKNLYmYkGpbihkE76HBulFhFl0IISXm7Glqdx9v3s@gfGOMs/aoP2A1JRQm7fvFeO5yW4hFcJSurIrcBnbCAGu6bsZjvnWuHfFS/2WhvFCs9Oe@qVsHE3FwfybYNTv4kXglVjhofpjylIw0VaCsfg1gk8oRMA1BeThNYC4wCnRwIfrQva6azz1VQzYomY17evVmivgF "K (oK) – Try It Online")
I lost my sanity several times while creating this. Thanks to ngn and Razetime for helping me with this.
Thanks to Razetime for helping me to golf off a lot.
The basic approach is to split by newlines, replace each character with a list of subrows, take the transpose of that, join each line, and flatten.
[Answer]
# [K (ngn/k)](https://codeberg.org/ngn/k), 51 bytes
```
{,/,'/'`c$32|x*(a@<a;+a;|=y;=y;a=:|a:y#'!y)8!19!-x}
```
[Try it online!](https://ngn.bitbucket.io/k#eJxLs6rW0ddR11dPSFYxNqqp0NJIdLBJtNZOtK6xrbQGokRbq5pEq0pldcVKTQtFQ0tF3YpaLq5iKw0lhZqYGH0layX9mJgaBSCtG6+rpMnFVV1rmGBgpaSkX12hoxSTp1SrnhZdbG0ci0PCNJYLACp9I3Q=)
[Answer]
# [Python 2](https://docs.python.org/2/), 135 bytes
Takes input as a list of lines.
```
s,f=input()
R=range(f)
for r in s:
 for w in R:print''.join([i-w,i-~w-f,w-f/2,f+~w,i-f/2][ord(c)%23%5]and' 'or c for c in r for i in R)
```
[Try it online!](https://tio.run/##pY5BCsIwEEX3OcXfyLSYGqy4KXgJcdeWIjXRiKQlbamCePWaCd7AgYH3/8Bj@td461y@zDf70Dj5SRfQT92CiJZBmoN1/TQmqTge/NlddWJSYToPD@swFAIcZg7HovfWjUSbe2ddUtpsljb7zJmRYVUuzfrDTcC67PwladNVvlvt67O7ECho2ihrWeYj2uhNlygW/FFJgKoqgCQICgjMqJowVRVbvN@/OxNDo/jYUC234l/D7m/D/gs "Python 2 – Try It Online")
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 55 bytes
```
Ｎθ≔⊘⊕θη↑ＷＳ«Ｊ⁰⁺θⅉＦι¿⁼κ_×θκ«Ｍ⊖η↗≡κ-Ｐ-η/Ｐ/η|Ｐ|η\Ｐ\ηＰκＭ⊖η↘→
```
[Try it online!](https://tio.run/##dZDLasMwEEXX9lcMXslgoW66SVeFFJpCSmjTRUEgXEeJheW3nCzqfLurR23j0BpLGuncO5pRksZNUsZyGDZF1anXLv/iDarDB/@xbcWpQM@xPPMD2hRJw3NeKB3XYRhBqiXb8szR6qPS4SUVkgOySd5VI4oTCkP49r2XLq/2JbqLYCe7FtURfGqiHd6xbACJEMQR0FPdxbJFWQQBC7RxpzMotBc5t5bMGrhsuUnp2XvXfK4o1QXpOt7EKVVG6bUXoZIUUGZr8JJYOwMcrGDbSSUqm32FXRcjJjeYLHF/g/slpvSG05Ef@DHW5wuaWXL9t5d1eSnmbtw7T/urfx2Gex/@/hibZhcuCGNMGwl1A6DXP3WL1ZDx0O1GjZ19Q6kZo4baBeNJg7F1EMYo/BJjJGMJ01XULLY@aubeMTJrnHHAZ/kD "Charcoal – Try It Online") Link is to verbose version of code. Explanation:
```
Ｎθ≔⊘⊕θη
```
Input the scale factor `n` and calculate half, rounded up.
```
↑ＷＳ«Ｊ⁰⁺θⅉ
```
Output each transformed row on its own set of `n` lines.
```
Ｆι
```
Loop through the characters on each line.
```
¿⁼κ_×θκ«
```
If the next character is a `_` then print `n` of them, otherwise...
```
Ｍ⊖η↗
```
Move to the centre of the square.
```
≡κ-Ｐ-η/Ｐ/η|Ｐ|η\Ｐ\ηＰκ
```
Print a line in the desired direction. (TIO's version of Charcoal doesn't support computed multidirectionals, so I'm not sure whether that would beat a switch statement.)
```
Ｍ⊖η↘→
```
Move to the bottom left of the next square.
[Answer]
# JavaScript (ES2020), ~~157~~ ~~151~~ ~~148~~ 147 bytes
Takes a 2D character array `A` and a size `n` as `f(A)(n)`.
```
A=>n=>A.flatMap(L=>(N=[...Array(n)]).map((_,y)=>L.flatMap(c=>N.map((_,x)=>[a=y-n+1,a+y,a+=x,a+x-y]['_-/|'.indexOf(c)]??x-y?' ':c)).join``)).join`
`
```
[Try it online!](https://tio.run/##bZHLaoQwFIb3PkV2SZhJQummFKK4d2YWXRqJwY6DgxNFZargu9tcGkuhIeeSfP8hh5y7eqqxGpp@Is@3reZbymPN45TWrZpOqkcZj9GZ55TSdBjUgjQuMH0YgORxwTzOdmXF43MgsyG54gvRh5ejOizG@GzcTJYih5KwFdJGf17nS40qXCSJAQkE8L3CmN67RpdlSKJyqzo9du2Vtt0N1ehjGhp9o4P6KsH/S8rd@/QPkVJGADDhDYDVbOGD07Bw6U9B43xkqbAWNMIFQnYNIa6CSSnAD7GFLLSwPyVscP0J61fP2K/GFZZ07NtmQlBo6D/eTMSOIyswRq8Yb98 "JavaScript (V8) – Try It Online")
---
# JavaScript (ES2020), ~~157~~ ~~151~~ ~~148~~ 147 bytes
```
A=>n=>A.flatMap(L=>(N=[...Array(n)]).map((_,y)=>L.flatMap(c=>N.map((_,x)=>({_:a=y-n+1,'-':a+y,'/':a+=x,'|':a+x-y})[c]??x-y?' ':c)).join``)).join`
`
```
[Try it online!](https://tio.run/##bVHBboQgEL37FdyArECaXhoTMN7tXnpcDBJTN25cNGq2mtpvtwLFpkkJM@/BexMmzE0/9FgNTT@Rx8tW8y3jwnCR0brV06vuUc4FOvMLpTQbBr0ggwtM77uAVLxgLvLDWXFxDsq8K@hTJZovxJyeYkhgok9LDJlFPsdwtWQmyxe@VEWa7iyFACYVxvTWNaYsA4nKrerM2LXvtO2uqEZv09CYKx30Rwn@X0od2dM/ilIqAoBJHwCs@5YenIeFS38KHpcjq0obwSMdEHJ4CHEVTCkJfhRbyEILx1PSgutP2rx6jf16XGFJx75tJgSlgf7j94nYceQFxugZ4@0b "JavaScript (V8) – Try It Online")
---
# JavaScript (ES2019), ~~161~~ ~~158~~ ~~152~~ ~~149~~ 148 bytes
```
A=>n=>A.flatMap(L=>(N=[...Array(n)]).map((_,y)=>L.flatMap(c=>N.map((_,x)=>[a=y-n+1,x-y,a+y,a+=x,a+x-y]['_\\-/|'.indexOf(c)]?' ':c)).join``)).join`
`
```
[Try it online!](https://tio.run/##bVFNa4QwEL37K3JLwpqE0kspJMW73R56NBKDXRcXG0Vlq@B/t/loLIWGzJuP94YMmZu@66ke22Em96e94XvGheEio02n51c9oJwLdOYFpTQbR70ig0tMPy2BVLpiLvJDWXNxjsximULzlZjTQ7qQNdUnZ3yxYNOygEpKwjZIW/NxWd4aVOPyBQL4XGNMb31rqioGSbXXvZn67kK7/ooa9D6PrbnSUX9V4P@j1IEh/MMopRIAmAwGwGavDM5rWCyGLGo8Jo6VzqJGekfIoSHEdzClJPhhXCOLIxxPSef8fNLhFjj2q/GNFZ2Grp0RlAaGn7crcfvIS4zRI8b7Nw "JavaScript (V8) – Try It Online")
[Answer]
# [Haskell](https://www.haskell.org/), 97 bytes
```
n%a|z<-[1-n,3-n..n]=[do c<-r;x<-z;max" "[c|(l,0)<-zip"|_/\\-"[x,y-n+1,y+x,y-x,y],c==l]|r<-a,y<-z]
```
[Try it online!](https://tio.run/##FYrRCoJAEAB/ZVkSCnc1iZ68@4N66vHukMOCpHMTM1C5f7/sYWAY5uk/r0cIKUnm46rYVCx0YikKcdrc39AqHutZ8Vr3fkZA08Z9oONhK92AsSmtZTQzLSx5RUv@tw1HrdbBxVGxp2WbXep9J6Ch98MVhu90m8aLwA7OmUG2tkRCaCK69AM "Haskell – Try It Online")
I/O: `size%listOfLines` is a new list of lines.
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), ~~162~~ ~~152~~ ~~149~~ ~~143~~ 138 bytes
```
param($k,$o)$o|%{$l=$_;1..$k|%{$y=$_
-join($l|% t*y|%{$c=$_;1..$k|%{" $c"[@{1=$y-$_+$k+1
8=$_+$y
7=2*$_
6=2*$y
4=$y+1}[$c%13]-eq$k+1]}})}}
```
[Try it online!](https://tio.run/##pVVNj9owEL37V4zAlAQILt12t1KFRA@9VHvsbb1KUQjdlJBQklUbkfx2OmMnjkMWtVVNFOaNn@fTdg7pz/CYPYVxfOZbWMLpfFgf13uH72Y8dXlajk48XnL/w2I@5ztCBSLmfU@jxOFxOYJ8UpA6sEkD4MHgYXVaLHnhcX/Kd9MFe78kqWB3yzcTNHFLfwV7i5TponrgwWhx8@iFP4j7WFVuVZ0rxlYOYzNnNWaSjVczuJmBkgEfIJWrZ0vpM/CExYGSOCXUb5C@j5R6CJI8z9OCUhhTqLbMENSDWd7Uz/Z19bEjFLgKfaEe5YtQm8DUKqixgBqq6AUY2Iw/Qmgtq0ylJWujbYQ@DSbVPPmSrCGYYmhOO5gEe6Bd2YUWJiQMwq4IiyqZ6FiSf2HZRGHlgFPaMhqkKdomZalfPmpwm1h1b6xJZsoPjSzqKI3cIGGlYGeksOgm0cV1mnYBW3/UufL/5Wuh6v1jnFLvTNGkoIfq8k4fr37VTStFvafq7ST@jWxcCjyr0tNn@s5qhrjs@jXlCzqhzzSN3narSZeKSywvugU9xQsapWodS@ugdWhXlD0tFYm52NMRnBSFp8fo2wyv1DTcbqMgCpMcUfjrEAZ5uMFLm/st7z5Kwox0BMDLDnGUw@BrMtCUY5g9xznOv8Lr3rZorWY29csx2u/Dzcdk8xmvfOXOqafo2vfnRPiUbBy3ckF9Fnreeibwlm/jV8xhExgM4TkJUuRjSPlTlEGsEspT2ESYzLoAzcz0uvFwPLl9zarzbw "PowerShell – Try It Online")
Less golfed:
```
param($k,$origLines)
$origLines|%{                           $line = $_
    1..$k|%{                            $y = $_
        -join($line|% toCharArray|%{    $char = $_
            1..$k|%{                    $x = $_
                $rasterFont = @{
                    1 = $y-$x+$k+1                      # \
                    8 = $x+$y                           # /
                    7 = 2*$x                            # |
                    6 = 2*$y                            # -
                    4 = $y+1                            # _
                }
                " $char"[$rasterFont[$char%13]-eq$k+1]  # space or $char
            }
        })
    }
}
```
]