Commit 84da18e
committed
contrib/: expand font setting capabilities
ZFSBootMenu binary releases use a default font size that's barely
suitable for 2k screens and entirely unsuitable for 4k screens. In an
attempt to fix this, a new script has been added that introduces
automatic console font resizing.
Utilizing the Terminus font, we can pick a range of bold font sizes to
better match screen resolutions. Working backwards from the largest to
the smallest, the hook simply runs `setfont` and then checks if COLUMNS
is at least 100 characters. If it is not, the next font is selected and
it tries again.
Based on documentation, Terminus fonts prefixed with a 'v' have all
mappings/codepages in them; so they should support the maximal number of
languages.
contrib/20-console-autosize.sh is included in all release and recovery
images. The automatic font setting behavior can be disabled via
zbm.autosize=(0|off).
contrib/console-init.sh has been renamed to ensure it precedes this
hook, since 10-console-init.sh calls console_init from Dracut, which is
hard-coded to set a console font. Since console_init also performs setting
a keymap, it should always be executed.
The legacy behavior of setting a font via rd.vconsole.font
overrides/disables zbm.autosize.1 parent 886b833 commit 84da18e
File tree
5 files changed
+47
-2
lines changed- contrib
- testing
5 files changed
+47
-2
lines changedFile renamed without changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
237 | 245 | | |
238 | 246 | | |
239 | 247 | | |
| |||
0 commit comments