Message 1 of 4
Width of Text String in Twips/Pixels/Points?

Not applicable
12-21-2000
02:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
I'm trying to determine the width of a text sting of a given font so as to
create a box just big enough to fit the text string in. Much as the "mtext"
command would do. The value I'm looking for would be something like the
width property of a text box set to autosize. I'm looking at an API function
named "GetCharWidth32". That function is of course expecting the string as
an argument, but there is no mention of what the font or point size is. Can
anyone point me in the right direction on what I must do to predict the
physical (measured) width of any text string before I place it into Autocad?
Thanks in advance,
Gary
I'm trying to determine the width of a text sting of a given font so as to
create a box just big enough to fit the text string in. Much as the "mtext"
command would do. The value I'm looking for would be something like the
width property of a text box set to autosize. I'm looking at an API function
named "GetCharWidth32". That function is of course expecting the string as
an argument, but there is no mention of what the font or point size is. Can
anyone point me in the right direction on what I must do to predict the
physical (measured) width of any text string before I place it into Autocad?
Thanks in advance,
Gary