Mega Code Archive

 
Categories / Delphi / VCL
 

Saving a tfont object

Question: How do I save a TFont object to a File/Registry/ini/Database? Answer: You should instead save the font's attributes (name, size, and so forth), not the font object itself. When you read the font information back into your program, you should test to make sure the font still exists before trying to use it.