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
951 stars 46 forks source link

[发现错误] echarts示例代码等宽字体替换为非等宽,代码编辑时无法精准定位 #184

Closed feileb closed 1 year ago

feileb commented 1 year ago

1. 准备工作(确认预先完成的操作)

2. 描述错误信息(清楚而简洁地描述错误)

echarts示例界面等宽字体替换为非等宽字体,根据配置添加了等宽字体配置,也删除了,pre,pre *,code,code *,没有效果

3. 错误再现(重现行为步骤,直至复现您遇到的问题)

下面两个网址都有类似问题: https://echarts.apache.org/examples/zh/editor.html?c=bar-background https://www.makeapie.cn/echarts_content/mix-timeline-finance.html

F9y4ng commented 1 year ago

添加以下代码至自定义等宽字体 根域及元素选择器 文本域:

@www.makeapie.cn##.ace_line *,.ace_gutter-cell
@echarts.apache.org##.ace_line *,.ace_gutter-cell

另外,文档编辑、代码编辑型网站尽量不要使用字体缩放功能,由于坐标系偏移会造成文字选取错位的问题。请在此类站点中关闭字体缩放功能(设置为1),保存为站点独享数据。