summaryrefslogtreecommitdiff
path: root/usr/src/common
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2021-02-19 17:33:19 +0200
committerToomas Soome <tsoome@me.com>2021-03-18 10:05:47 +0200
commit1b1c4b089b04ffa47f04c2923dc78c7fcafcf964 (patch)
tree3474ee3c2e4d7381d0c0435ed4a50141a38da3cf /usr/src/common
parent5fbc1fe0da7f34cf8155bf7624c94583cc98e47c (diff)
downloadillumos-gate-1b1c4b089b04ffa47f04c2923dc78c7fcafcf964.tar.gz
13575 loader: use display pixel density for font autoselection
Reviewed by: Yuri Pankov <yuripv@yuripv.dev> Approved by: Robert Mustacchi <rm@fingolfin.org>
Diffstat (limited to 'usr/src/common')
-rw-r--r--usr/src/common/font/font.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/usr/src/common/font/font.c b/usr/src/common/font/font.c
index 35e2e12eca..b3d1041b52 100644
--- a/usr/src/common/font/font.c
+++ b/usr/src/common/font/font.c
@@ -196,6 +196,12 @@ reset_font_flags(void)
}
}
+__weak_symbol bitmap_data_t *
+gfx_get_font(void)
+{
+ return (NULL);
+}
+
bitmap_data_t *
set_font(short *rows, short *cols, short h, short w)
{
@@ -221,6 +227,9 @@ set_font(short *rows, short *cols, short h, short w)
}
}
+ if (font == NULL)
+ font = gfx_get_font();
+
if (font != NULL) {
*rows = (height - BORDER_PIXELS) / font->height;
*cols = (width - BORDER_PIXELS) / font->width;