strange font issue with older application

Hello,
I'm having an interesting "phenomenon" regarding a simple application, and I would like to know (mostly out of curiosity) how to use tools to (try to) find a clue on what's happening.
It's about a basic telnet client which uses .fon files. The telnet program consists of one executable, 4 extra dlls, some bitmap files and font files. It seems pretty "portable".
On XP (yes I know), a good logon screen looks like this:
Now: On that XP, if I change the .fon file with another (random) font, this happens:
This seems to indicate the program uses all characters from that font file. The "double" appearance of lines is normal.
Now comes the real issue: on Windows 10 (and even Windows 7), this happens with the good font file in place:
Notice some characters are OK, but others are not (mostly the border characters).
If I replace that font file with a random one, this is the result:
Strange thing is that it has the same wrong border characters.
My main question is: how would one even begin with trying to find the reason?
I've already used procmon from sysinternals, but nothing indicates the program searches for some missing font file.
Is it possible to use debuggers to see what the program is doing when "painting" one character? To see what's causing the difference in behavior? To find the source of the strange characters?
It seems the issue appears with Windows 7 and beyond. I've already tried every thing I could imagine (disabled clear text, DPI settings, compatibility modes, 32bit OS, ...)
Best regards & many thanks in advance,
PVDW
Hello @PVDW , is this your own application or third-party application? Do you have source code?
You can install the font in Windows, but the result is the same. The program itself opens the font file (with probably the help of the win32 API).
Using WinDBG to try to identify the difference with the program running on XP and on Windows 7 would probably point me to the real cause, but this is beyond my abilities now :-(
Like: even if I knew how to set a breakpoint when that border is being drawn, I wouldn't know how to investigate further anyway.
This is a "positively frustrating" problem for me in the way that until now, procmon almost always was good enough to identify obvious things when investigating program issues (missing registry settings, COM+ registrations, files etc). So this is an ideal problem for me to (try to) learn more.
Thanks for the reply!
No: this is indeed a third-party application. I don't have source code.
In that case, I think your only course of action is to ask the 3'rd party.
I'm guessing that it all comes down to however the font mapper behaves when there are different fonts available in different versions of Windows. The application probably calls the Windows CreateFont, or CreateFontIndirect functions, if the parameters passed by the application code are not specific enough it's likely that the font mapper is using a different font.
This is of course just guesswork without knowing the source code.
I'll change tag to "not-supported" since it is third-party software related.
Hello,
Guess what: this is what happens when I "copy-paste" the executable and dependent files in Wine (yes: Linux):
The program works without any issue!
It's clear to me (after more debugging) that it is indeed related to the "font API". So one of my conclusions (for the people asking me to help with this program that only seemed to work correctly on XP) is: Wine is perhaps an option to get rid of these old XPs.
Many thanks for your help!
As you can see in another thread here, I've found some other options for this old program. But thanks for your help! I appreciate it.
Sign in to comment
Activity