Windows Installer ugly font rendering

2019-03-02 04:06发布

问题:

Problem occurs only on Windows Installer. How to fix that?

回答1:

New discovery, please see wikipedia: https://en.wikipedia.org/wiki/AppLocale

"AppLoc.tmp in the AppPatch folder (%windir%\apppatch) causes a Mojibake issue of Windows Installer...Mojibake is the garbled text that is the result of text being decoded using an unintended character encoding... The result is a systematic replacement of symbols with completely unrelated ones, often from a different writing system."

Though it appears the above dialog shows the correct text, just with very garbled display (not garbled characters of different code pages), I want to add this issue here in case someone finds it whilst looking for answers when facing garbled MSI dialogs.



回答2:

It can't be a graphics card issue since the captions are fine. You are not running this MSI in a virtual machine are you? Or worse yet, in Wine (Linux)?

At a technical level the TextStyle Table in an MSI (if present) controls fonts used in the MSI dialogs. I am assuming that a particular font on your system is either corrupted or not working properly in whatever emulated environment you may be running in. This explains why it only happens with some MSI files and not all of them (each MSI may use a different font).

And just for the record: I doubt a log will tell you much, but try with msiexec.exe /I "Setup.msi" /L*V! "C:\Temp\msilog.log". Obviously substitute paths as appropriate. This will create a verbose log file and flush to log (slow, but will log everything - no log buffer lost). I suppose you could search for anything related to fonts, textstyle or typeface.

The real solution is obviously to work out what is wrong with your font, but before that we need to know if you are in an emulated environment or not. Apparently fonts dropped into the Fonts folder in Windows Explorer are automatically registered on the system, but you can also use VBScript : http://windowsitpro.com/scripting/trick-installing-fonts-vbscript-or-powershell-script. So I suppose the conclusion is that you can grab the problem font from any machine around you, preferably one that is the same OS, and then drag-and-drop the font to your Fonts folder and see if this resolves the problem. Obviously identify the exact problem font using the TextStyle table listed above. And backup the font that was already there (if any).

In order to view the TextStyle table you need a tool to open MSI files. The free one is Orca.exe from the Windows SDK. If the Windows SDK is already installed on your PC, search for "Orca-x86_en-us.msi" and install it. Then find Orca in the start menu.

If you don't have the Windows SDK installed and don't want to install it all (it is huge), then there are a bunch of alternative tools: What installation product to use? InstallShield, WiX, Wise, Advanced Installer, etc. Most of these are large, commercial tools. Your quickest bet would probably be Super Orca (I have not used it much, but it should be OK for such a simple task).

Here is a list of tools that is perhaps clearer (better overview): http://www.installsite.org/pages/en/msi/authoring.htm

UPDATE:

  • Did you identify the corrupted font, install it and then reboot and test again?
  • Rebooting should rebuild the font cache as far as I know, but there is a description here on how to delete the cache yourself. It is for Windows 8 though, should be the same in Win10: http://www.trishtech.com/2013/11/rebuild-fonts-cache-windows-8/