I should determine font widths having variable widths. In my application I have to create a table with different cellwidths depending on the text in the cell. How can I determint the width of the fonts?
Thnx in advnace
If you have the display equivalent of the printer font on your PC, you can find out widths from that.
If the display font is TrueType, there will be a horizontal widths table; not sure about bitmap, Intellifont or Type1 fonts, but there should be something similar with these.
Most IDEs (e.g. C++ Builder, VC++, etc.) make life easier by providing methods to perform this interrogation on your behalf, for a specified text string using a specified font at a specified pointsize.
Thnx, Yes, I have no other choice I have to determine the widths with some ide (Visual C++).
I have other problem. I use fixed spacing fonts ( ESCs0P) and can't set the height for them, nothing happens, always the same height. Is there a solution for it.
Thnx
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.