aboutsummaryrefslogtreecommitdiff
path: root/stand
diff options
context:
space:
mode:
authorToomas Soome <tsoome@FreeBSD.org>2021-02-08 18:49:09 +0000
committerToomas Soome <tsoome@FreeBSD.org>2021-02-09 11:45:07 +0000
commit96bef2053a87c8d01ce08ea88857e4657489c8e7 (patch)
tree3ba96bfb069a194f8b5ac125a986f00db19334cd /stand
parent504ebd612ec61165bb949cfce3a348b0d6f37008 (diff)
Diffstat (limited to 'stand')
-rw-r--r--stand/common/gfx_fb.c23
-rw-r--r--stand/i386/libi386/vidconsole.c4
-rw-r--r--stand/lua/drawer.lua2
3 files changed, 11 insertions, 18 deletions
diff --git a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c
index 08c0f59505f2..2aed8775a540 100644
--- a/stand/common/gfx_fb.c
+++ b/stand/common/gfx_fb.c
@@ -1888,25 +1888,18 @@ set_font(teken_unit_t *rows, teken_unit_t *cols, teken_unit_t h, teken_unit_t w)
}
if (font != NULL) {
- *rows = (height - BORDER_PIXELS) / font->vfbd_height;
- *cols = (width - BORDER_PIXELS) / font->vfbd_width;
+ *rows = height / font->vfbd_height;
+ *cols = width / font->vfbd_width;
return (font);
}
/*
* Find best font for these dimensions, or use default
- *
- * A 1 pixel border is the absolute minimum we could have
- * as a border around the text window (BORDER_PIXELS = 2),
- * however a slightly larger border not only looks better
- * but for the fonts currently statically built into the
- * emulator causes much better font selection for the
- * normal range of screen resolutions.
*/
STAILQ_FOREACH(fl, &fonts, font_next) {
font = fl->font_data;
- if ((((*rows * font->vfbd_height) + BORDER_PIXELS) <= height) &&
- (((*cols * font->vfbd_width) + BORDER_PIXELS) <= width)) {
+ if ((*rows * font->vfbd_height <= height) &&
+ (*cols * font->vfbd_width <= width)) {
if (font->vfbd_font == NULL ||
fl->font_flags == FONT_RELOAD) {
if (fl->font_load != NULL &&
@@ -1916,8 +1909,8 @@ set_font(teken_unit_t *rows, teken_unit_t *cols, teken_unit_t h, teken_unit_t w)
if (font == NULL)
continue;
}
- *rows = (height - BORDER_PIXELS) / font->vfbd_height;
- *cols = (width - BORDER_PIXELS) / font->vfbd_width;
+ *rows = height / font->vfbd_height;
+ *cols = width / font->vfbd_width;
break;
}
font = NULL;
@@ -1936,8 +1929,8 @@ set_font(teken_unit_t *rows, teken_unit_t *cols, teken_unit_t h, teken_unit_t w)
if (font == NULL)
font = &DEFAULT_FONT_DATA;
- *rows = (height - BORDER_PIXELS) / font->vfbd_height;
- *cols = (width - BORDER_PIXELS) / font->vfbd_width;
+ *rows = height / font->vfbd_height;
+ *cols = width / font->vfbd_width;
}
return (font);
diff --git a/stand/i386/libi386/vidconsole.c b/stand/i386/libi386/vidconsole.c
index e17885cb7b0c..f94ed2d26712 100644
--- a/stand/i386/libi386/vidconsole.c
+++ b/stand/i386/libi386/vidconsole.c
@@ -908,8 +908,8 @@ cons_update_mode(bool use_gfx_mode)
} else {
/* Trigger loading of 8x16 font. */
setup_font(&gfx_state,
- 16 * gfx_state.tg_fb.fb_height + BORDER_PIXELS,
- 8 * gfx_state.tg_fb.fb_width + BORDER_PIXELS);
+ 16 * gfx_state.tg_fb.fb_height,
+ 8 * gfx_state.tg_fb.fb_width);
gfx_state.tg_functions = &tf;
/* ensure the following are not set for text mode */
unsetenv("screen.height");
diff --git a/stand/lua/drawer.lua b/stand/lua/drawer.lua
index 6062d7e87a03..eb9b18117cd3 100644
--- a/stand/lua/drawer.lua
+++ b/stand/lua/drawer.lua
@@ -308,7 +308,7 @@ local function drawbrand()
if core.isFramebufferConsole() and
loader.term_putimage ~= nil and
branddef.image ~= nil then
- if loader.term_putimage(branddef.image, 0, 0, 0, 7, 0)
+ if loader.term_putimage(branddef.image, 1, 1, 0, 7, 0)
then
return true
end