1

On a typical English machine, changing the value of MS Shell Dlg and MS Shell Dlg 2 under FontSubstitutes will modify the font used on menus system wide. However, it doesn't seem to work on my non-English machine. The font applied is still Microsoft JhengHei UI as I can tell.

Another approach according to this post is to edit entries in HKCU\Control Panel\Desktop\WindowMetrics, however all of them are in binary and I don't really know how to edit them, although this seems like the right place to actually change the font.

According to Microsoft TechNet, the default value to the entries under WindowMetrics is MS Shell Dlg [2]. But on my machine it is Microsoft JhengHei UI. This explains why changing the font substitute for MS Shell Dlg in the first place didn't work.

F4 FF FF FF 00 00 00 00  random bytes but probably control characters
00 00 00 00 00 00 00 00
90 01 00 00 00 00 00 01
00 00 00 00 4D 00 69 00  main string starts here
63 00 72 00 6F 00 73 00
.........

(ôÿÿÿMicrosoft JhengHei UI)

The question is, how do you edit this binary value? What are the padding 00 bytes for? And also what does F4 FF FF FF mean?

(I sense that SO might be a better place to post this. If you believe this is more suitable to be asked on SO, please migrate this question there.)


According to this site, it contains "information about font used by Windows, size and other options (normal, bold, italic)". However, it does not explain how are those information arranged in the string.


I have also read that it is just the binary of a LOGFONT structure. How do I edit this? Are there any tools for this?

1
  • Can the downvoter please explain the reason the downvote was casted? This clearly shows "great research effort". Jan 1, 2015 at 23:43

1 Answer 1

2

Alright, I believe I get the structure of this binary string. It is in the format of LOGFONT, which is divided into 14 parts, including the first 20 bytes as 4 long integers in little endians, the next 8 bytes as bytes, and a string.

In my example, F4 FF FF FF means the height is FFFFFFF4 in hex (long int), which is -11 in decimal. Converting it into pixels would be 8.

The next 00 00 00 00 means the width. Setting it to 0 would make it automatically calculated.

The next 8 bytes correspond to lfEscapement and lfOrientation which don't really matter.

The next 4 bytes 90 01 00 00 is 190 (400 in decimal) is the weight. 400 correspond to FW_NORMAL.

The next 3 bytes are lfItalic, lfUnderline, and lfStrikeOut. Pretty self-explanatory.

The next byte would be lfCharSet. It states the character set to be used according to this enum. 0x01 would be DEFAULT_CHARSET.

The next 4 bytes are for something else: lfOutPrecision, lfClipPrecision, lfQuality, lfPitchAndFamily.

Then comes the main part. For the next 64 bytes it is a string of the font name you want to use in 32 TCHARs. For ASCII characters, simply separate each character by a 00 since TCHAR is just 16-bit Unicode.

In conclusion, to change the font of the each part of the system UI, modify the binary entry according to the structure above.


PS: Changing the substitute of MS Shell Dlg (2) would not work for everyone since not all languages of Windows use that as the UI font. Another site mentioned in this comment that substitute the font name Segoe UI directly to your desired font also will not work, and as a side effect you will also not able to use the font Segoe UI at all.

Modifying WindowMetrics might be the only correct way to change the system font.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .