stylix icon indicating copy to clipboard operation
stylix copied to clipboard

plymouth: set custom font

Open Jeidnx opened this issue 10 months ago • 3 comments

Sets the user configured font in plymouth. On my setup plymouth only seemed to accept / work with truetype fonts and i didn't find any documentation for plymouth mentioning fonts at all, so the script checks for that first and falls back to converting another font format to ttf with fontforge.

Jeidnx avatar Apr 12 '24 13:04 Jeidnx

@trueNAHO Requesting a review since you've been doing a lot of work around bash scripts recently, so you may be interested in this new one.

danth avatar Apr 17 '24 08:04 danth

I have since read more about fonts in plymouth and as i understand it only truetype and opentype are supported with opentype being the preferred format. I am not sure if there is a way to have the derivation point to a .otf or .ttf file, or if the extension even needs to be in the name of the derivation for that matter, so i chose to ignore truetype and convert everything that is not already opentype to that format instead. If anyone has a way of allowing both formats input would be appreciated :)

Jeidnx avatar May 06 '24 14:05 Jeidnx

I have since read more about fonts in plymouth and as i understand it only truetype and opentype are supported with opentype being the preferred format. I am not sure if there is a way to have the derivation point to a .otf or .ttf file, or if the extension even needs to be in the name of the derivation for that matter, so i chose to ignore truetype and convert everything that is not already opentype to that format instead. If anyone has a way of allowing both formats input would be appreciated :)

I have not done any further research on this, but would it be possible to extract the font types from certain paths? Maybe the nerdfont package is helpfull: https://github.com/NixOS/nixpkgs/blob/nixos-23.11/pkgs/data/fonts/nerdfonts/default.nix.

For reference, there is an open issue regarding fonts: https://github.com/danth/stylix/issues/308.

trueNAHO avatar May 08 '24 18:05 trueNAHO