Git Product home page Git Product logo

appoint-font's Introduction

Appoint Font

appoint-font-logo

The easiest font setting extension.

Supported browsers and platforms

FAQ

How does it work?

It works by dynamically generating @font-face rules and injecting them into the page.

Does it break web fonts?

This extension will not break web fonts, unless the corresponding web font is already installed locally.

The font I wanted to use didn't work, while other fonts did.

Chromium-based browsers have issues with font support, which causes some local fonts to not be used in @font-face.

Upon research, new font technologies such as variable fonts do not seem to trigger the issue. Popular fonts usually release their variable font versions, it is recommended that you download and install the latest version of them.

Some sites do not respect my rules.

This is most likely because these sites do not have font styles, or only generic fonts in the styles are actually used by browsers.

These issues can be solved by simply modifying the browser's font settings.

This extension will not help you modify your browser's font settings, as browsers and other extensions already provide better user interfaces:

appoint-font's People

Contributors

blackglory avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

appoint-font's Issues

新版本 2023.0.4 在新版微博网页版失效

字体使用的是鸿蒙字体,试着重新添加规则或者仅用一个改变标准字体的规则都没法解决,不知道问题出在哪里。我通过您这个应用解决了新版微博网页版字体渲染模糊的问题,但前几天更新了新版本后发现在微博网页版失效了,我换回旧版本(2017.10.18.1)就又可以了。总之非常感谢。

知乎部分文字的字重被改变了

问题标题、答主名称、回答里的加粗文字被变成跟普通文字一样的字重,讨论区里粗体的用户名称则是正确显示

关闭扩展(上) vs 开启扩展(下)
ss

关于某些页面上继承自body或html的字体样式

新版字体插件(2023.0.4)在某些网页上,似乎无法针对部分中文标点(U+2018、2019、201C、201D、2026、2014、2015, etc)以及全部的西文字符(a-zA-Z0-9, etc)生效。

具体描述:

使用浏览器自身的字体配置并关闭插件,在某些网站上,部分中文标点符号、以及全部的西文会使用网页自身配置,但中文漢字会使用chrome的自定义字体配置。这就造成一个现象,即中文和西文字重不匹配,漢字字符 为 font-weight: 400; 但 前面提及的中文标点符号以及全部的西文字重皆为 font-weight: 300; ,且 这部分中文标点符号的 @font-face 变成西文的样式。

也就是说,在这些特定网页上,【钦定字体】插件没有针对chrome字体配置产生影响?额外的,似乎还能说明【新版本的chrome】自身的字体配置存在着问题?毕竟前述标点在某些语境下也可做西文标点,但在中文网页中却优先配置为西文,令人不爽。(遗憾的是这部分没法验证,chrome的自定义字体配置无法清空处理)

【检查】「样式」并消选font: xxx;font-family: xxx;

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* font-family: 'Source Sans Pro','Helvetica Neue',Helvetica,Arial,sans-serif; */
    font-weight: 400;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    /* font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; */
    font-size: 14px;
    line-height: 1.42857143;
    color: #333;
    background-color: #fff;
}

body {
    line-height: 24px;
    /* font: 14px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif; */
}

消选以上font配置,将激活继承自html的以下特性,并且全盘替换网页字体为chrome的自定义字体设置(包括上面提到的中文标点字符,毕竟中文标点符号要搭配漢字显示)。

html {
    font-family: sans-serif;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

虽然得到了结果,但我情感上仍不能理解这样的网页动作;而且不管【钦定字体】如何配置,在这种网页上都起不到效果。

(不过我感觉23年2月底升级的chrome浏览器,在某些页面上字体突然变得十分难看,猜测原因可能来自于chrome本身?毕竟不久前同样的网页同样的配置,也没出现令人遗憾的剧变,怪哉)

望解答,谢谢

附chrome字体配置如下:

标准字体:华康金刚黑A Std
Serif 字体:森泽UD黎明体Gb4
Sans-serif 字体:华康金刚黑A Std
宽度固定的字体:等距更纱黑体SC

以上四种字体均完整覆盖GB18030-2000所涵盖的字符范围(即GBK+ CJK-A)

【钦定字体】的配置如下,并在高级选项中配置 font-weight: 400;

标准替换1:华康金刚黑A Std
标准替换2:Arial
等宽替换1:等距更纱黑体SC
等距替换2:Courier New

以上

Manifest V3版本路线图

这是Appoint Font的新版本(暂定版本号为2023.0.0)的路线图.
浏览器厂商于2023年开始普遍支持扩展程序新标准Manifest V3,
Appoint Font使用的Manifest V2最快会在2023年中旬停止支持, 届时扩展程序将无法使用, 因此必须对扩展程序进行升级.

由于源代码年久失修, 这次升级将通过一次相当于重写的重构来完成.
经过研究, 该项目使用的大多数API都还可以在Manifest V3里继续使用, 所以升级应该没有技术上的阻力.

Manifest V2时期遗留的, 且有望被实现的issues将被合并到这里:

  • 支持为不同网页单独设定字体.
  • 允许标准字体, 等宽字体的覆盖变成可选.
  • 支持字体设置精确到字重.
    这是一个相当罕见的需求, 但可以用来对冲子字体的字重问题.

字体列表性能优化

v2023.0.1版本为了修复字体列表的问题, 将字体列表缓存在内存.
由于Manifest V3的Service Worker是非持久化的后台页面, 每次Service Worker被浏览器关闭后重新启动, 都会导致需要重新生成字体列表缓存.
在测试环境中, 生成字体列表需要2秒, 配置较低的硬件可能会花更长时间, 这显然值得优化.

可以通过重新将字体列表保存在chrome.storage.local里解决此问题, 但问题的关键在于如何及时更新字体列表.
这至少需要一个专用的事件使扩展知道自己是"从禁用中被启用"和"因浏览器启动而启动", 以区别"被浏览器重新唤醒".

360安全浏览器15,Chromium114内核;360极速浏览器X64位正式版,Chromium119内核。这俩无效呀。

在浏览器(包括但不限于上述两个浏览器)设置里设定好“自定义字体”后,一些网页如直播吧、知乎、IT之家、360社区论坛等还是无法显示自己设定的“自定义字体”,然后就需要用【钦定字体】这个扩展来让这些页面也显示自己设定的“自定义字体”。
但是,其他浏览器都可以正常使用【钦定字体】的功能,唯独360这俩不行,奇了个怪了。
大佬能不能帮忙看看。
测试网页:
直播吧
https://www.zhibo8.com/
IT之家
https://www.ithome.com/
下面这个链接是我在360极速浏览器社区里发的反馈帖子:
网页字体设置不统一的问题,很久了。_360社区
https://bbs.360.cn/thread-16106658-1-1.html

请问该插件是否在 linux 下的 Chrome 浏览器中无效?

我设置标准字体为 MiSans,设置等宽字体为 CascadiaCode,任何网页都没有生效。
我之前使用过”强制网页使用自定义字体“这个插件,更改字体在所有网页都生效了。
我的 Chrome 版本为 113.0.5672.63(正式版本)(64 位)

360安全浏览器最新版本,该插件规则设置无效。

浏览器版本14.1.1058.0,内核版本108。
表现之一:
直播吧 https://www.zhibo8.cc/
在钦定字体里添加“将标准字体替换为霞鹜文楷屏幕阅读版”,无效;
在钦定字体里添加“将等宽字体替换为霞鹜文楷等宽”,有效;
但是,替换字体的列表里却找不到“霞鹜文楷等宽”这个字体,奇怪了。(电脑有安装,也找不到其他等宽字体,只能显示很少)

设置多个“替换标准字体”逻辑似乎顺序不正确

设置如下

image

期望

页面按照设置界面的顺序,首先使用HarmonyOS Sans SC进行显示,如果有不支持的语言文字,则使用思源黑体进行补充;也就是按设置的顺序,从前依次向后

实际效果

页面首先使用了排在后面的思源黑体

感谢开发,卸载了其余所有fonts插件。反馈一个问题

Chrome版本 59.0.3071.115(正式版本) (64 位)
字体 
Standard: 【Noto Serif CJK SC】
Fixed-width: 【Noto Sans Mono CJK SC Regular】

大约有30%的情况,网页加载指定字体会失败。
第一次刷新后,成功加载的占90%;
第二次刷新后,成功加载的占9%;
极个别需要刷新3次。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.