F9y4ng / GreasyFork-Scripts

The open source code of this project is used for userscripts (油猴脚本) for desktop browsers, including Font Rendering (Customized) (字体渲染(自用脚本)- Font Rendering.user.js), and Search Engine Assistant (优雅的搜索引擎助手 - Google & Baidu Switcher.user.js), etc.
https://f9y4ng.github.io/GreasyFork-Scripts/
GNU General Public License v3.0
950 stars 46 forks source link

`input`输入框的字体问题 #214

Closed aboutZZ closed 1 year ago

aboutZZ commented 1 year ago

我发现您对input输入框的字体进行了调整(font-family设置为了initial),这导致输入框的原始字体十分难看,且有锯齿(见下图)。希望能增加个开关,去掉这一设置 https://github.com/F9y4ng/GreasyFork-Scripts/blob/4be47f5e2b2e917f9b70c45d56fac4a272b277ea/Font%20Rendering.user.js#L879-L881

设置font-family:initial效果图: 图片

去掉font-family:initial后的效果 图片

F9y4ng commented 1 year ago

该样式仅在Firefox中生效。Firefox的input标签会受到字体的字宽影响而造成input宽度被撑大,造成样式问题。

所以这并不是个问题。

字体初始值的设定会默认调用浏览器的默认字体,可通过关闭字体重写功能来禁用此功能。