Dynamically changing the font in the console
Is there a suitable plugin or class for changing font size, font type, and styling within a common output console?
You can change the terminal font by going to settings, but that's not what I'm looking for here. I want to dynamically change the font from within.
Is there anything in Ruby or some terminal commands for this (I'm using Mac OS X).
source to share
The font / font size used in ANSI terminals is implementation specific and ANSI color / style codes are the only way to provide decoration. The easiest way I've found to add color and style for console output is by using colorize
gem.
gem install colorize
Examples:
puts "This is blue".colorize( :blue )
puts "This is light blue".colorize( :light_blue )
puts "This is also blue".colorize( :color => :blue )
puts "This is red on blue and underline".colorize( :red ).on_blue.underline
puts "This is blue text on red".blue.on_red.blink
Here is the colorized README .
Or, if you want to love yourself and do some UI elements, you can use rbcurse
gem:
gem install rbcurse
Here are some screenshots of rbcurse .
source to share