nixos/fontdir: gather more font formats
- Fix wrong order in which font indexes are created mkfontdir requires the file fonts.scale to consider scalable fonts, thus, mkfontscale should be run before - Search more font formats, in particular, bit-mapped formats
This commit is contained in:
parent
e940c41a9c
commit
a5618e6187
@ -5,14 +5,16 @@ with lib;
|
|||||||
let
|
let
|
||||||
|
|
||||||
x11Fonts = pkgs.runCommand "X11-fonts" { preferLocalBuild = true; } ''
|
x11Fonts = pkgs.runCommand "X11-fonts" { preferLocalBuild = true; } ''
|
||||||
|
font_formats=('ttf' 'otf' 'pcf' 'pfa' 'pfb' 'bdf')
|
||||||
mkdir -p "$out/share/X11-fonts"
|
mkdir -p "$out/share/X11-fonts"
|
||||||
|
for fmt in "''${font_formats[@]}"; do
|
||||||
find ${toString config.fonts.fonts} \
|
find ${toString config.fonts.fonts} \
|
||||||
\( -name fonts.dir -o -name '*.ttf' -o -name '*.otf' \) \
|
\( -name '*.'$fmt -o -name '*.'$fmt'.gz' \) \
|
||||||
-exec ln -sf -t "$out/share/X11-fonts" '{}' \;
|
-exec ln -sf -t "$out/share/X11-fonts" '{}' \;
|
||||||
|
done
|
||||||
cd "$out/share/X11-fonts"
|
cd "$out/share/X11-fonts"
|
||||||
rm -f fonts.dir fonts.scale fonts.alias
|
|
||||||
${pkgs.xorg.mkfontdir}/bin/mkfontdir
|
|
||||||
${pkgs.xorg.mkfontscale}/bin/mkfontscale
|
${pkgs.xorg.mkfontscale}/bin/mkfontscale
|
||||||
|
${pkgs.xorg.mkfontdir}/bin/mkfontdir
|
||||||
cat $(find ${pkgs.xorg.fontalias}/ -name fonts.alias) >fonts.alias
|
cat $(find ${pkgs.xorg.fontalias}/ -name fonts.alias) >fonts.alias
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user