From: James Coglan Date: 2008-07-18T22:06:02+09:00 Subject: Re: show text in italics. ------=_Part_68403_9299399.1216386666309 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 2008/7/18 Vamsi Krishna : > Hi , > > well, is there any logic to display a text in italics in ruby. > > like a simple program that shows text in italics? > > ex: def text > puts" hi to all" > end > puts text > > so i need to display "hi to all " in italics. See this wikipedia article: http://en.wikipedia.org/wiki/ANSI_color In theory you could do puts "\e[3mhi to all\e[0m" But apparently italics is not widely supported. Bold and underline seem to work in my Ubuntu terminal (\e[1m and \e[4m respectively). James http://github.com/jcoglan ------=_Part_68403_9299399.1216386666309--