AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / unix / 问题

问题[fontconfig](unix)

Martin Hope
Matthew Cline
Asked: 2020-01-10 20:12:54 +0800 CST

如何覆盖默认字体别名优先级

  • 1

对于草书字体,我同时安装了 URW Z003 和 Écolier Court 字体。我想使用 Écolier Court,但fc-match cursive显示正在选择 Z0003。我无法删除 Z003 字体包,因为它是我想要保留的许多软件包的依赖项。我尝试制作一个 fontconfig conf 文件来更改选择的内容,但没有任何运气。

URW Z003 中的相关 fontconfig 行/etc/fonts/conf.d/61-urw-z003.conf是:

  <alias>
    <family>cursive</family>
    <prefer>
      <family>Z003</family>
    </prefer>
  </alias>

  <alias>
    <family>Z003</family>
    <default>
      <family>cursive</family>
    </default>
  </alias>

Écolier Court 的相关 fontconfig 行,在/etc/fonts/conf.d/61-ecolier-court.conf,是

  <alias>
    <family>cursive</family>
    <prefer>
      <family>Écolier court</family>
    </prefer>
  </alias>

  <alias>
    <family>Écolier court</family>
    <default>
      <family>cursive</family>
    </default>
  </alias>

我写的fontconfig文件是:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <alias>
    <family>cursive</family>
    <prefer>
      <family>Écolier court</family>
    </prefer>
  </alias>
  <alias>
    <family>Écolier court</family>
    <prefer>
      <family>cursive</family>
    </prefer>
  </alias>
</fontconfig>

我在我的 fontconfig 文件名前加上了00-和99-,但无论哪种情况都fc-match表明 fontconfig 在要求草书字体时总是选择 Z003。

fonts fontconfig
  • 1 个回答
  • 1396 Views
Martin Hope
Irreversible Reboot
Asked: 2019-01-19 10:07:55 +0800 CST

mpv 不使用嵌入字体作为字幕

  • 3

它应该看起来如何 它应该看起来如何。

它看起来如何 它看起来如何。

我可以在 mpv 的日志中看到它确实需要 Murga,即嵌入在 mkv 文件中的正确字体,但它最终会退回到 BitstreamVeraSans-Roman。

[sub/ass] fontselect: (Murga, 400, 0) -> /usr/share/fonts/truetype/emoji/TwitterColorEmoji-SVGinOT.ttf, 0, TwitterColorEmojiSVGinOT
[sub/ass] Glyph 0x45 not found, selecting one more font for (Murga, 400, 0)
[sub/ass] fontselect: (Murga, 400, 0) -> /usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf, 0, BitstreamVeraSans-Roman

删除/etc/fonts/fonts.conf似乎可以解决问题,但我想知道是否可以添加某种规则来解决问题。这是我的 fonts.conf 的内容:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/fonts.conf file to configure system font access -->
<fontconfig>

<!--
    DO NOT EDIT THIS FILE.
    IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.
    LOCAL CHANGES BELONG IN 'local.conf'.

    The intent of this standard configuration file is to be adequate for
    most environments.  If you have a reasonably normal environment and
    have found problems with this configuration, they are probably
    things that others will also want fixed.  Please submit any
    problems to the fontconfig bugzilla system located at fontconfig.org

    Note that the normal 'make install' procedure for fontconfig is to
    replace any existing fonts.conf file with the new version.  Place
    any local customizations in local.conf which this file references.

    Keith Packard
-->

<!-- Font directory list -->

    <dir>/usr/share/fonts</dir>
    <dir>/usr/local/share/fonts</dir>
    <dir prefix="xdg">fonts</dir>
    <!-- the following element will be removed in the future -->
    <dir>~/.fonts</dir>

<!--
  Accept deprecated 'mono' alias, replacing it with 'monospace'
-->
    <match target="pattern">
        <test qual="any" name="family">
            <string>mono</string>
        </test>
        <edit name="family" mode="assign" binding="same">
            <string>monospace</string>
        </edit>
    </match>

<!--
  Accept alternate 'sans serif' spelling, replacing it with 'sans-serif'
-->
    <match target="pattern">
        <test qual="any" name="family">
            <string>sans serif</string>
        </test>
        <edit name="family" mode="assign" binding="same">
            <string>sans-serif</string>
        </edit>
    </match>

<!--
  Accept deprecated 'sans' alias, replacing it with 'sans-serif'
-->
    <match target="pattern">
        <test qual="any" name="family">
            <string>sans</string>
        </test>
        <edit name="family" mode="assign" binding="same">
            <string>sans-serif</string>
        </edit>
    </match>

<!--
  Ignore dpkg temporary files created in fonts directories
-->
    <selectfont>
        <rejectfont>
            <glob>*.dpkg-tmp</glob>
        </rejectfont>
    </selectfont>
    <selectfont>
        <rejectfont>
            <glob>*.dpkg-new</glob>
        </rejectfont>
    </selectfont>

<!--
  Load local system customization file
-->
    <include ignore_missing="yes">conf.d</include>

<!-- Font cache directory list -->

    <cachedir>/var/cache/fontconfig</cachedir>
    <cachedir prefix="xdg">fontconfig</cachedir>
    <!-- the following element will be removed in the future -->
    <cachedir>~/.fontconfig</cachedir>

    <config>
<!--
  Rescan configuration every 30 seconds when FcFontSetList is called
 -->
        <rescan>
            <int>30</int>
        </rescan>
    </config>

</fontconfig>
linux-mint fontconfig
  • 1 个回答
  • 1591 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve