]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/video/console/fonts.c
Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6
[linux-2.6-omap-h63xx.git] / drivers / video / console / fonts.c
index c960728b7e82dd2fe6439f2a7364cabdcede9c43..96979c37751846f9143a218401d0eb6a5ec02182 100644 (file)
@@ -98,6 +98,8 @@ const struct font_desc *find_font(const char *name)
  *     get_default_font - get default font
  *     @xres: screen size of X
  *     @yres: screen size of Y
+ *      @font_w: bit array of supported widths (1 - 32)
+ *      @font_h: bit array of supported heights (1 - 32)
  *
  *     Get the default font for a specified screen size.
  *     Dimensions are in pixels.
@@ -107,7 +109,8 @@ const struct font_desc *find_font(const char *name)
  *
  */
 
-const struct font_desc *get_default_font(int xres, int yres)
+const struct font_desc *get_default_font(int xres, int yres, u32 font_w,
+                                        u32 font_h)
 {
     int i, c, cc;
     const struct font_desc *f, *g;
@@ -129,6 +132,11 @@ const struct font_desc *get_default_font(int xres, int yres)
 #endif
        if ((yres < 400) == (f->height <= 8))
            c += 1000;
+
+       if ((font_w & (1 << (f->width - 1))) &&
+           (font_h & (1 << (f->height - 1))))
+           c += 1000;
+
        if (c > cc) {
            cc = c;
            g = f;