Add function get_ratio.

Now you can type -r h/w or -r h:w where h and w are the height and width of a character.