Solved

how to set font and font size in file text

Posted on 2004-09-20
4
159 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now