MrDeathStar 0 Posted October 26, 2015 I am using the Canvas component to center some text features among custom graphics. I call Draw.SetFont() and Draw.GetTextExtent() to calculate text positions before drawing. However, GetTextExtent() seems to report the same pixel size regardless of the font size chosen. Since SetFont() does not use a DC argument, I tried a dummy TextOut() using the chosen font to see if that would set the DC before calling GetTextExtent. It did not work either, so any help is appreciated. Thanks. (ver. 2203/2224/2229) Share this post Link to post Share on other sites
AzeoTech 0 Posted October 27, 2015 We have that fixed. Email us for a link to a prerelease build (or if you've already used a prerelease, its in the same spot as before). You were on the right track trying to do a dummy TextOut(). The issue was that the system wasn't setting the font into the DC before calling GetTextExtent(). It does it now.... Share this post Link to post Share on other sites
MrDeathStar 0 Posted October 28, 2015 I figured it might have been a simple SelectObject related thing. The dummy TextOut was a stab in the dark, but if it had worked I would have probably questioned potential DC object leaks from not selecting it out. Since the forum did not have much regarding GetTextExtent, I gather it is a seldom used/tested feature. So, thanks again for a speedy fix with the 2230 update! Share this post Link to post Share on other sites