Code 39 barcode encoder
JavaScript (ES6), 225 212 bytes
Saved 4 bytes thanks to @l4m2
s=&gt;`#${s}#`.replace(/./g,c=&gt;'0202020202'.replace(/./g,(j,k)=&gt;[C='█',C+C+C,' ','   '][(i=&quot;%+/$U1AKV2BLW3CMX4DNY5EOZ6FP-7GQ.8HR 9IS#0JT&quot;.indexOf(c),[170,257,260,5,272,17,20,320,65,68,80][i&gt;&gt;2]^2&lt;&lt;i%4*2)&gt;&gt;k&amp;1|j]))

Try it online!
How?
The table can be rearranged such that the 9-bit binary mask of the character is quickly deduced from its row and column using the following formula:
n = m XOR (2 &lt;&lt; k)

with:
  m  | k: 0   2   4   6
-----+------------------      Examples:
 170 |    %   +   /   $
 257 |    U   1   A   K         'G' = 320 XOR (2 &lt;&lt; 4) = 320 XOR 32 = 352
 260 |    V   2   B   L
   5 |    W   3   C   M         '+' = 170 XOR (2 &lt;&lt; 2) = 170 XOR 8  = 162
 272 |    X   4   D   N
  17 |    Y   5   E   O
  20 |    Z   6   F   P
 320 |    -   7   G   Q
  65 |    .   8   H   R
  68 |   spc  9   I   S
  80 |    #   0   J   T