This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
Reji Retnaraj wrote:I am generating a .txt file using RandomAccessFile. Now I need to set the font of some of its lines to be bold
Text files have no formatting. Are you sure it isn't a Word (.doc) or RTF file you want to create?
and also want to display fonts other than English.
English isn't a font, it's a language. Arial, Times New Roman, Courier New, those are fonts. English, German, French, those are languages.
However, I think I know what you mean. You want to use non-ASCII characters like é, ö. ß, € and £. That is quite possible with text files if you discard using RandomAccessFile.