mirror of
https://codeberg.org/leana8959/.files.git
synced 2026-02-01 14:39:39 +00:00
vanadium: implement conditional fontsize in fontconfig
This commit is contained in:
parent
e08afde62f
commit
ae75eae20f
1 changed files with 40 additions and 0 deletions
|
|
@ -17,6 +17,46 @@
|
||||||
monospace = [ "IosevkaPTMono" ];
|
monospace = [ "IosevkaPTMono" ];
|
||||||
emoji = [ "Noto Color Emoji" ];
|
emoji = [ "Noto Color Emoji" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
configFile = {
|
||||||
|
thick-iosevka = {
|
||||||
|
enable = true;
|
||||||
|
# https://www.freedesktop.org/software/fontconfig/fontconfig-user.html
|
||||||
|
# https://gist.github.com/yuttie/adb22a6c07ef8e75d82e48d5484b7ad8
|
||||||
|
# https://github.com/N1k3YB/CS2FontChanger_ru/blob/5f1d8189220f42286d773c536ff83a49b2556da2/app.py#L227
|
||||||
|
#
|
||||||
|
# Use the following script to test
|
||||||
|
# for size in (seq 9 15)
|
||||||
|
# echo
|
||||||
|
# echo
|
||||||
|
# for weight in {regular,medium,bold}
|
||||||
|
# echo "weight=$weight:size=$size"
|
||||||
|
# fc-match "mono:weight=$weight:size=$size"
|
||||||
|
# end
|
||||||
|
# end | less
|
||||||
|
text = /* xml */ ''
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
||||||
|
<fontconfig>
|
||||||
|
<match target="pattern">
|
||||||
|
<test name="family" compare="contains"><string>Iosevka</string></test>
|
||||||
|
<edit name="weight" mode="assign" binding="strong">
|
||||||
|
<if> <eq><name>weight</name><const>bold</const></eq> <!-- then --> <const>bold</const>
|
||||||
|
<if> <eq><name>weight</name><const>medium</const></eq> <!-- then --> <const>medium</const>
|
||||||
|
<!-- not bold nor medium -->
|
||||||
|
<if> <more><name>size</name><double>15</double></more> <!-- then --> <const>regular</const>
|
||||||
|
<if> <more><name>size</name><double>10</double></more> <!-- then --> <const>medium</const>
|
||||||
|
<!-- else --> <const>bold</const>
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
</edit>
|
||||||
|
</match>
|
||||||
|
</fontconfig>
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.noto-fonts
|
pkgs.noto-fonts
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue