Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Fonts: Add charcount field to font_desc

Subsystems are hard-coding the number of characters of our built-in fonts
as 256. Include that information in our kernel font descriptor, `struct
font_desc`.

Signed-off-by: Peilin Ye <yepeilin.cs@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/65952296d1d9486093bd955d1536f7dcd11112c6.1605169912.git.yepeilin.cs@gmail.com

authored by

Peilin Ye and committed by
Daniel Vetter
4ee57308 259a252c

+14
+1
include/linux/font.h
··· 17 17 int idx; 18 18 const char *name; 19 19 unsigned int width, height; 20 + unsigned int charcount; 20 21 const void *data; 21 22 int pref; 22 23 };
+1
lib/fonts/font_10x18.c
··· 5137 5137 .name = "10x18", 5138 5138 .width = 10, 5139 5139 .height = 18, 5140 + .charcount = 256, 5140 5141 .data = fontdata_10x18.data, 5141 5142 #ifdef __sparc__ 5142 5143 .pref = 5,
+1
lib/fonts/font_6x10.c
··· 3083 3083 .name = "6x10", 3084 3084 .width = 6, 3085 3085 .height = 10, 3086 + .charcount = 256, 3086 3087 .data = fontdata_6x10.data, 3087 3088 .pref = 0, 3088 3089 };
+1
lib/fonts/font_6x11.c
··· 3346 3346 .name = "ProFont6x11", 3347 3347 .width = 6, 3348 3348 .height = 11, 3349 + .charcount = 256, 3349 3350 .data = fontdata_6x11.data, 3350 3351 /* Try avoiding this font if possible unless on MAC */ 3351 3352 .pref = -2000,
+1
lib/fonts/font_6x8.c
··· 2571 2571 .name = "6x8", 2572 2572 .width = 6, 2573 2573 .height = 8, 2574 + .charcount = 256, 2574 2575 .data = fontdata_6x8.data, 2575 2576 .pref = 0, 2576 2577 };
+1
lib/fonts/font_7x14.c
··· 4113 4113 .name = "7x14", 4114 4114 .width = 7, 4115 4115 .height = 14, 4116 + .charcount = 256, 4116 4117 .data = fontdata_7x14.data, 4117 4118 .pref = 0, 4118 4119 };
+1
lib/fonts/font_8x16.c
··· 4627 4627 .name = "VGA8x16", 4628 4628 .width = 8, 4629 4629 .height = 16, 4630 + .charcount = 256, 4630 4631 .data = fontdata_8x16.data, 4631 4632 .pref = 0, 4632 4633 };
+1
lib/fonts/font_8x8.c
··· 2578 2578 .name = "VGA8x8", 2579 2579 .width = 8, 2580 2580 .height = 8, 2581 + .charcount = 256, 2581 2582 .data = fontdata_8x8.data, 2582 2583 .pref = 0, 2583 2584 };
+1
lib/fonts/font_acorn_8x8.c
··· 270 270 .name = "Acorn8x8", 271 271 .width = 8, 272 272 .height = 8, 273 + .charcount = 256, 273 274 .data = acorndata_8x8.data, 274 275 #ifdef CONFIG_ARCH_ACORN 275 276 .pref = 20,
+1
lib/fonts/font_mini_4x6.c
··· 2152 2152 .name = "MINI4x6", 2153 2153 .width = 4, 2154 2154 .height = 6, 2155 + .charcount = 256, 2155 2156 .data = fontdata_mini_4x6.data, 2156 2157 .pref = 3, 2157 2158 };
+1
lib/fonts/font_pearl_8x8.c
··· 2582 2582 .name = "PEARL8x8", 2583 2583 .width = 8, 2584 2584 .height = 8, 2585 + .charcount = 256, 2585 2586 .data = fontdata_pearl8x8.data, 2586 2587 .pref = 2, 2587 2588 };
+1
lib/fonts/font_sun12x22.c
··· 6156 6156 .name = "SUN12x22", 6157 6157 .width = 12, 6158 6158 .height = 22, 6159 + .charcount = 256, 6159 6160 .data = fontdata_sun12x22.data, 6160 6161 #ifdef __sparc__ 6161 6162 .pref = 5,
+1
lib/fonts/font_sun8x16.c
··· 268 268 .name = "SUN8x16", 269 269 .width = 8, 270 270 .height = 16, 271 + .charcount = 256, 271 272 .data = fontdata_sun8x16.data, 272 273 #ifdef __sparc__ 273 274 .pref = 10,
+1
lib/fonts/font_ter16x32.c
··· 2062 2062 .name = "TER16x32", 2063 2063 .width = 16, 2064 2064 .height = 32, 2065 + .charcount = 256, 2065 2066 .data = fontdata_ter16x32.data, 2066 2067 #ifdef __sparc__ 2067 2068 .pref = 5,