X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fvideo%2Fconsole%2Ffonts.c;h=d0c03fd7087141359d3d733791bbca2020de0de0;hb=0803d540db06f53acd2fabf1347d5b665218f14a;hp=c960728b7e82dd2fe6439f2a7364cabdcede9c43;hpb=a4b47ab9464a8200528fad3101668abdd7379cf9;p=linux-2.6-omap-h63xx.git diff --git a/drivers/video/console/fonts.c b/drivers/video/console/fonts.c index c960728b7e8..d0c03fd7087 100644 --- a/drivers/video/console/fonts.c +++ b/drivers/video/console/fonts.c @@ -15,7 +15,7 @@ #include #include #include -#if defined(__mc68000__) || defined(CONFIG_APUS) +#if defined(__mc68000__) #include #endif #include @@ -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; @@ -117,7 +120,7 @@ const struct font_desc *get_default_font(int xres, int yres) for(i=0; ipref; -#if defined(__mc68000__) || defined(CONFIG_APUS) +#if defined(__mc68000__) #ifdef CONFIG_FONT_PEARL_8x8 if (MACH_IS_AMIGA && f->idx == PEARL8x8_IDX) c = 100; @@ -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;