How can I get the list of all available fonts in AutoCAD?
I received the following code , but the reference FontTable is not there in AutoCAD !!!
using (Transaction tr = db.TransactionManager.StartTransaction())
{
// Get the font table object
FontTable fontTable = (FontTable)tr.GetObject(db.FontTableId, OpenMode.ForRead);
// Iterate through the font table records and print the font names
foreach (ObjectId fontId in fontTable)
{
FontTableRecord fontRecord = (FontTableRecord)tr.GetObject(fontId, OpenMode.ForRead);
string fontName = fontRecord.Name;
ed.WriteMessage("\n" + fontName);
}
tr.Commit();
}
THE name space of FontTable could not e found !