If you surround the font-name in quotes, mIRC fails to see it as a fontname that may contain multiple spaces, and reverts to the font set in the options dialog:
Code:
;This returns the width correctly
echo -a Without Quotes: $width(I am testing,Dejavu Sans Mono,50)

;This does not
echo -a With Quotes: $width(I am testing,"Dejavu Sans Mono",50)
Echos the following:
Quote:
Without Quotes: 360
With Quotes: 259



Code to test on your own:
Code:
alias widthtest {
  var %f = $window($active).font
  var %s = $window($active).fontsize 
  echo -a Without quotes(Correct): $width(#,%f,%s)
  echo -a With Quotes(Incorrect): $width(#,$qt(%f),%s)
}

Last edited by FroggieDaFrog; 08/12/11 11:40 PM.

I am SReject
My Stuff