Skip to content

nixos/fontconfig: fix allowBitmaps option#450484

Merged
misuzu merged 1 commit into
NixOS:staging-nixosfrom
mcsimw:fix-bitmap-fonts-staging-nixos
Oct 13, 2025
Merged

nixos/fontconfig: fix allowBitmaps option#450484
misuzu merged 1 commit into
NixOS:staging-nixosfrom
mcsimw:fix-bitmap-fonts-staging-nixos

Conversation

@mcsimw

@mcsimw mcsimw commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

Things done

This change removes the new bitmap rejection config file when allowBitmaps is true, restoring the intended behavior and allowing bitmap fonts like Spleen and Terminus to work correctly.

Fixes #449657

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Oct 9, 2025
@Soveu

Soveu commented Oct 10, 2025

Copy link
Copy Markdown
Contributor

#449715 (comment)

Is it present in /etc/fonts/conf.d? I don't think they get symlinked there in older revisions of nixpkgs.

Interesting, I don't see it there, while it is present on my work laptop, so you were right

@Soveu

Soveu commented Oct 10, 2025

Copy link
Copy Markdown
Contributor

I'm curious, could we do a bisection of nixpkgs to find the commit which introduced this issue?

@mcsimw

mcsimw commented Oct 10, 2025

Copy link
Copy Markdown
Contributor Author

@Soveu

I don't really know what I am doing so this may be be nonsense

[mcsimw@eldritch:~]$ ls -al /etc/fonts/conf.d/
total 45
dr-xr-xr-x 2 root root  29 Dec 31  1969 .
dr-xr-xr-x 4 root root   6 Dec 31  1969 ..
lrwxrwxrwx 1 root root  66 Dec 31  1969 00-nixos-cache.conf -> /nix/store/hbavmzndg1xa2w49h59x7h7yb44g5pc0-fc-00-nixos-cache.conf
lrwxrwxrwx 1 root root 110 Dec 31  1969 10-hinting-none.conf -> /nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1/share/fontconfig/conf.avail/10-hinting-none.conf
lrwxrwxrwx 1 root root  70 Dec 31  1969 10-nixos-rendering.conf -> /nix/store/96yinphvwgs7gpxhcmygkpvxwlnvs9vd-fc-10-nixos-rendering.conf
lrwxrwxrwx 1 root root 105 Dec 31  1969 10-scale-bitmap-fonts.conf -> /nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1/etc/fonts/conf.d/10-scale-bitmap-fonts.conf
lrwxrwxrwx 1 root root 101 Dec 31  1969 10-sub-pixel-none.conf -> /nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1/etc/fonts/conf.d/10-sub-pixel-none.conf
lrwxrwxrwx 1 root root 100 Dec 31  1969 10-yes-antialias.conf -> /nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1/etc/fonts/conf.d/10-yes-antialias.conf
lrwxrwxrwx 1 root root 112 Dec 31  1969 11-lcdfilter-none.conf -> /nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1/share/fontconfig/conf.avail/11-lcdfilter-none.conf
lrwxrwxrwx 1 root root 104 Dec 31  1969 20-unhint-small-vera.conf -> /nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1/etc/fonts/conf.d/20-unhint-small-vera.conf
lrwxrwxrwx 1 root root 101 Dec 31  1969 30-metric-aliases.conf -> /nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1/etc/fonts/conf.d/30-metric-aliases.conf
lrwxrwxrwx 1 root root  95 Dec 31  1969 40-nonlatin.conf -> /nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1/etc/fonts/conf.d/40-nonlatin.conf
lrwxrwxrwx 1 root root  94 Dec 31  1969 45-generic.conf -> /nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1/etc/fonts/conf.d/45-generic.conf
lrwxrwxrwx 1 root root  92 Dec 31  1969 45-latin.conf -> /nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1/etc/fonts/conf.d/45-latin.conf
lrwxrwxrwx 1 root root  94 Dec 31  1969 48-spacing.conf -> /nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1/etc/fonts/conf.d/48-spacing.conf
lrwxrwxrwx 1 root root  96 Dec 31  1969 49-sansserif.conf -> /nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1/etc/fonts/conf.d/49-sansserif.conf
lrwxrwxrwx 1 root root  91 Dec 31  1969 50-user.conf -> /nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1/etc/fonts/conf.d/50-user.conf
lrwxrwxrwx 1 root root  92 Dec 31  1969 51-local.conf -> /nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1/etc/fonts/conf.d/51-local.conf
lrwxrwxrwx 1 root root  74 Dec 31  1969 52-nixos-default-fonts.conf -> /nix/store/l1c45yhsid0aw62a3dmyxfz60zhx9hva-fc-52-nixos-default-fonts.conf
lrwxrwxrwx 1 root root  73 Dec 31  1969 53-nixos-reject-type1.conf -> /nix/store/sqcdgkmrxfynkwjp9imkqdfvrhxyndqb-fc-53-nixos-reject-type1.conf
lrwxrwxrwx 1 root root  65 Dec 31  1969 53-no-bitmaps.conf -> /nix/store/hxwfjdzz7j9ahhr4cpz5qz3wdjc4657i-fc-53-no-bitmaps.conf
lrwxrwxrwx 1 root root  94 Dec 31  1969 60-generic.conf -> /nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1/etc/fonts/conf.d/60-generic.conf
lrwxrwxrwx 1 root root  92 Dec 31  1969 60-latin.conf -> /nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1/etc/fonts/conf.d/60-latin.conf
lrwxrwxrwx 1 root root 100 Dec 31  1969 65-fonts-persian.conf -> /nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1/etc/fonts/conf.d/65-fonts-persian.conf
lrwxrwxrwx 1 root root  95 Dec 31  1969 65-nonlatin.conf -> /nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1/etc/fonts/conf.d/65-nonlatin.conf
lrwxrwxrwx 1 root root  94 Dec 31  1969 69-unifont.conf -> /nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1/etc/fonts/conf.d/69-unifont.conf
lrwxrwxrwx 1 root root 110 Dec 31  1969 70-no-bitmaps-except-emoji.conf -> /nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1/etc/fonts/conf.d/70-no-bitmaps-except-emoji.conf
lrwxrwxrwx 1 root root  96 Dec 31  1969 80-delicious.conf -> /nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1/etc/fonts/conf.d/80-delicious.conf
lrwxrwxrwx 1 root root  96 Dec 31  1969 90-synthetic.conf -> /nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1/etc/fonts/conf.d/90-synthetic.conf

[mcsimw@eldritch:~]$ nix-store --query --requisites /nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1/etc/fonts/conf.d/70-no-bitmaps-except-emoji.conf
/nix/store/q1y9dk7c1kcz4dgphj0swmxfvn4rr174-dejavu-fonts-minimal-2.37
/nix/store/h3b9pm0a537r513l5qdjkysfrcgb1hv2-fontconfig-2.17.1

Most machines have this dejavu font installed, it is a dep for a lot of things.

the Dejavu build deps have received recent updates perhaps causing this symlink to happen in /etc/fonts/conf.d 🤷‍♂️

nativeBuildInputs = [
   fontforge
   perl
   perlPackages.IOString
   perlPackages.FontTTF
];

I'm curious, could we do a bisection of nixpkgs to find the commit which introduced this issue?

Regarding this, I am not sure. We probably need a more experienced nixpkgs contributor.

@kimine

kimine commented Oct 11, 2025

Copy link
Copy Markdown

I'm curious, could we do a bisection of nixpkgs to find the commit which introduced this issue?

due to #422662 after fontconfig upgraded
Add bitmap-conf build option to choose default bitmap conf

@mcsimw

mcsimw commented Oct 11, 2025

Copy link
Copy Markdown
Contributor Author

I'm curious, could we do a bisection of nixpkgs to find the commit which introduced this issue?

due to #422662 after fontconfig upgraded Add bitmap-conf build option to choose default bitmap conf

nixos-unstable branch had #422662 for already a month, soo that can't be it. This problem was introduced in a very recent revision of nixpkgs.

The /etc/fonts/conf.d directory did not contain a symlink to 70-no-bitmaps-except-emoji.conf in older nixpkgs revisions where 2.17.1 was already used.

Yes the nix store contained 70-no-bitmaps-except-emoji.conf but it was not symlinked to the /etc/fonts/conf.d (at least under normal circumstances).

The commit that started symlinking 70-no-bitmaps-except-emoji.conf to /etc/fonts/conf.d as of the last few days is the problem as far as I can tell.

@kimine

kimine commented Oct 11, 2025

Copy link
Copy Markdown

I'm curious, could we do a bisection of nixpkgs to find the commit which introduced this issue?

due to #422662 after fontconfig upgraded Add bitmap-conf build option to choose default bitmap conf

nixos-unstable branch had #422662 for already a month, soo that can't be it. This problem was introduced in a very recent revision of nixpkgs.

The /etc/fonts/conf.d directory did not contain a symlink to 70-no-bitmaps-except-emoji.conf in older nixpkgs revisions where 2.17.1 was already used.

Yes the nix store contained 70-no-bitmaps-except-emoji.conf but it was not symlinked to the /etc/fonts/conf.d (at least under normal circumstances).

The commit that started symlinking 70-no-bitmaps-except-emoji.conf to /etc/fonts/conf.d as of the last few days is the problem as far as I can tell.

fontconfig 2.17.1 was merged to nixos-unstable last week.
my nix config repo pin rev 7df7ff7d8e00218376575f0acdcc5d66741351.
you can see the fontconfig.nix version was 2.16.2.

@mcsimw

mcsimw commented Oct 11, 2025

Copy link
Copy Markdown
Contributor Author

I'm curious, could we do a bisection of nixpkgs to find the commit which introduced this issue?

due to #422662 after fontconfig upgraded Add bitmap-conf build option to choose default bitmap conf

nixos-unstable branch had #422662 for already a month, soo that can't be it. This problem was introduced in a very recent revision of nixpkgs.
The /etc/fonts/conf.d directory did not contain a symlink to 70-no-bitmaps-except-emoji.conf in older nixpkgs revisions where 2.17.1 was already used.
Yes the nix store contained 70-no-bitmaps-except-emoji.conf but it was not symlinked to the /etc/fonts/conf.d (at least under normal circumstances).
The commit that started symlinking 70-no-bitmaps-except-emoji.conf to /etc/fonts/conf.d as of the last few days is the problem as far as I can tell.

fontconfig 2.17.1 was merged to nixos-unstable last week. my nix config repo pin rev 7df7ff7d8e00218376575f0acdcc5d66741351. you can see the fontconfig.nix version was 2.16.2.

https://github.com/NixOS/nixpkgs/tree/nixos-unstable/pkgs/development/libraries/fontconfig

it looks to me like it happened last month, unless I am not reading something correctly or lacking some understanding.

fontconfig: 2.16.2 -> 2.17.1

last month on github

Also I am on nixpkgs master and noticed it I think the day before I opened the issue which was 3 days ago. And I update multiple times a day my flake, and rebuild multiple times a day.

@kimine

kimine commented Oct 11, 2025

Copy link
Copy Markdown

I'm curious, could we do a bisection of nixpkgs to find the commit which introduced this issue?

due to #422662 after fontconfig upgraded Add bitmap-conf build option to choose default bitmap conf

nixos-unstable branch had #422662 for already a month, soo that can't be it. This problem was introduced in a very recent revision of nixpkgs.
The /etc/fonts/conf.d directory did not contain a symlink to 70-no-bitmaps-except-emoji.conf in older nixpkgs revisions where 2.17.1 was already used.
Yes the nix store contained 70-no-bitmaps-except-emoji.conf but it was not symlinked to the /etc/fonts/conf.d (at least under normal circumstances).
The commit that started symlinking 70-no-bitmaps-except-emoji.conf to /etc/fonts/conf.d as of the last few days is the problem as far as I can tell.

fontconfig 2.17.1 was merged to nixos-unstable last week. my nix config repo pin rev 7df7ff7d8e00218376575f0acdcc5d66741351. you can see the fontconfig.nix version was 2.16.2.

https://github.com/NixOS/nixpkgs/tree/nixos-unstable/pkgs/development/libraries/fontconfig

it looks to me like it happened last month, unless I am not reading something correctly or lacking some understanding.

fontconfig: 2.16.2 -> 2.17.1

last month on github

Also I am on nixpkgs master and noticed it I think the day before I opened the issue which was 3 days ago. And I update multiple times a day my flake, and rebuild multiple times a day.

#444862 was merged into master last week, this PR contain the fontconfig upgrade commit.
https://github.com/NixOS/nixpkgs/pull/444862/files#diff-c8a5cfa1910f5659b9151b8826f55ee4c4ad0ab12475e1a3b43a63d6273bfe1f

@misuzu misuzu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes Terminus for me

@misuzu misuzu merged commit 67bcc4f into NixOS:staging-nixos Oct 13, 2025
38 of 40 checks passed
@mcsimw mcsimw deleted the fix-bitmap-fonts-staging-nixos branch October 19, 2025 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 9.needs: reviewer This PR currently has no reviewers requested and needs attention. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants