9937 uts: use smallest font as fallback default.

Review Request #1260 - Created Oct. 29, 2018 and updated

Information
Toomas Soome
illumos-gate
9937
8e0825c...
Reviewers
general
9937 uts: use smallest font as fallback default.

  

Issues

  • 1
  • 0
  • 0
  • 1
Description From Last Updated
It looks last we will end up with default_font being the last entry in the fonts array if we didn't ... Yuri Pankov Yuri Pankov
Yuri Pankov

   
usr/src/uts/common/font/font.c (Diff revision 1)
 
 

It looks last we will end up with default_font being the last entry in the fonts array if we didn't get font_selected. In that case you could just do something like the following here instead of the entire change:

if (font_selected == NULL) {
if (nitems(fonts) > 1)
font_selected = fonts[nitems(fonts) - 2]->data;
else
font_selected = &DEFAULT_FONT;

  1. From one hand this is nice, but at this time the patch is just an middle step on path - we will drop static array. But we want to show the change in the logic about default font.

Garrett D'Amore
Ship It!
Loading...