I fear this is one of those questions with no simple answer.
I have AutoCAD drawings in ASCII DXF format. I am scanning them for text elements. I need to calculate the coordinates of the vertices of the bounding box for each text element. (In case anyone is using different terminology, to me a bounding box is a hypothetical rectangle that could be drawn such that the text exactly fits inside the rectangle)
This is very complicated considering that each element may have a different font, different text style, different scale, different orientation, rotation, etc.
I get the origin point and alignment point (if any) from the TEXT entity entry in the DXF file. I can also get the rotation and height scale factors from the same place. But I am particularly stuck on how to get the width since each character is a different width and there could be any number of different fonts. If this was windows programming I would use windows API functions to get metrics about the font being used, but autocad does not seem to have any analogy to this.
Anyone know how to do that?