Solved

how to set font and font size in file text

Posted on 2004-09-20
4
191 Views
Last Modified: 2013-12-03
i am using pro C file manipulation operations to generate a text file. (fprintf etc) How do I set the font size of the output text. Currently the file opens with the defualt font settings.
0
Comment
Question by:chmrz
4 Comments
 

Expert Comment

by:l3st4rd
ID: 12110802
a plain text file does not contain any information on the font to use. that's only possible for files that are formatted in any way like word documents, PDF's, HTML pages, aso...
so it's impossible.
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 20 total points
ID: 12111445
You can generate an HTML file instead a plain text because last one doesn't contain any font information, as l3st4rd pointed out. An example:

<HTML>
<BODY>
This is a plain text<p>
<b>this is a bold text</b><p>
<font color="#FF0000">This is a red text</font><p>
</BODY>

This is the easiest method to produce a formated text, another option is RTF format, it is very similar to HTML, and more suited for printable, non-Web pages.
As you can see, it will be easy to generate with simple fprintf() functions.

Good luck,
Jaime.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question