> .GetTextSize("string","FontName",FontSize[,boldness][,italic])
> E.g., .GetTextSize("Test","Tahoma",12,1,1) or
> .GetTextSize("Test","Courier New",10)
> 
> 
> However, it didn't work well as expected. 
> args sString,sFaceName,nHeight,bold,italic
> local hWnd,hDC,hFont,hForg,tLogFont,aSize
> 
> hWnd=0
> hDC=dll.call("GetDC|ui",hWnd)
> 
> tLogFont=dll.create_struct("i i i i i uc uc uc uc uc uc uc uc 
s",;;+
> nHeight,0,0,0,400+300*bold,1*italic,0,0,1,0,0,0,0,sFaceName)
> hFont=dll.call("CreateFontIndirect|t* ui",tLogFont)


Not sure if this is the issue, but the size argument for the logical 
font structure is not the same as the font size in points that you 
commonly see in the font selection dialogs.

You have to change it 
lfHeight = -MulDiv(PointSize, GetDeviceCaps(hDC, LOGPIXELSY), 72);






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~-> 

Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to