You are not logged in.

#1 2026-04-10 00:19:18

Wildflower
Member
Registered: 2026-04-09
Posts: 7

mkfontscale deletes both encodings.dir files

Why did mkfontscale start to remove /usr/share/fonts/encodings/encodings.dir and /usr/share/fonts/encodings/large/encodings.dir?
I have to re-install xorg-fonts-encodings after, to restore them.

Offline

#2 2026-04-10 07:34:35

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 74,647

Re: mkfontscale deletes both encodings.dir files

https://man.archlinux.org/man/mkfontscale.1
It's supposed to (re)write that - what exactly are you running why?

Offline

#3 2026-04-10 12:50:52

Wildflower
Member
Registered: 2026-04-09
Posts: 7

Re: mkfontscale deletes both encodings.dir files

Running this command removes both encodings.dir files:

sudo mkfontscale -- "/usr/share/fonts/100dpi" "/usr/share/fonts/75dpi" "/usr/share/fonts/misc" "/usr/share/fonts/TTF" "/usr/share/fonts/OTF" "/usr/share/fonts/noto" "/usr/share/fonts/Type1" "/usr/share/fonts/cantarell" "/usr/share/fonts/cyrillic" "/usr/share/fonts/encodings" "/usr/share/fonts/encodings/large" "/usr/share/fonts/gsfonts" "/usr/share/fonts/oiio" "/usr/share/fonts/util" "/usr/share/fonts/awesome-terminal-fonts" "/usr/local/share/fonts"

Here is what happened. Last Thursday (yesterday) I updated Arch with sudo pacman -Syu. I noticed that the Noto font was one of the packages that would be updated. I confirmed to start the updates.
Immediately I noticed these two lines (that were never ever there before). They were just before pacman started showing messages of Updating xxxxxxxxx .

warning: could not get file information for usr/share/fonts/encodings/encodings.dir
warning: could not get file information for usr/share/fonts/encodings/large/encodings.dir

After pacman finished I checked the files with:

ls -lah /usr/share/fonts/encodings/encodings.dir /usr/share/fonts/encodings/large/encodings.dir
ls: cannot access '/usr/share/fonts/encodings/encodings.dir': No such file or directory
ls: cannot access '/usr/share/fonts/encodings/large/encodings.dir': No such file or directory

I recreated the files with:

sudo pacman -S xorg-fonts-encodings
[sudo] password for wildflower:              
warning: xorg-fonts-encodings-1.1.0-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) xorg-fonts-encodings-1.1.0-2

Total Installed Size:  0,61 MiB
Net Upgrade Size:      0,00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                                                                                                                           [########################################################################################################] 100%
(1/1) checking package integrity                                                                                                                                         [########################################################################################################] 100%
(1/1) loading package files                                                                                                                                              [########################################################################################################] 100%
(1/1) checking for file conflicts                                                                                                                                        [########################################################################################################] 100%
(1/1) checking available disk space                                                                                                                                      [########################################################################################################] 100%
warning: could not get file information for usr/share/fonts/encodings/encodings.dir
warning: could not get file information for usr/share/fonts/encodings/large/encodings.dir
:: Processing package changes...
(1/1) reinstalling xorg-fonts-encodings                                                                                                                                  [########################################################################################################] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Updating fontconfig cache...

Then I rechecked the files with:

ls -lah /usr/share/fonts/encodings/encodings.dir /usr/share/fonts/encodings/large/encodings.dir
-rw-r--r-- 1 root root 2,3K 2026-04-09 19:01 /usr/share/fonts/encodings/encodings.dir
-rw-r--r-- 1 root root  832 2026-04-09 19:01 /usr/share/fonts/encodings/large/encodings.dir

Then I remembered that I had re-installed the font Victor Mono Nerd with sudo pacman -Syu ttf-victor-mono-nerd the day before, and had finished up with the following commands:

sudo mkfontscale -- "/usr/share/fonts/100dpi" "/usr/share/fonts/75dpi" "/usr/share/fonts/misc" "/usr/share/fonts/TTF" "/usr/share/fonts/OTF" "/usr/share/fonts/noto" "/usr/share/fonts/Type1" "/usr/share/fonts/cantarell" "/usr/share/fonts/cyrillic" "/usr/share/fonts/encodings" "/usr/share/fonts/encodings/large" "/usr/share/fonts/gsfonts" "/usr/share/fonts/oiio" "/usr/share/fonts/util" "/usr/share/fonts/awesome-terminal-fonts" "/usr/local/share/fonts"

sudo mkfontdir -- "/usr/share/fonts/100dpi" "/usr/share/fonts/75dpi" "/usr/share/fonts/misc" "/usr/share/fonts/TTF" "/usr/share/fonts/OTF" "/usr/share/fonts/noto" "/usr/share/fonts/Type1" "/usr/share/fonts/cantarell" "/usr/share/fonts/cyrillic" "/usr/share/fonts/encodings" "/usr/share/fonts/encodings/large" "/usr/share/fonts/gsfonts" "/usr/share/fonts/oiio" "/usr/share/fonts/util" "/usr/share/fonts/awesome-terminal-fonts" "/usr/local/share/fonts"

sudo fc-cache --really-force --verbose

xset fp rehash

So I retraced by issuing those commands again (bare in mind that I had just restored the encodings.dir files).

ls -lah /usr/share/fonts/encodings/encodings.dir /usr/share/fonts/encodings/large/encodings.dir
-rw-r--r-- 1 root root 2,3K 2026-04-09 19:01 /usr/share/fonts/encodings/encodings.dir
-rw-r--r-- 1 root root  832 2026-04-09 19:01 /usr/share/fonts/encodings/large/encodings.dir

sudo mkfontscale -- "/usr/share/fonts/100dpi" "/usr/share/fonts/75dpi" "/usr/share/fonts/misc" "/usr/share/fonts/TTF" "/usr/share/fonts/OTF" "/usr/share/fonts/noto" "/usr/share/fonts/Type1" "/usr/share/fonts/cantarell" "/usr/share/fonts/cyrillic" "/usr/share/fonts/encodings" "/usr/share/fonts/encodings/large" "/usr/share/fonts/gsfonts" "/usr/share/fonts/oiio" "/usr/share/fonts/util" "/usr/share/fonts/awesome-terminal-fonts" "/usr/local/share/fonts"

ls -lah /usr/share/fonts/encodings/encodings.dir /usr/share/fonts/encodings/large/encodings.dir
ls: cannot access '/usr/share/fonts/encodings/encodings.dir': No such file or directory
ls: cannot access '/usr/share/fonts/encodings/large/encodings.dir': No such file or directory

I didn't go any further.

Last edited by Wildflower (2026-04-10 12:55:14)

Offline

#4 2026-04-10 22:53:08

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 74,647

Re: mkfontscale deletes both encodings.dir files

and had finished up with the following commands

Why? At all, but also see https://gitlab.archlinux.org/archlinux/ … =heads#L40

Offline

#5 2026-04-11 08:35:28

Wildflower
Member
Registered: 2026-04-09
Posts: 7

Re: mkfontscale deletes both encodings.dir files

seth wrote:

and had finished up with the following commands

Why? At all, ...

I guess because old learned habits stick: https://wiki.archlinux.org/title/Fonts# … plications
And therefore because of package xorg-xfontsel: https://wiki.archlinux.org/title/X_Logi … escription.

But my question is still unanswered. Why did mkfontscale start to delete encodings.dir files?

Offline

#6 2026-04-11 13:21:57

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 74,647

Re: mkfontscale deletes both encodings.dir files

"maintainence", I guess - the file is esp. not written by your command so pot. it just cleans up.
Are you suggesting this is a regression?
https://gitlab.archlinux.org/archlinux/ … mmits/main wasn't udpated in a year and the last upstream version was released 2 years ago
Likewise https://gitlab.archlinux.org/archlinux/ … n/PKGBUILD

Offline

#7 2026-04-11 16:12:54

Wildflower
Member
Registered: 2026-04-09
Posts: 7

Re: mkfontscale deletes both encodings.dir files

No, I'm not suggesting anything. And if it's a regression it's caused because of some other process (which was recently updated) influencing mkfontscale's decision making. I'm just trying to understand what is going on. I'm running mkfontscale often and the issue popped somewhere around the 9th April I think. Not entirely sure.

Offline

#8 2026-04-11 19:37:50

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 74,647

Re: mkfontscale deletes both encodings.dir files

https://gitlab.freedesktop.org/xorg/app … eads#L1071 removes the file before creating it - numEncodings is gonna be 0, so it will not be created again.
It's always™ been like that, https://gitlab.freedesktop.org/xorg/app … ge=2#L1071

Offline

#9 2026-04-12 12:07:47

Wildflower
Member
Registered: 2026-04-09
Posts: 7

Re: mkfontscale deletes both encodings.dir files

seth wrote:

https://gitlab.freedesktop.org/xorg/app … eads#L1071 removes the file before creating it - numEncodings is gonna be 0, so it will not be created again.
It's always™ been like that, https://gitlab.freedesktop.org/xorg/app … ge=2#L1071

What makes you say that "numEncodings is gonna be 0"?
Line 292 "ll = listLength(encodingsToDo);". "ll" is then passed to function "doDirectory()" (2nd argument) on line 295 or line 298 (depending on the number of arguments (argc) that were passed to function main()). The second argument of "doDirectory" is named "numEncodings".
I did pass a shed load of font directories. So argc, therefore ll is never going to be zero.

Also, package xorg-mkfontscale has a build date of 09 apr 2026 19:04:40 CEST, and package xorg-fonts-encodings has a build date of 09 apr 2026 19:01:44 CEST.
I've been running those four commands for years after font updates. And the encodings.dir files were never removed before by running mkfontscale. Something changed somewhere. Maybe someone (who is able to explain this sudden behaviour) should update the Arch Wiki here https://wiki.archlinux.org/title/Fonts# … plications to point out that from now the encodings.dir files will be removed by running mkfontscale.

Last edited by Wildflower (2026-04-12 12:08:25)

Offline

#10 2026-04-12 13:21:36

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 74,647

Re: mkfontscale deletes both encodings.dir files

If it wasn't some encodings.dir would be written after deleting the present one.

Also, package xorg-mkfontscale has a build date of 09 apr 2026 19:04:40 CEST, and package xorg-fonts-encodings has a build date of 09 apr 2026 19:01:44 CEST.

https://gitlab.archlinux.org/archlinux/ … mmits/main

upgpkg: 1.2.3-2: Rebuild packages older than two years

And the encodings.dir files were never removed before by running mkfontscale.

Not removed or regenerated?

Offline

#11 2026-04-12 16:59:48

Wildflower
Member
Registered: 2026-04-09
Posts: 7

Re: mkfontscale deletes both encodings.dir files

Oh man. Another possibility gone.

Removed. Deleted. AWOL. MIA. smile
I never saw this before:

warning: could not get file information for usr/share/fonts/encodings/encodings.dir
warning: could not get file information for usr/share/fonts/encodings/large/encodings.dir

I reproduced the removal of the two files in post #3 of this thread. At the very end.

And I haven't found out yet which process spits out those two lines. I did a quick search in the non-binaries, system wide, but without success with:

sudo grep -rnwI / --colour --devices=skip --exclude-dir=sys --exclude-dir=proc -iEe '*could not get file information for*'
[sudo] password for wildflower:              
grep: warning: * at start of expression
grep: /run/user/1000/gvfs: Permission denied
grep: /run/user/1000/doc: Permission denied

Last edited by Wildflower (2026-04-12 17:01:25)

Offline

#12 2026-04-12 20:01:45

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 74,647

Re: mkfontscale deletes both encodings.dir files

Removed. Deleted. AWOL. MIA

No, I meant whether you're sure that those files had not been recreated by mkfontscale (because either that happened or the directory wasn't touched at all)

And I haven't found out yet which process spits out those two lines.

https://wiki.archlinux.org/title/Audit_ … ies_access

Edit: it's not very likely but you could still try to downgrade the two packages (undoing the procedural rebuild)
It *could* be that the difference *could* be caused by some inherited inline function. Operative term is "could", though.

Last edited by seth (2026-04-12 20:04:11)

Offline

#13 2026-04-13 00:05:14

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 577

Re: mkfontscale deletes both encodings.dir files

Wildflower wrote:

Running this command removes both encodings.dir files:

sudo mkfontscale -- "/usr/share/fonts/100dpi" "/usr/share/fonts/75dpi" "/usr/share/fonts/misc" "/usr/share/fonts/TTF" "/usr/share/fonts/OTF" "/usr/share/fonts/noto" "/usr/share/fonts/Type1" "/usr/share/fonts/cantarell" "/usr/share/fonts/cyrillic" "/usr/share/fonts/encodings" "/usr/share/fonts/encodings/large" "/usr/share/fonts/gsfonts" "/usr/share/fonts/oiio" "/usr/share/fonts/util" "/usr/share/fonts/awesome-terminal-fonts" "/usr/local/share/fonts"

Why do you run this command in the first place?

xorg-mkfontscale.hook has

Target = usr/share/fonts/*/
Target = !usr/share/fonts/encodings/*

so it never pass directories from /usr/share/fonts/encodings/ to mkfontscale.

Offline

#14 2026-04-13 05:04:42

Wildflower
Member
Registered: 2026-04-09
Posts: 7

Re: mkfontscale deletes both encodings.dir files

dimich wrote:
Wildflower wrote:

Running this command removes both encodings.dir files:

sudo mkfontscale -- "/usr/share/fonts/100dpi" "/usr/share/fonts/75dpi" "/usr/share/fonts/misc" "/usr/share/fonts/TTF" "/usr/share/fonts/OTF" "/usr/share/fonts/noto" "/usr/share/fonts/Type1" "/usr/share/fonts/cantarell" "/usr/share/fonts/cyrillic" "/usr/share/fonts/encodings" "/usr/share/fonts/encodings/large" "/usr/share/fonts/gsfonts" "/usr/share/fonts/oiio" "/usr/share/fonts/util" "/usr/share/fonts/awesome-terminal-fonts" "/usr/local/share/fonts"

Why do you run this command in the first place?

xorg-mkfontscale.hook has

Target = usr/share/fonts/*/
Target = !usr/share/fonts/encodings/*

so it never pass directories from /usr/share/fonts/encodings/ to mkfontscale.

I don't care what the hook does.
Why don't you read and try to comprehend post #5?

Request to Admins and Mods to move this thread to /dev/null >> Topics Going Nowhere, because now we've entered that stage.

Offline

#15 2026-04-13 05:44:13

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 577

Re: mkfontscale deletes both encodings.dir files

Wildflower wrote:

Why don't you read and try to comprehend post #5?

Sorry, missed that lines.

mkfontscale unconditionally removes encodings.dir and generates new one for font directory according to specified encodings directory. You (1) run it for wrong (non-font) directory, and (2) didn't specify encodings directory.

Wildflower wrote:

depending on the number of arguments (argc) that were passed to function main(). ...I did pass a shed load of font directories. So argc, therefore ll is never going to be zero.

argc doesn't matter for number of encodings. encodingsToDo is not a list of directories passed as positional parameters. It is a list of encodings read from a directory specified with '-e' option (line 218). If you don't specify encodings directory with '-e', number of encodings is 0.

Offline

#16 2026-04-13 06:50:01

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 74,647

Re: mkfontscale deletes both encodings.dir files

The thread is basically around

Wildflower wrote:

Why did mkfontscale start to delete encodings.dir files?

but meantime that most likely just means

I never saw this before:

warning: could not get file information for usr/share/fonts/encodings/encodings.dir
warning: could not get file information for usr/share/fonts/encodings/large/encodings.dir

which is either because there's a new warning somewhere or the OP previously simply didn't look.

Request to Admins and Mods to move this thread to /dev/null >> Topics Going Nowhere, because now we've entered that stage.

Not if you audit the access to those files to catch the process informing you that your "old learned habit" is completely wrong.

Offline

#17 2026-04-13 07:50:51

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 577

Re: mkfontscale deletes both encodings.dir files

warning: could not get file information for usr/share/fonts/encodings/encodings.dir
warning: could not get file information for usr/share/fonts/encodings/large/encodings.dir

These lines are printed by pacman when it calculates disk space freed due to removal/upgrade of package owning that files. Obviously, TS couldn't see them for at least two years (until xorg-fonts-encodings package got updated), despite encodings.dir always being deleted by "old learned habit".

Last edited by dimich (2026-04-13 08:16:23)

Offline

Board footer

Powered by FluxBB