V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
tashigaofei
V2EX  ›  Linux

Linux 的 firefox 怎么强制使用苹果的苹方字体?

  •  
  •   tashigaofei · 3 天前 · 1324 次点击
    • ubuntu 安装了苹方字体,系统界面可以正常使用。
    • chrome 里可以自定义字体,指定苹方字体有效。奈何 chrome 不支持视频硬解,老的 intel i5-4250U 看 B 站,使用率 90%。(尝试了指定硬解启动参数,不生效。aapi + wayland 。但在新的 intel ultra 5 125H 上有效,但是不支持输入法和系统的大字体)
    • firefox 支持硬解,cpu 占用 40-50%。但是 firefox 里自定义苹方字体不生效。
    • 苹方字体的渲染效果,个人感觉 ubuntu 比 macos 好。

    ps:现在用的是 2013 的 mba ,为了不折腾,本来应该买 macbook pro 的,奈何穷。这个时间点,想等等 M4 上市,同时等三季度 intel 片上内存的 cpu ,对比以下。

    11 条回复    2024-06-27 23:03:40 +08:00
    EVANGELIONAir
        1
    EVANGELIONAir  
       3 天前
    https://wiki.archlinuxcn.org/wiki/简体中文本地化

    配置 fontconfig

    个人觉得从字体覆盖率(泛 CJK )来说还是 noto sans 更好
    chutsetien
        2
    chutsetien  
       3 天前
    不知道这个有没有用: https://greasyfork.org/scripts/29500
    DOLLOR
        3
    DOLLOR  
       3 天前
    装 Stylus (或类似扩展),添加自定样式
    html body * {
    font-family: '字体名称', sans-serif, serif !important;
    }

    不过这方法有个缺陷,会导致 web font icon 之类的图标失效。
    fgt1t5y
        4
    fgt1t5y  
       3 天前
    右上角菜单 -> 设置,往下滑找到字体部分,点高级按钮,里面选苹方字体,然后取消勾选“允许页面选择自己的字体代替您的上述选择(A)” -> 确定
    june4
        5
    june4  
       3 天前
    我是这么搞一下就可以了,ff 用的是苹方

    [~] $ cat /etc/fonts/conf.d/75-zh-PingFang.conf
    <?xml version="1.0"?>
    <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
    <fontconfig>
    <alias>
    <family>serif</family>
    <prefer>
    <family>FZPingXianYaSong-R-GBK</family>
    </prefer>
    </alias>
    <alias>
    <family>sans-serif</family>
    <prefer>
    <family>.PingFang SC</family>
    </prefer>
    </alias>
    <alias>
    <family>monospace</family>
    <prefer>
    <family>.PingFang SC</family>
    </prefer>
    </alias>
    </fontconfig>
    vvhy
        6
    vvhy  
       2 天前
    我在 windows 上尝试了几种方案:1. font.system.whitelist ,2. stylus font-face ,3. userContent.css font-face ,都不完美,不过你可以试试
    tashigaofei
        7
    tashigaofei  
    OP
       2 天前
    @fgt1t5y 一开始是这么设置的,不起作用。系统自带的字体可以,安装的苹方字体不行。
    tashigaofei
        9
    tashigaofei  
    OP
       2 天前
    @maoyikun 本来是的,奈何有 bug

    ERROR:vaapi_video_decoder.cc(1212)] failed Initialize()ing the frame pool

    可能是老设备,google 支持的不好了。
    maoyikun
        10
    maoyikun  
       2 天前
    @tashigaofei #9 😂 我倒是没注意到过这个问题,只是配置了之后看了下视频确实使用的是硬解,平时对硬解的需求也不大。

    firefox 的字体配置的话可以看看这个 [https://wiki.archlinux.org/title/Firefox#Font_troubleshooting]( https://wiki.archlinux.org/title/Firefox#Font_troubleshooting)
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2543 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 13:57 · PVG 21:57 · LAX 06:57 · JFK 09:57
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.