Discussion:
Increase font size of GRUB menu?
Richard Owlett
2016-10-18 13:51:00 UTC
Permalink
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
2016-10-18 14:20:21 UTC
Permalink
Post by Richard Owlett
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.]
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
2016-10-18 15:22:24 UTC
Permalink
Post by Darac Marjal
Post by Richard Owlett
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.]
# 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
GRUB_FONT=/boot/grub/fonts/example.pf2
Finally,
# update-grub
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.
t***@tuxteam.de
2016-10-18 16:22:30 UTC
Permalink
[...]
[...]
Post by Richard Owlett
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
Darac Marjal
2016-10-18 16:33:15 UTC
Permalink
Post by Richard Owlett
Post by Darac Marjal
Post by Richard Owlett
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.]
# 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
GRUB_FONT=/boot/grub/fonts/example.pf2
Finally,
# update-grub
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.
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.
--
For more information, please reread.
Anthony Baldwin
2016-10-18 19:19:11 UTC
Permalink
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.
Post by Darac Marjal
Post by Richard Owlett
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.]
# 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
GRUB_FONT=/boot/grub/fonts/example.pf2
Finally,
# update-grub
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.
--
http://www.baldwinlinguas.com
translations, localization,
multilingual web development
EN, ES, FR, PT
Brian
2016-10-19 10:37:08 UTC
Permalink
Post by Darac Marjal
Post by Richard Owlett
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.]
# 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
GRUB_FONT=/boot/grub/fonts/example.pf2
Finally,
# update-grub
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.
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.
t***@tuxteam.de
2016-10-19 11:08:29 UTC
Permalink
Post by Brian
Post by Richard Owlett
With GRUB2 on Jessie, how do I increase the menu's font _size_ .
[...]
Post by Brian
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
Richard Owlett
2016-10-19 14:22:00 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Brian
Post by Richard Owlett
With GRUB2 on Jessie, how do I increase the menu's font _size_ .
[...]
Post by Brian
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
[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.
t***@tuxteam.de
2016-10-19 14:39:48 UTC
Permalink
Post by Richard Owlett
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Brian
Post by Richard Owlett
With GRUB2 on Jessie, how do I increase the menu's font _size_ .
[...]
Post by Brian
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
Hans
2016-10-19 14:56:00 UTC
Permalink
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
2016-10-19 16:17:01 UTC
Permalink
Post by Richard Owlett
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.
Post by Richard Owlett
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.
Richard Owlett
2016-10-19 17:44:16 UTC
Permalink
Post by Brian
Post by Richard Owlett
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.
Post by Brian
Post by Richard Owlett
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".
Brian
2016-10-19 19:17:59 UTC
Permalink
Post by Brian
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".
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.
Jonathan Dowland
2016-10-19 16:33:43 UTC
Permalink
Post by Richard Owlett
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.
Richard Owlett
2016-10-19 17:51:32 UTC
Permalink
Post by Jonathan Dowland
Post by Richard Owlett
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.
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
2016-10-19 18:23:18 UTC
Permalink
Post by Jonathan Dowland
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.
The ideal solution would be the ability to specify desired font size in
points. I've not decided on an attainable approximate metric.
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
2016-10-19 18:46:58 UTC
Permalink
Post by Jonathan Dowland
Post by Richard Owlett
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.
The ideal solution would be the ability to specify desired font size in
points.
I've not decided on an attainable approximate metric.
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.
Richard Owlett
2016-10-22 15:33:27 UTC
Permalink
Post by Richard Owlett
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.]
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.

Loading...