You can't. A text file just contains text. It's the job of an application that opens that file, e.g. Notepad, to decide what font to use to display the text. If you want to specify formatting information like font in the file itself then you have to use a format that supports that, e.g. RTF or HTML. Of course, the file is then not just a text file. If you open it in Notepad then you'll see all the metadata as well as the text. If you want the formatting honoured then the application must support that, e.g. Wordpad for RTF or a web browser for HTML.