Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make level the printed symbols in the ouput

Consider this Ruby code:

puts "*****"
puts "    *"
puts "     "
puts "*****"
puts "       *"

My Output is like this:

*****  
  *

*****
    *

Why the heck a whitespace doesn't fill the same space as * character in Scite? I've tried it in Eclypse with Java and it works just fine.

like image 419
user815693 Avatar asked Dec 06 '25 08:12

user815693


1 Answers

Proportional fonts have characters of varying widths, ruining space-based alignment.

Switch to a monospace font (e.g., Courier) so all characters are the same size and it'll work.

like image 131
Dave Newton Avatar answered Dec 08 '25 22:12

Dave Newton