You are not logged in.

#1 2025-03-19 00:29:45

chatfleur
Member
Registered: 2025-03-18
Posts: 4

[SOLVED] fc-list / fc-match inconsistency with config

i have the following fontconfig config file, that attempts to edit some properties of a bitmap (otb) font:

<match target="font">
    <test name="family">
        <string>lemonOTB</string>
    </test>
    <edit name="spacing" binding="strong">
        <int>100</int>
    </edit>
    <edit name="scalable" binding="strong">
        <bool>true</bool>
    </edit>
    <edit name="outline" binding="strong">
        <bool>true</bool>
    </edit>
</match>

i have verified that the config file is picked up by fontconfig, and

fc-match lemonOTB -v

produces the desired result. however,

fc-list lemonOTB -v

still shows:

...
        outline: False(s)
        scalable: False(s)
...

is this behaviour expected?

Last edited by chatfleur (2025-03-20 08:32:44)

Offline

#2 2025-03-19 07:41:09

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,783

Re: [SOLVED] fc-list / fc-match inconsistency with config

Same after fc-cache?

Offline

#3 2025-03-19 08:02:45

chatfleur
Member
Registered: 2025-03-18
Posts: 4

Re: [SOLVED] fc-list / fc-match inconsistency with config

seth wrote:

Same after fc-cache?

yes, here's the full output of fc-list: http://0x0.st/81P8.txt and fc-match: http://0x0.st/81PK.txt for reference. fwiw, fc-query /path/to/font.otb produces exactly the same output as fc-list; only fc-match seems to affected by the config.

Offline

#4 2025-03-19 16:30:51

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,783

Re: [SOLVED] fc-list / fc-match inconsistency with config

At least for query that's not a surprise (check the strace)
For fc-list it's different, the strace shows the configs being opened

strace fc-list -v lemonOTB |& grep <your config name here>

Offline

#5 2025-03-20 01:32:40

chatfleur
Member
Registered: 2025-03-18
Posts: 4

Re: [SOLVED] fc-list / fc-match inconsistency with config

seth wrote:

At least for query that's not a surprise (check the strace)
For fc-list it's different, the strace shows the configs being opened

strace fc-list -v lemonOTB |& grep <your config name here>
newfstatat(AT_FDCWD, "/home/user/.config/fontconfig/fonts.conf", {st_mode=S_IFREG|0644, st_size=750, ...}, 0) = 0
newfstatat(AT_FDCWD, "/home/user/.config/fontconfig/fonts.conf", {st_mode=S_IFREG|0644, st_size=750, ...}, 0) = 0
access("/home/user/.config/fontconfig/fonts.conf", R_OK) = 0
access("/home/user/.config/fontconfig/fonts.conf", R_OK) = 0
readlink("/home/user/.config/fontconfig/fonts.conf", 0x7fffdd91ea00, 4095) = -1 EINVAL (Invalid argument)
newfstatat(AT_FDCWD, "/home/user/.config/fontconfig/fonts.conf", {st_mode=S_IFREG|0644, st_size=750, ...}, 0) = 0
openat(AT_FDCWD, "/home/user/.config/fontconfig/fonts.conf", O_RDONLY|O_CLOEXEC) = 4
access("/home/user/.config/fontconfig/fonts.conf", R_OK) = 0
newfstatat(AT_FDCWD, "/home/user/.config/fontconfig/fonts.conf", {st_mode=S_IFREG|0644, st_size=750, ...}, 0) = 0
newfstatat(AT_FDCWD, "/home/user/.config/fontconfig/fonts.conf", {st_mode=S_IFREG|0644, st_size=750, ...}, 0) = 0
access("/home/user/.config/fontconfig/fonts.conf", R_OK) = 0
access("/home/user/.config/fontconfig/fonts.conf", R_OK) = 0
readlink("/home/user/.config/fontconfig/fonts.conf", 0x7fffdd925280, 4095) = -1 EINVAL (Invalid argument)
access("/home/user/.config/fontconfig/fonts.conf", R_OK) = 0

which is the same output as strace fc-match. i checked the strace for fc-query as well, and indeed the configs are not read.

Offline

#6 2025-03-20 08:02:27

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,783

Re: [SOLVED] fc-list / fc-match inconsistency with config

So I guess fc-list -v just prints the font values w/o interpreting the config (and just uses that to locate fonts)
(Why) is this a concern?
https://en.wikipedia.org/wiki/XY_problem

Offline

#7 2025-03-20 08:31:58

chatfleur
Member
Registered: 2025-03-18
Posts: 4

Re: [SOLVED] fc-list / fc-match inconsistency with config

that's fine then, it would just have been the easiest way to get the font recognised as scalable (when it's not). it just wasn't clear from the documentation if this was the expected behaviour, so i wanted to check this first. thanks for the help! big_smile

Offline

Board footer

Powered by FluxBB