mIRC calls the Windows font-linking API and uses the result that Windows provides. Windows itself performs the scanning and font-matching, which tries to find the required characters in the current font before searching other fonts. mIRC enhances this by using its own strategies to speed up the process and internal caching for the most recently used fonts to avoid repeated scans. It's quite a complicated process. In some cases, and for some fonts and characters, repeated searches are necessary, due to the way that Windows works. It also may work differently under different versions of Windows and may match fonts differently depending on how your system is configured. I spent many months working on it when I first implemented it. As far as I can see, it is as fast as it can be without converting mIRC to a unicode application.