Solved

how to set font and font size in file text

Posted on 2004-09-20
4
198 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: 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

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
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.
Suggested Courses

623 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