Re: win32 text spacing
- Posted by CChris <christian.cuvier at ag?icultu?e.gouv.fr> Nov 27, 2007
- 605 views
George Walters wrote: > > I've had a problem trying to determine text spacing on a screen for a long > time. My software looks fine on some screens and not on others. I've been > trying to figure this out and this link seems to have the parms I need. > > <a > href="http://msdn2.microsoft.com/en-us/library/ms534015.aspx">http://msdn2.microsoft.com/en-us/library/ms534015.aspx</a> > > Does anyone know if we have a win32 function which returns these values > depicted in the drawing? We have a getTextExtent but it does not have the > spacing between lines. I can't seem to find such a function in win32lib. getFontMetric(id,field) has been here to help for a long time. It will return any of the tmxxx or ntmxxx fields. If you need the outline (otmxxx) parameters, then you'll need to wrap an extra Windows API and refer to the documentation for GetOutlineTextMetrics() on MSDN, and define the OUTLINETEXTMETRICS structure to access the data (or peek at the right places). I could consider extending getFontMetric() to return these at well, but there will be hardly any development of any kind for the next 8-10 days, so I'm not promising it for 70.3. The extension will be in 70.4, for which I'm not giving any timetable - should be during 2008 -, anyway. CChris.