Fix Telegram Desktop (Windows) Chinese font issue under non-Chinese locales (LangIDs).
Only 14 KB in final release binary size!
Inspired by FontMod.
- Install Visual Studio 2019, select
Desktop development with C++
- Open
TGLangID.sln
- Select menu
Build
->Build Solution
- Locate
version.dll
under project root'sRelease
folder - Copy
version.dll
to the same folder asTelegram.exe
- Run
Telegram.exe
This is a bare-bone DLL that can be loaded as version.dll
which then hooks GetUserDefaultLangID
, deceiving the modified Qt Telegram Windows uses that the user's language ID is 0x0804
. Therefore, Qt would load the font set in the order I want.
Without the patch/hook, if the user language ID isn't 0x0804
or 0x1004
, it could load Japanese fonts with higher priority, leading to funny Chinese characters displays.