diff options
author | Toomas Soome <tsoome@me.com> | 2016-05-03 15:04:42 +0300 |
---|---|---|
committer | Richard Lowe <richlowe@richlowe.net> | 2018-10-28 20:43:24 +0000 |
commit | 5e2cca1843c61ee0ef1bb95c5dddc9b450b790c6 (patch) | |
tree | ebdbbd3ca30fd3cd5a836a2a6d8da4e045c562ca | |
parent | 1700af3add37a7b6db478d0876536849c3f691fe (diff) | |
download | illumos-joyent-5e2cca1843c61ee0ef1bb95c5dddc9b450b790c6.tar.gz |
9924 uts: update terminal dimensions based on selected font
Reviewed by: Andy Fiddaman <omnios@citrus-it.net>
Reviewed by: Alexander Pyhalov <apyhalov@gmail.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Approved by: Richard Lowe <richlowe@richlowe.net>
-rw-r--r-- | usr/src/uts/common/font/font.c | 4 | ||||
-rw-r--r-- | usr/src/uts/common/io/tem.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/usr/src/uts/common/font/font.c b/usr/src/uts/common/font/font.c index c27001131c..b386bf91bc 100644 --- a/usr/src/uts/common/font/font.c +++ b/usr/src/uts/common/font/font.c @@ -78,6 +78,10 @@ set_font(struct font *f, short *rows, short *cols, short height, short width) if ((((*rows * fl->data->height) + BORDER_PIXELS) <= height) && (((*cols * fl->data->width) + BORDER_PIXELS) <= width)) { font_selected = fl->data; + *rows = (height - BORDER_PIXELS) / + font_selected->height; + *cols = (width - BORDER_PIXELS) / + font_selected->width; break; } } diff --git a/usr/src/uts/common/io/tem.c b/usr/src/uts/common/io/tem.c index 75e75d39b6..c452d66723 100644 --- a/usr/src/uts/common/io/tem.c +++ b/usr/src/uts/common/io/tem.c @@ -563,10 +563,10 @@ tems_setup_terminal(struct vis_devinit *tp, size_t height, size_t width) /* * set_font() will select a appropriate sized font for - * the number of rows and columns selected. If we don't + * the number of rows and columns selected. If we don't * have a font that will fit, then it will use the - * default builtin font and adjust the rows and columns - * to fit on the screen. + * default builtin font. set_font() will adjust the rows + * and columns to fit on the screen. */ set_font(&tems.ts_font, &tems.ts_c_dimension.height, |