Jump to content

Change system font


luweitest

Recommended Posts

My XP version is simplified chinese (thus some text below may display blank box in your screen, but you could ignore them). Many English software‘s dialogue box will not render correctly -- some characters not shown, lines truncated or wrapped to non-display, bottom elements not displayed, etc.  I find if I could change the font of the dialogue box to another (maybe Latin) font, then the problem would be solved. The default font for simplified chinese is 宋体(Simsun.ttc). I changed the fonts list in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts as: fonts.PNG.628dfd28bd2da2fe95ac00d528603bb7.PNG

replaced every fonts pointing to simsun.ttc to msyh.ttf (微软雅黑).

But, instead of using msyh.ttf, the dialogue box then uses the font from HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\Software\Fonts\Fonts.fon value. The value is svgasys.fon by default, but the font is displayed large thus some dialogue text still not displayed. I changed it to sserife.fon, and the display is good.

Then another problem arises: Many system chinese texts display blank box, which could be expected since sserife.fon has no chinese glyph. According to https://docs.microsoft.com/en-us/globalization/input/font-technology , I add a font link at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink\, value="MS Sans Serif" (the name of sserife.fon), data="msyh.ttf,微软雅黑". Then chinese texts get displayed, but very small:

display.PNG.89671e96913e46b21e908a5c537f1ce8.PNG

As in above picture, aside from those chinese characters in windows title are normal size (whose font is set by "appearance" and display good even no font link is added), English character is way bigger than chinese character , and some chinese character is still displayed as blank box (has been solved by changing HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FontAssoc\Associated DefaultFonts)). The MS document says it is the problem of scaling, and quote: "Note that GDI+ is not able to parse these scaling factors. Thus, references to fonts with scaling factors are repeated without these scaling factors. In GDI+, the first reference, with the scaling factors, will appear to be to an unrecognized font and will be ignored. In GDI, the second reference will be treated as redundant and ignored." But even if I added a manual scaling line fist as suggested format: "msyh.ttf,微软雅黑,128,85", there is no change.

Now my problem is:

1, Does XP not support this scaling factor? GDI+ and GDI are both supported by XP according to MS.

2, Why instead of my replaced font name in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts , it looks for HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\Software\Fonts\Fonts.fon ? The latter value could not use *.ttc|*.ttf files but only *.fon, which forced me to use font link and then encounter the scale problem.

p.s. All changes take effect after reboot.

Edited by luweitest
update
Link to comment
Share on other sites


AFAIK *.fon are raster (bitmap) fonts - they can't be scaled easily and provide only a few sizes within the file.

When you use a mix of raster and vector (*.ttf and *.ttc) fonts, Windows can scale freely only the vector ones - it (probably) just picks the closest available size for the raster fonts.

Check what sizes are available for the *.fon fonts you use, then adjust your settings to them.

Or try other fonts, maybe the ones you selected have too big size difference - same letter can vary in size across different fonts of the same size.

 

HTH

Link to comment
Share on other sites

Also a .ttc file is a sort of "compressed archive" of (more than one) .ttf fonts, ttc actually stands for True Type Collection, so you need a corresponding .ttc.

Maybe you can try with MSYH.TTC? :dubbio:

 https://github.com/owent-utils/font

https://github.com/owent-utils/font/tree/master/微软雅黑

No idea if it would work better (or work at all).

jacla

 

 

Link to comment
Share on other sites

On 3/6/2020 at 3:41 AM, RainyShadow said:

AFAIK *.fon are raster (bitmap) fonts - they can't be scaled easily and provide only a few sizes within the file.

When you use a mix of raster and vector (*.ttf and *.ttc) fonts, Windows can scale freely only the vector ones - it (probably) just picks the closest available size for the raster fonts.

Check what sizes are available for the *.fon fonts you use, then adjust your settings to them.

Or try other fonts, maybe the ones you selected have too big size difference - same letter can vary in size across different fonts of the same size.

Whatever the size of *.fon file (they are all Latin font), chinese fonts always have different size.

On 3/6/2020 at 10:04 AM, roytam1 said:

because the font metrics are incompatible. you should use fonts that is compatible to SimSun to replace SimSun.

Yes, Simsun have no (or less) scale problem as MSYH. I changed font link to simsun.ttc, then the mixed character display got better, though still not as before.

On 3/6/2020 at 5:24 PM, jaclaz said:

Also a .ttc file is a sort of "compressed archive" of (more than one) .ttf fonts, ttc actually stands for True Type Collection, so you need a corresponding .ttc.

Maybe you can try with MSYH.TTC? :dubbio:

 https://github.com/owent-utils/font

https://github.com/owent-utils/font/tree/master/微软雅黑

No idea if it would work better (or work at all).

Thanks for the link. I replaced my old MSYH.ttf, yet it did not work.

I found this page may give the right hint about scaling:

https://shajisoft.com/shajisoft_wp/fontlink-for-cjk-on-english-windows-10/

I'll try it and report back.

Link to comment
Share on other sites

49 minutes ago, luweitest said:

I found this page may give the right hint about scaling:

https://shajisoft.com/shajisoft_wp/fontlink-for-cjk-on-english-windows-10/

I'll try it and report back.

since vista, there is extra fields in fontlink to provide H/W proportional scale factor, which is not exist in NT 5.x.

if you want Hei font for replacing SimSun, you may find "XHei" in the web.

Link to comment
Share on other sites

9 minutes ago, roytam1 said:

since vista, there is extra fields in fontlink to provide H/W proportional scale factor, which is not exist in NT 5.x.

if you want Hei font for replacing SimSun, you may find "XHei" in the web.

I am just back reporting that scale factor definitely does not work on XP... Thanks.

Replacing simsun is not my intent, but a prerequisite to resolve the incomplete display of some English software. Before doing that scaling factor experiment, I have found a better way to accomplish this: Mactype. It is not mainly designed for this purpose, but it can replace font without rebooting! Scaling issue could be resolved too, but the result is not very good -- It's font tuning, the main feature, seems not as clear as the original font with cleartype on. Anyway, since I can hot switching fonts, it could ignored now.

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...