LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   GRUB Customization (fonts) (https://www.linuxquestions.org/questions/linux-general-1/grub-customization-fonts-4175428549/)

steak1987 09-22-2012 12:08 PM

GRUB Customization (fonts)
 
Hey, im trying to customize grub, ive already got my background of choice :

http://fwallpapers.com/files/imageca...s/computer.jpg

Im now trying to change the font to this old windows font called westminster :

http://www.fonts101.com/fonts/view/S...19/Westminster

http://www.fonts101.com/previews/199...ew_17919_2.png


I installed the font, but when I opened grub-customizer I wasnt given the option to select that font. Anybody have any clues how to use that font for the GRUB menu ?

leosubhadeep 09-22-2012 01:56 PM

No sweat
 
Before trying grub-customizer (which is the best option, of course), you might be interested on putting your own hands on GRUB:

http://askubuntu.com/questions/11846...ault-grub-font

And for GRUB2: https://help.ubuntu.com/community/Grub2

Find something in GRUB manual: http://www.gnu.org/software/grub/man...ode/index.html

Go below the page and read the discussions. May be that work for you! You must, of course, take necessary backups!

To minimize your search, I make a quote here:

[QUOTE]What worked for me:

Using gbdfed to generate the 'bdf' file from a console font (eg. '/usr/share/consolefonts/Lat15-VGA16.psf'): File > Import > Console Font, then File > Save As...
Converting only the ASCII characters with grub-mkfont:

grub-mkfont --output=out.pf2 --range=0x0-0x7f out.bdf[//QUOTE]

Please note that updation and procedures of grub/grub2 has been changed since the post. For example, you should use:
Code:

sudo grub-mkconfig -o /boot/grub/grub.cfg
after each change in GRUB.

Lastly, use grub-customizer with care. I haven't tested it, as I have always done that manually and now, I have an urguably better one: YAST (openSUSE)!! :)

leosubhadeep 09-22-2012 02:28 PM

Update: Downloaded and checked Grub-Customizer
 
After my previous post, I downloaded and checked Grub-customizer. I'd suggest you use other fonts like sans.

Also don't forget to manually check things like screen resolution in:
Quote:

/etc/default/grub

steak1987 09-23-2012 09:50 AM

When trying the command "grub-mkfont" I get the following error:

Code:

grub-mkfont --output=out.pf2 --range=0x0-0x7f westminster.bdf
grub-mkfont: error: can't set 15x15 font size.

What are my options now ?

leosubhadeep 09-23-2012 01:31 PM

Did you try with smaller font size and other fonts? Because, I am unable to locate an error with your mkfont.

However, look at this old thread: http://askubuntu.com/questions/11846...ault-grub-font

Let me know what you get.

steak1987 09-23-2012 10:50 PM

How would I change the size of the font ? This is the output of the gbdfed program "westminister.bdf".


http://www.mediafire.com/?40a1bo6ymymdpec


I cant see any instructions as to how to change the font size. I do apologize, im fairly new to linux so if its an ovbious command, I may not see it as such.

leosubhadeep 09-24-2012 02:24 PM

Well, it seems you are missing some things.

Make sure you are working with root privileges. As I mentioned earlier, I didn't try grub-customizer because I didn't need to, I can give you links that might help you.

1. First read this (you don't have to read it all, just read necessary parts): http://ubuntuforums.org/showthread.php?t=1664134

2. Next, go to the launchpad to get some help. If you want, ask there to clear your doubts or report a bug: https://launchpad.net/grub-customizer

3. I don't know why you need grub-mkfont if you have the font made as bdf in mediafire, the grub-customizer should allow it. I also don't have an idea if grub-customizer can't create a grub font for you. However, try
Code:

info grub-mkfont
to get full help on grub-mkfont.

4. You can find how to set size of font in here: http://www.fredprod.com/cgi-bin/man/...?grub-mkfont+1

Hope it helps. All the best. :)

steak1987 10-13-2012 09:32 AM

Quote:

Originally Posted by leosubhadeep (Post 4788258)
Well, it seems you are missing some things.

Make sure you are working with root privileges. As I mentioned earlier, I didn't try grub-customizer because I didn't need to, I can give you links that might help you.
...[ ... ] .....

Hope it helps. All the best. :)

Im sorry for my tardiness and late replies, I've been away from my PC for a while. I think I might be coming near the end of this. Yes, I am using root privileges for the commands.

I opened up the grub file directly, and managed to find this interesting looking string.

Code:

set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root be6c4640-7368-4aad-929b-d3be0ff2804b
if loadfont /boot/grub/unicode.pf2 ; then
  set gfxmode=1024x768x24
  load_video
  insmod gfxterm

Since I cant find font anywhere else in the document, that string must be what sets the font :D.
I opened
Code:

/boot/grub
in nautilus (sudo'd ofcourse) and I was able to see the actual file.

All I needed to do now is to figure out a way to convert BDF to PF2 and then simply replace the file, cross my fingers, and pray it would work . I tried a bit of googling around, and I managed to find this :

http://grub.gibibit.com/New_font_format

However, again, I was told of grub-mkfont. I tried my terminal skills, and punched in this command.

Code:

grub-mkfont --in=westminster.bdf --out=font.pf2
The resulting file was suspiciously small, only 150 bytes, compared to unicode.pf2 which was about 10Kb.

I dont want to risk borking up my grub, on a file which im confident isnt the converted font.

tl;dr : Is there any other way I can convert a bdf font file to a pf2 file ?

leosubhadeep 10-16-2012 05:25 PM

Sorry for late reply and hope your prob is solved. If not, try editing grub theme file after taking a backup. It's a text file and if you have knowledge of css terms, you can handle it. BTW, how did you try grub customizer?

leosubhadeep 10-19-2012 03:13 AM

Quote:

Originally Posted by steak1987 (Post 4804690)
Is there any other way I can convert a bdf font file to a pf2 file ?[/B]

No idea. But I googled your question and found this: http://askubuntu.com/questions/11846...ault-grub-font

steak1987 10-26-2012 09:53 AM

Quote:

Originally Posted by leosubhadeep (Post 4809728)
No idea. But I googled your question and found this: http://askubuntu.com/questions/11846...ault-grub-font

I also stumbled upon that question, but I couldnt see how it told me about the font conversion.

I did try the command that was suggested, but it didnt work out for me.

Quote:

grub-mkfont --output=out2.pf2 --range0x0-0x7f westminster.bdf
grub-mkfont: unrecognized option '--range0x0-0x7f'
Try `grub-mkfont --help' for more information.
For grub customizer, I followed these instructions :

https://launchpad.net/~danielrichter...rub-customizer

jvrounds@att.net 05-12-2020 08:35 PM

default font in GRUB2
 
I am trying to restore the GRUB font to its default. I was able to see something about a unicode.pf2 font in a grub.cfg file but have not been able to add that font using "grub-customizer". I WAS able to get the font size up to something that didn't require a magnifying glass to read.B2
This obviously isn't a reply, it is a new question (for me). I couldn't figure out where else to put it.


All times are GMT -5. The time now is 01:57 PM.