diff options
Diffstat (limited to 'drivers/video/console/fonts.c')
-rw-r--r-- | drivers/video/console/fonts.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/video/console/fonts.c b/drivers/video/console/fonts.c index c960728b7e82..a6828d0a4c56 100644 --- a/drivers/video/console/fonts.c +++ b/drivers/video/console/fonts.c | |||
@@ -98,6 +98,8 @@ const struct font_desc *find_font(const char *name) | |||
98 | * get_default_font - get default font | 98 | * get_default_font - get default font |
99 | * @xres: screen size of X | 99 | * @xres: screen size of X |
100 | * @yres: screen size of Y | 100 | * @yres: screen size of Y |
101 | * @font_w: bit array of supported widths (1 - 32) | ||
102 | * @font_h: bit array of supported heights (1 - 32) | ||
101 | * | 103 | * |
102 | * Get the default font for a specified screen size. | 104 | * Get the default font for a specified screen size. |
103 | * Dimensions are in pixels. | 105 | * Dimensions are in pixels. |
@@ -107,7 +109,8 @@ const struct font_desc *find_font(const char *name) | |||
107 | * | 109 | * |
108 | */ | 110 | */ |
109 | 111 | ||
110 | const struct font_desc *get_default_font(int xres, int yres) | 112 | const struct font_desc *get_default_font(int xres, int yres, u32 font_w, |
113 | u32 font_h) | ||
111 | { | 114 | { |
112 | int i, c, cc; | 115 | int i, c, cc; |
113 | const struct font_desc *f, *g; | 116 | const struct font_desc *f, *g; |
@@ -129,6 +132,11 @@ const struct font_desc *get_default_font(int xres, int yres) | |||
129 | #endif | 132 | #endif |
130 | if ((yres < 400) == (f->height <= 8)) | 133 | if ((yres < 400) == (f->height <= 8)) |
131 | c += 1000; | 134 | c += 1000; |
135 | |||
136 | if (!(font_w & (1 << (f->width - 1))) || | ||
137 | !(font_w & (1 << (f->height - 1)))) | ||
138 | c += 1000; | ||
139 | |||
132 | if (c > cc) { | 140 | if (c > cc) { |
133 | cc = c; | 141 | cc = c; |
134 | g = f; | 142 | g = f; |