ysc3839/FontMod

最新版Telegram無法替換字型

HIRATEYURINA46 opened this issue · 74 comments

Telegram Version 2.1下無法更改字型,先前版本都是正常的。

我这里 Telegram 2.1 是没有问题的,系统是 Windows 10 Pro x64 Version 1909。
建议检查一下是不是这个问题

Telegram Version 2.1下無法更改字型,先前版本都是正常的。

同。

Menci commented

感觉不是注入的问题,似乎是 Telegram 修改了对字体的调用,我这里确认注入上了,但是替换无效。规则如下:

fonts:
  SimSun:
    replace: Source Han Sans SC Medium
  Open Sans:
    replace: Source Han Sans SC Medium
  Open Sans Semibold:
    replace: Source Han Sans SC Medium
  Arial:
    replace: Source Han Sans SC Medium

fixGSOFont: true

image

开启 debug: true 之后的 Log 如下:https://paste.ubuntu.com/p/vfHXHNnhcW/

It seems like Telegram changed some of its default fallback font.
For example, Korean fallback font changed to 맑은 고딕(malgun) from Gulim(굴림).

Windows 10 Pro x64 Version 1909 (Korean)
Telegram desktop 2.1

Menci commented

我这里替换 "微软雅黑" 到任意其它字体会导致 Telegram 选择 fallback 列表中的下一个字体(雅黑 Light),继续替换 "微软雅黑 Light" 的话它会继续 fallback 到正黑

Telegram Desktop 使用的 desktop-app/lib_ui 库最近合并了一个 pr,更改了 fallback 的规则。需要修改原有的配置文件。FontMod 本身是正常工作的。

The library desktop-app/lib_ui used by Telegram Desktop merged a pr recently, which changes fallback rules. You need to modify current config file. FontMod itself works without issue.

那我就坐等解决方案了。

Menci commented

@ysc3839 我这里 FontMod 本身也无法正常工作,见我上面贴的配置。如果加一条将「微软雅黑」替换掉的话,Telegram 会使用「微软雅黑 Light」而不是我替换为的字体。

On my system, I had to replace "microsoft yahei" (all lowercase). My current config:

style: &style

fonts:
  microsoft yahei:
    replace: Chiron Sans HK TT
    <<: *style

fixGSOFont: true
debug: false

字体替换成功了,但是字体大小调整无效。

@ysc3839 那麼,現在已經有新的解決方案了嗎?

Menci commented

@HIRATEYURINA46 解决方案是 @Raymonf 所说的那样,在我这里可以正常工作

4SM commented

字体大小怎么修改?

@Menci 我這裏仍然無法正常工作。 btw ,我先前直接修改了登錄檔中微軟雅黑的字型的機碼值,強制替換微軟雅黑爲 Noto Sans CJK JP Light ,結果 Telegram 的默認字型倒是變成微軟正黑體了。

Menci commented

@HIRATEYURINA46 你那边替换「microsoft yahei」为「Noto Sans CJK JP Light」也不行吗。我这边替换「microsoft yahei」为「Source Han Sans SC Medium」是可以的。注意「microsoft yahei」是全小写。

@Menci 依舊是不行的

@Raymonf It's work !!!!!

我以為是因爲我手動修改了登錄檔的緣故,使得配置檔案變得無效了。結果我切換回默認機碼值以後,FontMod仍然沒有正常工作。

style: &style

fonts:
  microsoft yahei:
    replace: Sarasa Fixed Slab J Light
    <<: *style

fixGSOFont: true
debug: false

這是我的FontMod配置檔案

我將winmm.dllFontMod.yaml刪除後重新添加回去,發現即使啟動Telegram也不會自動生成winmm.dll

@ysc3839 automatically_disable_fullscreen_optimizations.bat是個甚麼東西呢?要如何卸載呢?我剛剛看了你先前發的那個連結,還是不太明白

現在手動解除了禁用全屏优化,但依然FontMod.yaml無法正常工作

上面大佬的配置在更新前有效 今天tg又更新了 更新以后又失效了

@suheandzl 你知道TG在用什麼字體嗎?

我現在的TG在用 Yu Gothic UI,所以就把配置檔案改為:

style: &style

fonts:
  Yu Gothic UI:
    replace: Chiron Sans HK TT
    <<: *style

fixGSOFont: true
debug: false

Qt好似被補丁了,再次用系統默認語言來選擇字體,但是我真不明白為什麼繁體中文的系統會選日語字體... 又是另外一個bug吧

@suheandzl 你知道TG在用什麼字體嗎?

我現在的TG在用 Yu Gothic UI,所以就把配置檔案改為:

style: &style

fonts:
  Yu Gothic UI:
    replace: Chiron Sans HK TT
    <<: *style

fixGSOFont: true
debug: false

Qt好似被補丁了,用系統默認語言來選擇字體,但是我真不明白為什麼繁體中文的系統會選日語字體... 又是另外一個bug吧

我系统安装时是简中 用语言包切换到了日语 现在默认字体是雅黑 反正之前按照楼上的大佬重新配置设定文件就能成功替换 今天更新到了2.1.1 又失效了

@suheandzl

现在默认字体是雅黑

那就可能要用Microsoft YaHei(包括大字的名)。改成Microsoft YaHei有效嗎?

Microsoft YaHei

我没改当时 按照你讲的改了以后 成功替换了 感谢

配置如下

style: &style

fonts:
Microsoft YaHei:
replace: Noto Sans CJK TC Medium
<<: *style

fixGSOFont: true
debug: false

我的Telegram更新以後,字型變成默認的Yu Gothic UI,但是更換配置以後也還是無效。我的作業系統是日文系統

@HIRATEYURINA46 🤔 試試啟用除錯 (debugfalse 改成 true) 模式吧,還是在設定檔案裡。啟用後可以在FontMod.log中看看Telegram載入什麼字體。

這裡是退回字體列表:desktop-app/patches@134ce22

根據以上的列表,Yu Gothic UI應該沒錯,但是可能又是有那個小字問題。

@HIRATEYURINA46 你不妨試試 @suheandzl 那一招
fonts:
Yu Gothic UI:
replace: #你要的字體
<<: *style
總之Telegram在用甚麼字體你就replace甚麼。

我是新加坡人,系統語言是英語,今天更新到2.1.1後發現字體從雅黑變成了Yu Gothic於是就嘗試這一招。

style: &style
fonts:
  SimSun: &zh-cn-font 
    replace: Microsoft YaHei
    <<: *style
  PMingLiU: 
    replace: Microsoft YaHei
    <<: *style
  MS UI Gothic: 
    replace: Microsoft YaHei
    <<: *style
  Gulim: 
    replace: Microsoft YaHei
    <<: *style
fixGSOFont: *zh-cn-font 
debug: false

This is my FontMod.yml file. It was still working on Telegram Desktop 2.1.0 and everything was in Microsoft YaHei. However it no longer works on 2.1.1, where it fallback'ed to either Yu Gothic UI or Microsoft Jhenghei UI, which I failed to distinguish.

My OS install language is ja-JP and interface language en-US.

開啟debug後,記錄值爲

[DllMain] SystemParametersInfo NONCLIENTMETRICS.lfMessageFont.lfFaceName="Yu Gothic UI"

開啟debug後,記錄值爲

[DllMain] SystemParametersInfo NONCLIENTMETRICS.lfMessageFont.lfFaceName="Yu Gothic UI"

經測試有效,我的debug日誌值為Microsoft JhengHei UI。我的作業系統語言是傳承字(繁體中文)。

@kanwakyuudai 經過我的測試,確認FontMod已經在正常工作了,但是Telegram依然沒有使用我replace的字型

这个 issue 发布的时候的“最新版”是 2.1,2.1.1 似乎又改了什么,非 zh_cn 的用户出现了千奇百怪的问题,zh_cn 则是雅黑,而且似乎 fontmod 在 2.1 写全小写的 microsoft yahei 有效而 2.1.1 无效,非常奇妙

@kanwakyuudai 經過我的測試,確認FontMod已經在正常工作了,但是Telegram依然沒有使用我replace的字型

我的目前確認有效的代碼如下,請參考:
Microsoft JhengHei UI: # Chinese (Traditional) fallback font replace: 源樣黑體 R <<: *style

@kanwakyuudai 經過我的測試,確認FontMod已經在正常工作了,但是Telegram依然沒有使用我replace的字型

我的目前確認有效的代碼如下,請參考:
Microsoft JhengHei UI: # Chinese (Traditional) fallback font replace: 源樣黑體 R <<: *style

我將Microsoft JhengHei UI置換成Yu Gothic UI後依舊無效。但Debug日誌裏卻是寫明了Telegram載入的是Yu Gothic UI

2.1.2 新版简体中文默认字体又变成了 Microsoft Yahei UI,字重非常大,非常丑,需要这样改:

style: &style
  weight: 0
fonts:
  Microsoft YaHei UI: &zh-cn-font # Chinese (Simplified) fallback font
    replace: Microsoft YaHei

TG 官方的这个 Patch 真恶心人。desktop-app/patches@7aed239

Can anyone finally tell which fonts should be on different OS versions (Vista-10) and with different locales (traditional chinese, simplified chinese, japanese, korean)? Maybe there are a table?

@ilya-fedin None. You should never rely on a predefined font table. Instead, get current font from system.
I'm not familiar with Qt, but I think you should first patch QWindowsFontDatabase::systemDefaultFont() to use SystemParametersInfo(SPI_GETNONCLIENTMETRICS).
https://github.com/qt/qtbase/blob/5.12.8/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp#L2025-L2048
Then use QFont::insertSubstitution() with systemDefaultFont.
https://github.com/desktop-app/lib_ui/blob/8660904bc88ad86432521d434aae2d75658c6fb0/ui/style/style_core_font.cpp#L211

You should never rely on a predefined font table. Instead, get current font from system.

This only valid when this do you. When framework works that way, you can only edit this predefined table or add your own to workaround with this.

Then use QFont::insertSubstitution() with systemDefaultFont.

But this won't fix fallbacks on non-CJK OS. SystemParametersInfo will just return default english font and CJK fonts from Qt's predefined table will be used.

But this won't fix fallbacks on non-CJK OS.

Try append systemDefaultFont before this line.

Try append systemDefaultFont before this line.

But this wil prepend english font on english OS, just as previous suggestion, isn't it? 🤔

@ilya-fedin I don't know how Qt works. But Windows GDI font has built-in fallback support. Try set Segoe UI in Windows Notepad and type some CJK characters, you can still see them.

@ilya-fedin I don't know how Qt works. But Windows GDI font has built-in fallback support. Try set Segoe UI in Windows Notepad and type some CJK characters, you can still see them.

This builtin fallback mechanism works according to the registry key HKEY_LOCAL_MACHINE\SOFTWARE\(WOW6432Node\)Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink . This is user-modifiable.

Try set Segoe UI in Windows Notepad and type some CJK characters, you can still see them.

That predefined font table is the Qt's fallback support :)
If the first font fail, it will just try the next from the code you linked. I.e. after failing systemDefaultFont, it will try extraTryFontsForFamily, what means, on english OS fallback will look like:

Open Sans -> Segoe UI -> that table with SimSun, Gulim, etc

@ilya-fedin I think you should forget CJK fonts fallback on non-CJK OS. If you resolved CJK issue, what about other writing systems?

osdu commented

replace all fallback fonts https://github.com/desktop-app/patches/blob/7aed239952d2bf7e5d4843687f9b4fd291f8f467/qtbase_5_12_8.diff#L494..L506

style: &style
# Remove '#' to override font style
  size: 24
  # width: 0
  weight: 0
#  italic: false
#  underLine: false
#  strikeOut: false
#  charSet: 0
#  outPrecision: 0
#  clipPrecision: 0
#  quality: 0
#  pitchAndFamily: 0

fonts:
  Microsoft YaHei UI: &zh-cn-font # Chinese (Simplified) fallback font
    replace: Microsoft YaHei
    <<: *style

  Arial: &zh-cn-font # Chinese (Simplified) fallback font
    replace: Microsoft YaHei
    <<: *style

  Microsoft JhengHei UI: &zh-cn-font # Chinese (Simplified) fallback font
    replace: Microsoft YaHei
    <<: *style

  Malgun Gothic: &zh-cn-font # Chinese (Simplified) fallback font
    replace: Microsoft YaHei
    <<: *style

  Yu Gothic UI: &zh-cn-font # Chinese (Simplified) fallback font
    replace: Microsoft YaHei
    <<: *style

  Arial Unicode MS: &zh-cn-font # Chinese (Simplified) fallback font
    replace: Microsoft YaHei
    <<: *style


fixGSOFont: true # true is to use system UI font
#fixGSOFont: *zh-cn-font # Or replace with user defined font

debug: false

If you resolved CJK issue, what about other writing systems?

They, most likely, are taken from MS Shell Dlg 2 (the first fallback font, familyForStyleHint) or from Arial Unicode MS (the last font from the table)

If this is not so, then GDI manages this fallback. But for CJK fonts this is not right until this table exists. And, I think, if delete this table, there are will be issues that are even worse (if they added this table, then this was done for a reason, right?).

replace all fallback fonts

This is Sisyphean labor because fallbacks will be changed with update again

@ilya-fedin

This is Sisyphean labor because fallbacks will be changed with update again

Yes, but I don't think there's a "one size fits all" solution here. People using this extension to change their fonts are most likely changing the default font to something else. For example, I use Chiron Sans HK and Sarasa UI HC. A real solution would be to allow user-defined substitutions from Telegram's settings menu.

I would go about implementing this myself, but I don't have much knowledge about Telegram Desktop's inner workings or really Qt for that matter. And even if I did, I'm not sure it would even be merged.

Yes, but I don't think there's a "one size fits all" solution here.

I just want to say it's better to wait when the situation with fallback become stable and then trying to find a working config :(

I'm not sure it would even be merged

Here you right, preston doesn't like settings :(
That's why I'm using a fork

I think you should forget CJK fonts fallback on non-CJK OS. If you resolved CJK issue, what about other writing systems?

Looks like you're right, Qt fallbacks completely broken
telegramdesktop/tdesktop#7823

A real solution would be to allow user-defined substitutions from Telegram's settings menu.

yeah I think this will be best solution for advanced users that has special needs. for example, I can fallback to bitmap font so I can have sharpest display on my low DPI screen.

A real solution would be to allow user-defined substitutions from Telegram's settings menu.

Indeed, but sadly Telegram Desktop locked down the corresponding issue in 2016 without showing any interest in implementing this, and that's exactly why we need this FontMod...

我这里的2.1.2 版本telegram从log里看到的默认字体是DAOpenSansRegular。
替换需要用
DAOpenSansRegular: &zh-cn-font # Chinese (Simplified) fallback font
replace: Microsoft YaHei
<<: *style

@pyzxwjj DAOpenSansRegular應該沒有漢字字形。如果這樣做的話,拉丁字母也會變成微軟雅黑。

Now, when CJK fallbacks are estabilished, config should be like this for W10:

style: &style

fonts:
  Microsoft YaHei UI:
    replace: Your Simplified Chinese Font
    <<: *style
  Microsoft JhengHei UI:
    replace: Your Traditional Chinese Font
    <<: *style
  Yu Gothic UI:
    replace: Your Japanese Font
    <<: *style
  Malgun Gothic:
    replace: Your Korean Font
    <<: *style

fixGSOFont: true
debug: false

For W7:

style: &style

fonts:
  Microsoft YaHei:
    replace: Your Simplified Chinese Font
    <<: *style
  Microsoft JhengHei:
    replace: Your Traditional Chinese Font
    <<: *style
  Meiryo UI:
    replace: Your Japanese Font
    <<: *style
  Malgun Gothic:
    replace: Your Korean Font
    <<: *style

fixGSOFont: true
debug: false

I am now on 2.1.4, I notice that using the fontmod.yaml file, my non-bolded Chinese text is in Microsoft YaHei but the bolded text is in Yu Gothic UI Bold. Am I doing it wrongly? In 2.1.2 it was fine, I was seeing bolded text in MS YaHei Bold.

fonts:
  SimSun: &zh-cn-font # Chinese (Simplified) fallback font
    replace: Microsoft YaHei
    <<: *style
  PMingLiU: # Chinese (Traditional) fallback font
    replace: Microsoft JhengHei UI
    <<: *style
  MS UI Gothic: # Japanese fallback font
    replace: microsoft yahei
    <<: *style
  Batang: # Korean fallback font
    replace: 맑은 고딕
    <<: *style
  Yu Gothic UI:
    replace: microsoft yahei
    <<: *style
  Yu Gothic UI Bold:
    replace: microsoft yahei bold
    <<: *style

fixGSOFont: true # true is to use system UI font
#fixGSOFont: *zh-cn-font # Or replace with user defined font

@RyanChng Same here. Not sure how to fix it yet.

I'll ignore how Chinese looks like trash while bold after the recent updates, but the header font is really annoying.

感觉不是注入的问题,似乎是 Telegram 修改了对字体的调用,我这里确认注入上了,但是替换无效。规则如下:

fonts:
  SimSun:
    replace: Source Han Sans SC Medium
  Open Sans:
    replace: Source Han Sans SC Medium
  Open Sans Semibold:
    replace: Source Han Sans SC Medium
  Arial:
    replace: Source Han Sans SC Medium

fixGSOFont: true

image

开启 debug: true 之后的 Log 如下:https://paste.ubuntu.com/p/vfHXHNnhcW/

你的系统是不是英文版的?我的英文版系统需要替换DAOpenSansRegular才能生效
DAOpenSansRegular: &zh-cn-font # Chinese (Simplified) fallback font
replace: Microsoft YaHei
<<: *style

Coxxs commented

最好的方法是修改系統的 Regional Format(不是顯示語言)到自己常用語言的區域,Telegram 會自動選擇合適的字型。

Windows 7 ~ 10: Control Panel -> Region -> Formats -> Format
Windows 10: Settings -> Time & Language -> Region -> Regional format

另一種方法是如這裡所述,直接替換 Qt 選擇的字型。例如:

# Windows 10 英文區域,想使用雅黑字型
  Yu Gothic UI:
    replace: Microsoft YaHei UI
  Yu Gothic UI Semibold:
    replace: Microsoft YaHei UI
# Windows 7 英文區域,想使用正黑體(未測試)
  Meiryo UI:
    replace: Microsoft JhengHei
  Meiryo UI Bold:
    replace: Microsoft JhengHei

另外如果是支援 200% 以上縮放的高分屏,可以試著替換成一款支援中粗體(Semi-Bold)的字型,這樣體驗或許會更好。

@Raymonf, the fix by @Coxxs worked for me. To change the bold text for us, the one to replace is Yu Gothic UI Semibold, not Yu Gothic UI Bold.

@Coxxs 不知何故,我的 FontMod 是正常運行的,但它仍然無法修改 Telegram 的字型

由于 tg 最近更新时一直在变动 UI 字体的引用,需要重新修改替换

先上效果:

image

一、先查看 tg 目录下的 log.txt 文件,找到 gui 加载的字体名称:

[2020.05.16 22:10:13] Font: from ':/gui/fonts/DAOpenSansRegular.ttf' loaded 'DAOpenSansRegular'
[2020.05.16 22:10:13] Font: from ':/gui/fonts/DAVazirRegular.ttf' loaded 'DAVazirRegular'
[2020.05.16 22:10:13] Font: from ':/gui/fonts/DAOpenSansRegularItalic.ttf' loaded 'DAOpenSansRegularItalic'
[2020.05.16 22:10:13] Font: from ':/gui/fonts/DAVazirRegular.ttf' loaded 'DAVazirRegular'
[2020.05.16 22:10:13] Font: from ':/gui/fonts/DAOpenSansSemiboldAsBold.ttf' loaded 'DAOpenSansSemibold'
[2020.05.16 22:10:13] Font: from ':/gui/fonts/DAVazirMediumAsBold.ttf' loaded 'DAVazirMedium'
[2020.05.16 22:10:13] Font: from ':/gui/fonts/DAOpenSansSemiboldItalicAsBold.ttf' loaded 'DAOpenSansSemiboldItalic'
[2020.05.16 22:10:13] Font: from ':/gui/fonts/DAVazirMediumAsBold.ttf' loaded 'DAVazirMedium'
[2020.05.16 22:10:13] Font: from ':/gui/fonts/DAOpenSansSemiboldAsBold.ttf' loaded 'DAOpenSansSemibold'
[2020.05.16 22:10:14] Font: from ':/gui/fonts/DAVazirMediumAsBold.ttf' loaded 'DAVazirMedium'
[2020.05.16 22:10:14] Font: from ':/gui/fonts/DAOpenSansSemiboldItalicAsBold.ttf' loaded 'DAOpenSansSemiboldItalic'
[2020.05.16 22:10:14] Font: from ':/gui/fonts/DAVazirMediumAsBold.ttf' loaded 'DAVazirMedium'

二、将第一步的字体替换成想要的字体,大小根据显示屏的大小及系统缩放进行微调即可

方法:每次用一个 style,和一个字体(用一个特殊字体加大字号代替),可以试出上面出现的字体是用于 UI 的哪些部位,以下是我个人的配置:

# tg 2.1.6
# FontMod 2.0.0.0
# 多 style 配置,增加灵活性

# 聊天、设置(未加粗)、对话的最后一条消息、任务栏未读消息计数
style1: &style1
  size: 37
  # weight: 400

# 输入时格式化成斜体
style2: &style2
  size: 37
  # weight: 400

# UI 中加粗显示的字体、如:列表中好友、群、频道名称;文件夹分类启用后的字体等
style3: &style3
  size: 35
  # weight: 600

fonts:

# style1
# 聊天、设置、最后一条消息、任务栏未读消息
  DAOpenSansRegular: &zh-cn-font # Chinese (Simplified) fallback font
    # replace: PingFangSC-Regular
    replace: Source Han Sans CN Normal
    <<: *style1

# style2
# 输入时格式化成斜体
  DAOpenSansRegularItalic: &zh-cn-font # Chinese (Simplified) fallback font
    # replace: PingFangSC-Regular
    replace: Source Han Sans CN Normal
    <<: *style2

# style3
#  UI 中加粗显示的字体、如:列表中好友、群、频道名称;文件夹分类启用后的字体等
  DAOpenSansSemibold: &zh-cn-font # Chinese (Simplified) fallback font
    # replace: PingFangSC-Regular
    replace: Source Han Sans CN Normal
    <<: *style3

# 不知道是 UI 哪些部位的字体
  # DAVazirRegular: &zh-cn-font # Chinese (Simplified) fallback font
  #   replace: Sarasa Mono SC
  #   # replace: Source Han Sans CN
  #   <<: *style

# 不知道是 UI 哪些部位的字体
  # DAVazirMedium: &zh-cn-font # Chinese (Simplified) fallback font
  #   replace: STCaiyun
  #   # replace: Source Han Sans CN
  #   <<: *style

# 不知道是 UI 哪些部位的字体
  # DAOpenSansSemiboldItalic: &zh-cn-font # Chinese (Simplified) fallback font
  #   replace: Sarasa Mono SC
  #   # replace: Source Han Sans CN
  #   <<: *style

fixGSOFont: false # true is to use system UI font
#fixGSOFont: *zh-cn-font # Or replace with user defined font
debug: false

# 不知道是 UI 哪些部位的字体
# DAVazirRegular: &zh-cn-font # Chinese (Simplified) fallback font
# replace: Sarasa Mono SC
# # replace: Source Han Sans CN
# <<: *style

# 不知道是 UI 哪些部位的字体
# DAVazirMedium: &zh-cn-font # Chinese (Simplified) fallback font
# replace: STCaiyun
# # replace: Source Han Sans CN
# <<: *style

these fonts are for farsi

Coxxs commented

不太推荐直接替换 DAOpenSans,这样会把英文也替换成中文字体里的,用起来可能有些怪。

# 不知道是 UI 哪些部位的字体
# DAVazirRegular: &zh-cn-font # Chinese (Simplified) fallback font
# replace: Sarasa Mono SC
# # replace: Source Han Sans CN
# <<: *style
# 不知道是 UI 哪些部位的字体
# DAVazirMedium: &zh-cn-font # Chinese (Simplified) fallback font
# replace: STCaiyun
# # replace: Source Han Sans CN
# <<: *style

these fonts are for farsi

thank you :)

不太推荐直接替换 DAOpenSans,这样会把英文也替换成中文字体里的,用起来可能有些怪。

英文替换倒不影响使用,就是字体大小设置会导致部分 UI 的字体比较挤或者超出范围,精确调整比较困难,不过此类情况比较少,且不影响使用,个人还是可以接受。

image

破案了,要把字體的英文名變成中文名.至少我用的簡體WIN7這麽改有效.

fonts:
  微软雅黑: &zh-cn-font # Chinese (Simplified) fallback font
    replace: Microsoft Jhenghei
    <<: *style
  PMingLiU: # Chinese (Traditional) fallback font
    replace: Microsoft JhengHei UI
    <<: *style

Telegram版本是:2.1.6
雅黑顯示繁體真的是丑破天際,簡體也沒正黑好看.不知道為嘛簡體要推這麽爛的一套字型.

另外希望能進化下,把英文和中文都弄成能夠單獨設置字體,那就爽了.英文不是等寬看起來不和諧.

雅黑顯示繁體真的是丑破天際,簡體也沒正黑好看.不知道為嘛簡體要推這麽爛的一套字型.

雅黑繁体丑破天际我同意,但对于常年生活在**的简体字用户来说,正黑的字形非常怪异,至少肯定不是平时习惯的字形

replace all fallback fonts https://github.com/desktop-app/patches/blob/7aed239952d2bf7e5d4843687f9b4fd291f8f467/qtbase_5_12_8.diff#L494..L506

style: &style
# Remove '#' to override font style
  size: 24
  # width: 0
  weight: 0
#  italic: false
#  underLine: false
#  strikeOut: false
#  charSet: 0
#  outPrecision: 0
#  clipPrecision: 0
#  quality: 0
#  pitchAndFamily: 0

fonts:
  Microsoft YaHei UI: &zh-cn-font # Chinese (Simplified) fallback font
    replace: Microsoft YaHei
    <<: *style

  Arial: &zh-cn-font # Chinese (Simplified) fallback font
    replace: Microsoft YaHei
    <<: *style

  Microsoft JhengHei UI: &zh-cn-font # Chinese (Simplified) fallback font
    replace: Microsoft YaHei
    <<: *style

  Malgun Gothic: &zh-cn-font # Chinese (Simplified) fallback font
    replace: Microsoft YaHei
    <<: *style

  Yu Gothic UI: &zh-cn-font # Chinese (Simplified) fallback font
    replace: Microsoft YaHei
    <<: *style

  Arial Unicode MS: &zh-cn-font # Chinese (Simplified) fallback font
    replace: Microsoft YaHei
    <<: *style


fixGSOFont: true # true is to use system UI font
#fixGSOFont: *zh-cn-font # Or replace with user defined font

debug: false

Works for me

现在,当确定了CJK后备时,对于W10,配置应如下所示:

style: &style

fonts:
  Microsoft YaHei UI:
    replace: Your Simplified Chinese Font
    <<: *style
  Microsoft JhengHei UI:
    replace: Your Traditional Chinese Font
    <<: *style
  Yu Gothic UI:
    replace: Your Japanese Font
    <<: *style
  Malgun Gothic:
    replace: Your Korean Font
    <<: *style

fixGSOFont: true
debug: false

对于W7:

style: &style

fonts:
  Microsoft YaHei:
    replace: Your Simplified Chinese Font
    <<: *style
  Microsoft JhengHei:
    replace: Your Traditional Chinese Font
    <<: *style
  Meiryo UI:
    replace: Your Japanese Font
    <<: *style
  Malgun Gothic:
    replace: Your Korean Font
    <<: *style

fixGSOFont: true
debug: false

GOOD!!!!