Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Increase font size of GRUB menu?

1,420 views
Skip to first unread message

Richard Owlett

unread,
Oct 18, 2016, 10:00:04 AM10/18/16
to
With GRUB2 on Jessie, how do I increase the menu's font _size_ .
A Google search wandered around my problem without addressing it.
I did discover that that GRUB was using a resolution that matched
my monitor's settings.

[When menu comes up go to command mode by typing 'c'. Then enter
'vbeinfo' to see list of supported resolutions. In my case the
active resolution was listed as 1280 x 1024.]

Darac Marjal

unread,
Oct 18, 2016, 10:30:04 AM10/18/16
to
You will need to convert a font of your choice to GRUB's pf2 format:

# grub-mkfont -o /boot/grub/fonts/example.pf2 -s 24
/path/to/Example.ttf

(adjust the names to reflect your chosen font. The parameter to -s is
the font size in pixels).

Next up, tell grub that you want to use your new font. Add this to
/etc/default/grub:

GRUB_FONT=/boot/grub/fonts/example.pf2

Finally,

# update-grub

>
>
>

--
For more information, please reread.

Richard Owlett

unread,
Oct 18, 2016, 11:30:05 AM10/18/16
to
I'm confused. We may be using the term "font" differently. The
existing font family is acceptable. I just wish to change size of
existing font.

to...@tuxteam.de

unread,
Oct 18, 2016, 12:30:05 PM10/18/16
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, Oct 18, 2016 at 10:22:24AM -0500, Richard Owlett wrote:
> On 10/18/2016 9:20 AM, Darac Marjal wrote:

[...]

> >You will need to convert a font of your choice to GRUB's pf2 format:

[...]

> I'm confused. We may be using the term "font" differently. The
> existing font family is acceptable. I just wish to change size of
> existing font.

pf2 fonts are bitmap fonts: it's most probable that "a different size"
for Grub means "a different font". I don't think Grub is in the
business of resizing fonts -- they have to be sized for him before
the fact. Sameness is in the eye of the beholder ;-)

[but take into account that I don't know for sure]

regards
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlgGTEYACgkQBcgs9XrR2kZ0VwCferycSGIZG2r6xobMatqfTcZW
JZoAnRXb97JyCrDfcnGXcIwhbJIG0qG8
=grpT
-----END PGP SIGNATURE-----

Darac Marjal

unread,
Oct 18, 2016, 12:40:04 PM10/18/16
to
On Tue, Oct 18, 2016 at 10:22:24AM -0500, Richard Owlett wrote:
As I understand it, Grub uses bitmap fonts. That is, each character on
screen is a little picture. TrueType fonts, by contrast, are vector
fonts: Each character describes the shape of the letter. TrueType fonts
can be rescaled easily (actually, vector fonts must ALWAYS be scaled),
but bitmap fonts either don't scale, or look terrible when scaled.

I suspect, in order to keep grub's already fairly bulky footprint down,
the developers have elected NOT to put a full font-rendering engine in.
Or rather, that's what grub-mkfont is: it pre-renders the font at a
specified scale, allowing the bootloader to simply paste the images to
screen when showing the menu.

Now, if you want to use the existing font, but render it at a different
scale, then we need to look at what grub uses by default. Apparently,
the default is "unicode.pf2". A bit of staring at the sourcecode
(Makefile.am and configure.ac) tells me that this comes from either GNU
Unifont or DejaVuSans. Fortunately, they're bot available in debian
(ttf-unifont and fonts-dejavu-core), so you should be able to re-render
them at whatever size you like, and get an identical display, but
larger.

Anthony Baldwin

unread,
Oct 18, 2016, 3:40:04 PM10/18/16
to
It's been a while since I saw it, but I swear I once had a graphical
tool for editing various Grub parameters, including the splash screen
image, font, font size, and the grub menu, but I can't find it now.
--
http://www.baldwinlinguas.com
translations, localization,
multilingual web development
EN, ES, FR, PT

Brian

unread,
Oct 19, 2016, 6:40:04 AM10/19/16
to
You presumably want to increase the size of what you *see* on the
screen. Try

GRUB_GFXMODE=640x480

in /etc/default/grub. 'update-grub' and reboot.

--
Brian.

to...@tuxteam.de

unread,
Oct 19, 2016, 7:10:03 AM10/19/16
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Oct 19, 2016 at 11:37:08AM +0100, Brian wrote:
> On Tue 18 Oct 2016 at 10:22:24 -0500, Richard Owlett wrote:
>
> > On 10/18/2016 9:20 AM, Darac Marjal wrote:
> > >On Tue, Oct 18, 2016 at 08:51:00AM -0500, Richard Owlett wrote:
> > >>With GRUB2 on Jessie, how do I increase the menu's font _size_ .

[...]

> You presumably want to increase the size of what you *see* on the
> screen. Try
>
> GRUB_GFXMODE=640x480
>
> in /etc/default/grub. 'update-grub' and reboot.

Brilliant. Brian, you were the only who could peer through the the XY
problem's fog [1]. Thanks for that [2].

[1] http://xyproblem.info/
[2] No, I'm not the original poster. I might well be wrong. But the
evidence is so blazing that I can't hardly see anything else :-)
Apologies to Richard if I'm wrong.

Regards
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlgHVC0ACgkQBcgs9XrR2kahgACfYNckYcqg0S4y1+46mOsEHNtc
a6UAniw/Vul9ObZHOGdLRvGi8mhi7aFK
=d7fh
-----END PGP SIGNATURE-----

Richard Owlett

unread,
Oct 19, 2016, 10:30:06 AM10/19/16
to
On 10/19/2016 6:08 AM, to...@tuxteam.de wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Wed, Oct 19, 2016 at 11:37:08AM +0100, Brian wrote:
>> On Tue 18 Oct 2016 at 10:22:24 -0500, Richard Owlett wrote:
>>
>>> On 10/18/2016 9:20 AM, Darac Marjal wrote:
>>>> On Tue, Oct 18, 2016 at 08:51:00AM -0500, Richard Owlett wrote:
>>>>> With GRUB2 on Jessie, how do I increase the menu's font _size_ .
>
> [...]
>
>> You presumably want to increase the size of what you *see* on the
>> screen. Try
>>
>> GRUB_GFXMODE=640x480
>>
>> in /etc/default/grub. 'update-grub' and reboot.
>
> Brilliant. Brian, you were the only who could peer through the the XY
> problem's fog [1]. Thanks for that [2].

It's not _quite_ an 'XY Problem'. The OP hath declared. <grin>
It may be its first cousin. There is a not explicitly stated
solution constraint.
In my case I wish to use default resolution of current
driver/monitor combination.
I install to multiple machine/monitor permutations.
My optimal solution will be of the form [*NOT* checked for syntax
yet]
grub-mkfont -o /boot/grub/fonts/unicode.pf2 -s MYSIZE
/path/to/Example.ttf

to...@tuxteam.de

unread,
Oct 19, 2016, 10:50:04 AM10/19/16
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Oct 19, 2016 at 09:22:00AM -0500, Richard Owlett wrote:
> On 10/19/2016 6:08 AM, to...@tuxteam.de wrote:
> >-----BEGIN PGP SIGNED MESSAGE-----
> >Hash: SHA1
> >
> >On Wed, Oct 19, 2016 at 11:37:08AM +0100, Brian wrote:
> >>On Tue 18 Oct 2016 at 10:22:24 -0500, Richard Owlett wrote:
> >>
> >>>On 10/18/2016 9:20 AM, Darac Marjal wrote:
> >>>>On Tue, Oct 18, 2016 at 08:51:00AM -0500, Richard Owlett wrote:
> >>>>>With GRUB2 on Jessie, how do I increase the menu's font _size_ .
> >
> >[...]
> >
> >>You presumably want to increase the size of what you *see* on the
> >>screen. Try
> >>
> >> GRUB_GFXMODE=640x480
> >>
> >>in /etc/default/grub. 'update-grub' and reboot.
> >
> >Brilliant. Brian, you were the only who could peer through the the XY
> >problem's fog [1]. Thanks for that [2].
>
> It's not _quite_ an 'XY Problem'. The OP hath declared. <grin>
> It may be its first cousin. There is a not explicitly stated
> solution constraint.

OK, apologies then (see footnote 2 ;-)

Regards
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlgHhbQACgkQBcgs9XrR2kb3TwCeNZ2xA85TLvrKHnlN62BnHVu4
+UwAn1ZU8W1Ul+A+6tVRJ/x7806vJNIW
=Q3hK
-----END PGP SIGNATURE-----

Hans

unread,
Oct 19, 2016, 11:00:05 AM10/19/16
to
Hi,

to change the resolution at boot makes EVERYTHING bigger: the picture, the
fonts and so on.

Isn't the font not beeing created by the file /boot/grub/fonts/unicode.pf2?
I believe, to exchange this against another file might increase the font.

However, I do still not know, which format this file is and how to create an
own one. Maybe someone else is knowing more.

Best

Hans

Brian

unread,
Oct 19, 2016, 12:20:04 PM10/19/16
to
On Wed 19 Oct 2016 at 09:22:00 -0500, Richard Owlett wrote:

> It's not _quite_ an 'XY Problem'. The OP hath declared. <grin>
> It may be its first cousin. There is a not explicitly stated solution
> constraint.
> In my case I wish to use default resolution of current driver/monitor
> combination.
> I install to multiple machine/monitor permutations.

From

https://www.gnu.org/software/grub/manual/html_node/gfxmode.html

The default is ‘auto’, which selects a platform-specific
default that should look reasonable.

I wonder if your "default" is the same as GRUB's "default". Also,
whatever default resolution you get will affect the perceived font
size, no matter what font face is used.

> My optimal solution will be of the form [*NOT* checked for syntax yet]
> grub-mkfont -o /boot/grub/fonts/unicode.pf2 -s MYSIZE
> /path/to/Example.ttf

Do you really want to overwrite the system's unicode.pf2?

--
Brian.

Jonathan Dowland

unread,
Oct 19, 2016, 12:40:04 PM10/19/16
to
On Wed, Oct 19, 2016 at 09:22:00AM -0500, Richard Owlett wrote:
> It's not _quite_ an 'XY Problem'. The OP hath declared. <grin>
> It may be its first cousin. There is a not explicitly stated solution
> constraint.
> In my case I wish to use default resolution of current driver/monitor
> combination.
> I install to multiple machine/monitor permutations.

This is an interesting problem. You are right that changing GRUB's display
resolution will not get consistent results across multiple machines (with
different native/default resolutions, etc. -- and different screens with
different DPIs)

However, the same is true for different font sizes. A system with a higher DPI
will show the same size font physically smaller than another with a lower DPI.
signature.asc

Richard Owlett

unread,
Oct 19, 2016, 1:50:04 PM10/19/16
to
On 10/19/2016 11:17 AM, Brian wrote:
> On Wed 19 Oct 2016 at 09:22:00 -0500, Richard Owlett wrote:
>
>> It's not _quite_ an 'XY Problem'. The OP hath declared. <grin>
>> It may be its first cousin. There is a not explicitly stated solution
>> constraint.
>> In my case I wish to use default resolution of current driver/monitor
>> combination.
>> I install to multiple machine/monitor permutations.
>
> From
>
> https://www.gnu.org/software/grub/manual/html_node/gfxmode.html
>
> The default is ‘auto’, which selects a platform-specific
> default that should look reasonable.
>
> I wonder if your "default" is the same as GRUB's "default". Also,
> whatever default resolution you get will affect the perceived font
> size, no matter what font face is used.

Interesting problem set. I've some glimmerings. Working on a
'formal' definition of the problem set.

>
>> My optimal solution will be of the form [*NOT* checked for syntax yet]
>> grub-mkfont -o /boot/grub/fonts/unicode.pf2 -s MYSIZE
>> /path/to/Example.ttf
>
> Do you really want to overwrite the system's unicode.pf2?
>

I my specific use case, I think so. It illustrates why I do not
consider my original post to not quite be a 'XY Problem'. I'm
working on optimizing Debian install to match some personal ideas
on the optimal "look and feel" of a *nix system. Carried to its
logical conclusion, what I'm working towards would be near
dividing line between a "Debian Pure Blend" and a "Debian
Derivative".

Richard Owlett

unread,
Oct 19, 2016, 2:00:04 PM10/19/16
to
The ideal solution would be the ability to specify desired font
size in points.
I've not decided on an attainable approximate metric.

Felix Miata

unread,
Oct 19, 2016, 2:30:03 PM10/19/16
to
Richard Owlett composed on 2016-10-19 12:51 (UTC-0500):
I seriously doubt you'll find any support for the display density dependence
required to use the physical unit that is pt from the kernel.

Sizing objects in most computing contexts is geared more heavily to pixels
now than ever before. The concept of WYSIWYG is in atrophy outside of word
processing environments. When one sees a number associated with text size in
a computing environment one can generally only guess whether it means px or
pt or something else altogether.

Browser makers several years ago dispensed with all physical units in a
screen context, arbitrarily making the pt unit exactly equal to the px unit
in order to reduce unexpected behavior from incompetently styled web pages,
keeping physical units only for a printing context.

What you're attempting to do I don't even try. All my machines are multiboot.
I deal with boot menu text size simply by making it big without much regard
to the display to be used or its native resolution. And, I do it with Grub
Legacy and Gfxboot (both from openSUSE), which I install myself and manage
myself, and keep in a primary partition that never gets mounted to /boot.
Gfxboot can be configured to display the selected stanza's kernel cmdline
automatically. On each, I include the most common parameters affecting
framebuffer configuration at or near the end of the line. If the last listed
is suitable for the display, I simply hit enter. If not, it's ready to edit
with a minimum of keystrokes. I find with the text sizes I prefer on a full
(framebuffer) screen that native screen resolution is a non-issue, so nearly
always use one that is lower than native except running Xorg.
--
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)

Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata *** http://fm.no-ip.com/

Brian

unread,
Oct 19, 2016, 2:50:05 PM10/19/16
to
As Jonathan Dowland says, the interplay between screen resolution, DPI
and font size makes this an interesting problem. With the present GRUB,
booting a USB stick and having all displays look nearly the same is
probably an insoluable problem.

What I do is fix gfxmode at 1024x728, find a font size from experiment
and cross my fingers. This mostly works on different machines. It comes
to mind (and I have had no opportunity to try it) to have different GRUB
stanzas with different gfxmode resolutions and font sizes for different
displays.

--
Brian.

Brian

unread,
Oct 19, 2016, 3:20:04 PM10/19/16
to
unicode.pf2 is the default font. It will not be used if another .psf
file is specified. Let the poor thing live! It is doing no harm and
might be needed if the one being used is discarded.

--
Brian.

Richard Owlett

unread,
Oct 22, 2016, 11:40:03 AM10/22/16
to
Please note the "MY solution" in the subject line as I did not
follow some advice in this thread. In ways this IS an "XY
Problem" as I never specified some goals and constraints.

SOURCES:
1. this thread
2.
https://www.gnu.org/software/grub/manual/html_node/Theme-file-format.html#Fonts
3. https://community.linuxmint.com/tutorial/view/1357
4. http://grub.gibibit.com/New_font_format
5. https://manned.org/grub-mkfont.1

PROCEDURE:
[AS ROOT]
apt-get install ttf-unifont
grub-mkfont -s 32 -o /boot/grub/fonts/unicode.pf2 \
/usr/share/fonts/truetype/unifont/unifont.ttf

COMMENTS:
1. I chose a character height of 32 pixels as on my 1024 line
screen that
gives me a nominal 32 lines of text per screen.
2. I chose to replace the existing unicode.pf2 file as that
gives a single
change point if I later desire a different character
height. I don't
foresee it ever being changed during the life of the
installation. It is
my intention to work it into my preseed.cfg file - must do
more research on how.
0 new messages