Lines Matching refs:font

28  *  Smart redraw scrolling, arbitrary font width support, 512char font support
72 #include <linux/font.h>
76 #include <linux/crc32.h> /* For counting font checksums */
153 /* font data */
413 if (!strncmp(options, "font:", 5)) {
925 const struct font_desc *font = NULL;
960 /* Setup default font */
962 if (!fontname[0] || !(font = find_font(fontname)))
963 font = get_default_font(info->var.xres,
967 vc->vc_font.width = font->width;
968 vc->vc_font.height = font->height;
969 vc->vc_font.data = (void *)(p->fontdata = font->data);
970 vc->vc_font.charcount = font->charcount;
1021 fb, copy the font from that console */
1037 const struct font_desc *font = NULL;
1039 if (!fontname[0] || !(font = find_font(fontname)))
1040 font = get_default_font(info->var.xres,
1044 vc->vc_font.width = font->width;
1045 vc->vc_font.height = font->height;
1046 vc->vc_font.data = (void *)(p->fontdata = font->data);
1047 vc->vc_font.charcount = font->charcount;
1227 * fbcon_putc_physical_8() -- (font width != 8) may be added later
1254 * If the font dimensions are not an integral of the display
2008 * If user font, ensure that a possible change to user font
2009 * height or width will not allow a font data out-of-bounds access.
2010 * NOTE: must use original charcount in calculation as font
2012 * font data allocated size.
2265 static int fbcon_get_font(struct vc_data *vc, struct console_font *font, unsigned int vpitch)
2268 u8 *data = font->data;
2271 font->width = vc->vc_font.width;
2272 font->height = vc->vc_font.height;
2273 if (font->height > vpitch)
2275 font->charcount = vc->vc_hi_font_mask ? 512 : 256;
2276 if (!font->data)
2279 if (font->width <= 8) {
2281 if (font->charcount * j > FNTSIZE(fontdata))
2284 for (i = 0; i < font->charcount; i++) {
2290 } else if (font->width <= 16) {
2292 if (font->charcount * j > FNTSIZE(fontdata))
2295 for (i = 0; i < font->charcount; i++) {
2301 } else if (font->width <= 24) {
2302 if (font->charcount * (vc->vc_font.height * sizeof(u32)) > FNTSIZE(fontdata))
2305 for (i = 0; i < font->charcount; i++) {
2317 if (font->charcount * j > FNTSIZE(fontdata))
2320 for (i = 0; i < font->charcount; i++) {
2456 * User asked to set font; we are guaranteed that charcount does not exceed 512
2460 static int fbcon_set_font(struct vc_data *vc, const struct console_font *font,
2464 unsigned charcount = font->charcount;
2465 int w = font->width;
2466 int h = font->height;
2469 u8 *new_data, *data = font->data;
2470 int pitch = PITCH(font->width);
2477 /* font bigger than screen resolution ? */
2482 if (font->width > FB_MAX_BLIT_WIDTH || font->height > FB_MAX_BLIT_HEIGHT)
2485 /* Make sure drawing engine can handle the font */
2486 if (!test_bit(font->width - 1, info->pixmap.blit_x) ||
2487 !test_bit(font->height - 1, info->pixmap.blit_y))
2490 /* Make sure driver can handle the font length */
2510 /* Since linux has a nice crc32 function use it for counting font
2515 /* Check if the same font is on some other console already */
2530 return fbcon_do_set_font(vc, font->width, font->height, charcount, new_data, 1);
2533 static int fbcon_set_def_font(struct vc_data *vc, struct console_font *font,
2545 font->width = f->width;
2546 font->height = f->height;
2731 /* prevent setting a screen size which is smaller than font size */