Skip to main content
Topic: Broken Font File in galaxy/artix-grub-theme (Read 930 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Broken Font File in galaxy/artix-grub-theme

I've been using grub in silent mode for quite a bit now, and I've always had the issue that I get an error message (only when started in silent mode) that states something along the lines of "Error: Invalid font file: missing some required data"

Today I poked at it a bit deeper, and was unable to resolve the issue by:
1. Moving the theme to the /boot folder
2. Moving only the font file (u_vga_16_16/pf2) to the general grub font folder
3. Attempting a fresh installation of the theme package

So, I dropped down to the grub shell (esc to stop silent boot, and then c to open up the prompt)
and typed in lsfonts. Only the default grub font was listed.

I then attempted to load the font via fontload (hd0,gpt1)/usr/share/grub/themes/artix/u_vga_16_16.pf2 which gave me "Invalid font file: missing some required data".

Because of this I suspect one of two items:
1. There is an issue with the font file of u_vga16_16.pf2 and the theme has only been working due to grub defaulting to the included font in the package
2. There is some bug on the laptop's firmware (It's an Acer c720 running Mr.Chromebox's coreboot+edk2/tianocore) (I don't believe this is the case because the included grub font file loads fine, and I was even able to load a second copy of it manually.)

I wanted to poke through how the font file was generated, but the only source repository I can find for the package has been archived on github which to me atleast indicates that it is out of date. And even if it were not, there appears to be no information on how the file itself was generated(in terms of what file is used to generate the glyphs), so I can't even build a new font file if I wanted to. (Since the package is not on https://gitea.artixlinux.org/artixlinux/packages, where would it's source reside? -- EDIT: Found the repo at https://gitea.artixlinux.org/artix/grub-theme, but the same issue applies regardless)

Of course the obvious solution to my problem is to simply remove the font choice from /usr/share/grub/themes/artix/theme.txt and then rebuild my grub config, but I wanted to make someone aware of this problem


Re: Broken Font File in galaxy/artix-grub-theme

Reply #2
You can generate GRUB pf2 files by using the grub-mkfont(1) command. See
Code: [Select]
$ man 1 grub-mkfont
I'm aware of that. However, I cannot re-generate the font file because it appears no one documented what font was used to make u_vga16_16.pf2 in the first place.

Basically it's just a blob with no way for anyone to verify it hasn't been tampered with or if the font it uses is even license compliant

Re: Broken Font File in galaxy/artix-grub-theme

Reply #3
I'm aware of that. However, I cannot re-generate the font file because it appears no one documented what font was used to make u_vga16_16.pf2 in the first place.

Basically it's just a blob with no way for anyone to verify it hasn't been tampered with or if the font it uses is even license compliant

I believe this package contains the source .bdf for that font:
https://packages.debian.org/buster/console-setup-freebsd-fonts-udeb

More specifically:
http://deb.debian.org/debian/pool/main/c/console-setup/console-setup_1.193~deb10u1.tar.xz
then inside that archive, console-setup/Fonts/bdf/u_vga16*.