Setting the Font on a String

I have a program that takes strings from different locations, each with different font, but I want the fonts to be uniformed and set to a certain size once in the string. Is there a way to set the font of a string?

[221 byte] By [blackmagea] at [2007-11-27 10:38:34]
# 1

Actually a string has no font. But when that string is outputed to a text file, is there a way to set the font?

blackmagea at 2007-7-28 18:55:20 > top of Java-index,Java Essentials,Java Programming...
# 2

Text files have no 'font'. The viewer has a 'font'.

sabre150a at 2007-7-28 18:55:20 > top of Java-index,Java Essentials,Java Programming...
# 3

> Actually a string has no font. But when that string

> is outputed to a text file, is there a way to set the

> font?

No. Text files have no font either. They're a sequence of characters.

You'd have to use some other format, or indicate the font separately from the text file.

jverda at 2007-7-28 18:55:20 > top of Java-index,Java Essentials,Java Programming...
# 4

Well if you are familiar with IText for creating PDFs, can I change the font when the string is outputed to a PDF file?

blackmagea at 2007-7-28 18:55:20 > top of Java-index,Java Essentials,Java Programming...
# 5

> Well if you are familiar with IText for creating

> PDFs, can I change the font when the string is

> outputed to a PDF file?

Creeping requirements! You need to spend more time with the iText documentation.

sabre150a at 2007-7-28 18:55:20 > top of Java-index,Java Essentials,Java Programming...
# 6

iText does let you set fonts, and that's part of the PDF spec. But a PDF is very different from a text file. Don't go thinking that "this PDF file is in this font." It doesn't really work that way.

jverda at 2007-7-28 18:55:20 > top of Java-index,Java Essentials,Java Programming...