ysc3839 / FontMod

Simple hook tool to change Win32 program font.
MIT License
1.29k stars 62 forks source link

无法替换字体 #37

Closed greenhat616 closed 5 years ago

greenhat616 commented 5 years ago
[2019.07.06 22:39:54] Launched version: 1007012, install beta: [TRUE], alpha: 0, debug mode: [FALSE], test dc: [FALSE]
[2019.07.06 22:39:54] Executable dir: D:/Telegram Desktop/, name: Telegram.exe
[2019.07.06 22:39:54] Initial working dir: D:/Telegram Desktop/
[2019.07.06 22:39:54] Working dir: D:/Telegram Desktop/
[2019.07.06 22:39:54] Command line: D:\Telegram Desktop\Telegram.exe
[2019.07.06 22:39:54] Executable path before check: D:/Telegram Desktop/Telegram.exe
[2019.07.06 22:39:54] Logs started
[2019.07.06 22:39:54] Connecting local socket to Global\bacdea0964705717ba4509b541a84234-{87A94AB0-E370-4cde-98D3-ACC110C5967D}...
[2019.07.06 22:39:54] This is the only instance of Telegram, starting server and app...
[2019.07.06 22:39:54] Moved logging from 'D:/Telegram Desktop/log_start0.txt' to 'D:/Telegram Desktop/log.txt'!
[2019.07.06 22:39:54] Primary screen DPI: 119
[2019.07.06 22:39:58] App Info: reading settings...
[2019.07.06 22:39:58] App Info: reading encrypted settings...
[2019.07.06 22:39:58] Lang Info: Loaded cached, keys: 2129
[2019.07.06 22:39:58] Lang Error: Unexpected tag (key 'lng_action_add_user:users')
[2019.07.06 22:39:58] Lang Error: Unexpected tag (key 'lng_call_box_status_group:count')
[2019.07.06 22:39:58] Lang Error: Expected '}' after tag name (key 'lng_confirm_phone_about:phone')
[2019.07.06 22:39:58] Lang Info: Loaded cached, keys: 2391
[2019.07.06 22:39:58] Lang Error: Unexpected tag (key 'lng_call_box_status_group:count')
[2019.07.06 22:39:58] Lang Error: Unknown tag (key 'lng_manage_discussion_group_warning:visible')
[2019.07.06 22:39:58] OpenAL Logging Level: (not set)
[2019.07.06 22:39:58] Audio Playback Devices: OpenAL Soft
[2019.07.06 22:39:58] Audio Playback Default Device: OpenAL Soft
[2019.07.06 22:39:58] Audio Capture Devices: OpenAL Soft on Microphone (USB Audio Device);OpenAL Soft on Microphone (High Definition Audio Device);OpenAL Soft on Microphone (High Definition Audio Device) #2
[2019.07.06 22:39:58] Audio Capture Default Device: OpenAL Soft on Microphone (USB Audio Device)
[2019.07.06 22:39:59] App Info: reading map...
[2019.07.06 22:39:59] App Info: reading encrypted map...
[2019.07.06 22:39:59] App Info: reading encrypted user settings...
[2019.07.06 22:39:59] App Info: encrypted user settings read.
[2019.07.06 22:39:59] App Info: reading encrypted mtp data...
[2019.07.06 22:39:59] MTP Info: read keys, current: 5, to destroy: 0
[2019.07.06 22:39:59] Map read time: 76
[2019.07.06 22:39:59] Export Info: Destroy top bar by controller removal.
[2019.07.06 22:39:59] Window Shadow: 1, 1, 1, 1, 1, 2, 3, 6, 9, 13, 18, 23, 28, 33
[2019.07.06 22:40:01] API Warning: not loaded minimal channel applied.

日记如上

ysc3839 commented 5 years ago

这是 Telegram 的 log,你要看的是 FontMod.log。

greenhat616 commented 5 years ago

啊, 另外一个文件长度过长。 我把它上传到七牛吧。


修正描述, 那是以前刷的log, 我删掉所有配置文件, 让他自动生成, 发现日记为空。 此时使用的是默认配置, 该现象在近期 tg 升级后出现。

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

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: Yu Gothic UI
    <<: *style
  Gulim: # Korean fallback font
    replace: 맑은 고딕
    <<: *style

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

Screenshots

image image image image

P.S 我我觉得不是 MacType的干扰, 因为之前旧版本TG的时候, Mactype 与 该插件混用, 能够正常渲染。

ysc3839 commented 5 years ago

无法确认是什么问题,如果正常 hook 了 CreateFontIndirectW 的话 log 文件不应该为空。建议你在全新安装的系统上试试看是否有问题。