Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom theme fonts
#1
Playing around with Ventoy and themes I found that the theme fonts (or custom fonts I create) are not loaded unless I add the to the EFI partition under grub/fonts and then edit grub.cfg and add them in using loadfonts.  I'm no grub expert so maybe there is a better way to to do this that is more dynamic?  Or is this a feature request to be something that is configurable in the theme object in ventoy.json?
Reply
#2
@PlumberOfSound
can you try this file

https://yadi.sk/d/6ScG7kbjaDgeBA
Reply
#3
To give an example: 

I'm trying out the custom themes and am working with https://github.com/shvchk/fallout-grub-theme.  It has a custom grub font fixedsys-regular-32.pf2 that is part of the theme and is distributed in the theme folder.  However, the provided font does not get loaded and the font defaults to the only font specified in the grub/grub.cfg in the EFI partition as 'loadfont ascii' (grub/fonts/ascii.pf2)  Adding fixedsys-regular-32.pf2 to grub/fonts/ on the EFI partition and loading it with an additional loadfont line resolves the issue.  (ascii.pf2 is not missing).  It may be that how grub is being rebuilt after adding the theme that it is not adding the font to the conf.

Sidenote: for anyone who wants to try out fallout-grub-theme, it works great, just a couple tips: the included font is too large (32).  To address this simply build a new font, follow the above (until there is an alternative), and update the theme.txt. 

Font source: https://www.download-free-fonts.com/deta...-excelsior

How to convert a font for use with grub: http://wiki.rosalab.ru/en/index.php/Grub...tion_guide

I built one for normal menu and one for when highlighted:

Code:
grub-mkfont -o fixedsys-ligatures.pf2 -s 16 fixedsys-ligatures.ttf

grub-mkfont -o fixedsys-ligatures_bold.pf2 -s 16 -b fixedsys-ligatures.ttf

I made did some other small tweaks that I can share if anyone is interested.
Reply
#4
(05-26-2020, 03:33 PM)PlumberOfSound Wrote: I made did some other small tweaks that I can share if anyone is interested.

I'd be interested in your completed version of this Wink, as I can't be bothered fiddling about with fonts etc Big Grin Thx.
Reply
#5
I open a bug for this bug with a example for a solution

https://github.com/ventoy/Ventoy/issues/245
Reply
#6
I have added it to the plan of 1.0.14.
https://github.com/ventoy/Ventoy/issues/243
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)