How to obtain the font name and size of an OdDbText object?

  1. FAQ
  2. »
  3. Text and Font Questions

Use the OdDbTextStyleTableRecord::font() method for getting the characteristics such as typeface, bold, italic, charset, pitch_and_family of the Windows font associated with the text style.

If the font() method returns an empty typeface, use the OdDbTextStyleTableRecord::fileName() method. This method returns the name of the uni-font file associated with this text style. Text size is a property of the OdDbText entity and the height() method returns its value. For more details, see the Font Handling topic in the Developer's Guide.