mIRC Homepage
Posted By: maroon Sample Text in Font Selection Dialog - 08/11/17 09:29 PM
The Font Dialog shows the AaBbYyZz in the active .fontcs instead of the prospective one.

For most fonts, $window(name).fontcs shows 0, but a few of them have different values, such as Wingding is 2 while Aharoni and David are 177. When you use the dialog to pick a .fontcs=0 font like Tahoma to Wingding, the AaBbYyZz still shows in a substituted fontcs 0 font while you have not clicked 'OK'. But once you enable Wingding as the font for that window, the AaBbYyZz sample shows the wingding characters regardless of the fontcs 0 displayed in the dropdown combo box.

The font David is slightly different, in that once you make it the active font for the window, the YyZz portion of the sample shows them as Hebrew letters regardless of which font name is shown in the selection window, but those characters in channel are still displaying for me as YyZz. I'm guessing that my default Windows language prevents the channel from displaying the Hebrew letters while allowing the dialog to show them.

On a related issue, it might be a good idea to extend the AaBbYyZz sample to include a couple numbers and even the line-wrapped "Quick Brown Fox" phrase with all words in Proper case. The numbers would show that fonts like Aharoni give numbers the shorter height of letters like 'ace' instead of the taller height of 'ABC' like most fonts do. The line-wrapping of the longer 'Brown Fox' phrase would give an indication of the default line height spacing, where fonts like "DejaVu Math TeX Gyre" has an enormous white space between lines of text. Another possibility could be a checkbox in the font selection dialog that makes it show the line-wrapped contents of $cb(1) instead of AaBbYyZz.
Posted By: Khaled Re: Sample Text in Font Selection Dialog - 13/11/17 12:42 PM
Thanks for your bug report. The $window().fontcs property is a legacy property left over from when mIRC was not a Unicode application. It no longer returns valid or useful results. The font dialog uses the default charset for the font. As for changing the sample text, this is not possible as it is chosen and displayed by the Windows font dialog itself.
Posted By: maroon Re: Sample Text in Font Selection Dialog - 13/11/17 08:03 PM
Just to clarify. I mentioned .fontcs as a flag to indicate when this bug happened. When active font is Aharoni, the sample characters for the David font shows the Hebrew symbols because there's a correlation of them both sharing the same 147 .fontcs, but active font Consolas doesn't show David having Hebrew symbols because their .fontcs values are different.

As for the sample text being chosen by Windows itself, I can see that notepad also shows AaBbXxYy, though it does not have the bug I mentioned. In notepad when the active font is Consolas, unlike mIRC, David does show the Hebrew symbols and Wingdings does show the waterdrop envelope etc symbols.
Posted By: Khaled Re: Sample Text in Font Selection Dialog - 14/11/17 10:08 AM
Thanks, I was able to reproduce this issue. It turns out that the Windows font dialog is sensitive to the way controls are hidden/disabled. This caused it not to update the character set for non-unicode fonts when displaying the sample text. A change has been made that resolves this but it will need testing to make sure it does not affect the rest of the dialog. This should be in the next version.
© mIRC Discussion Forums