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?
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?
Actually a string has no font. But when that string is outputed to a text file, is there a way to set the font?
> 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.
Well if you are familiar with IText for creating PDFs, can I change the font when the string is outputed to a PDF file?
> 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.
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.