From 55a2c4eaae521eabeee6c15cd17eb17de9b6afe5 Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Thu, 29 Mar 2018 11:07:50 -0700 Subject: Remove the obsolete mkfont.c and font_10x18.h The font_10x18.h is used as a fall back for fonts if the $(recovery_font) under bootable/recovery/fonts failed to reload. This font looks very small on the screen and we haven't used it in a while. Plus, fonts in header doesn't have many benefits if we support only ascii characters. So we decide to remove this header along with the mkfont.c that generates the header. For reference, here's the steps to use mkfont: 1. Generate a picture of fonts with apps on host 2. Open the pic with GIMP 3. Export the pic as '.c' file, and rename it into '.h' file 4. Compile the generated '.h' file with mkfont.c Bug: 76420958 Test: build and check the recovery menu on angler Change-Id: I6c108aa43a07bf4994115ef764275bd84df725e1 --- minui/mkfont.c | 54 ------------------------------------------------------ 1 file changed, 54 deletions(-) delete mode 100644 minui/mkfont.c (limited to 'minui/mkfont.c') diff --git a/minui/mkfont.c b/minui/mkfont.c deleted file mode 100644 index 61a5edeb2..000000000 --- a/minui/mkfont.c +++ /dev/null @@ -1,54 +0,0 @@ -#include -#include - -int main(int argc, char *argv) -{ - unsigned n; - unsigned char *x; - unsigned m; - unsigned run_val; - unsigned run_count; - - n = gimp_image.width * gimp_image.height; - m = 0; - x = gimp_image.pixel_data; - - printf("struct {\n"); - printf(" unsigned width;\n"); - printf(" unsigned height;\n"); - printf(" unsigned cwidth;\n"); - printf(" unsigned cheight;\n"); - printf(" unsigned char rundata[];\n"); - printf("} font = {\n"); - printf(" .width = %d,\n .height = %d,\n .cwidth = %d,\n .cheight = %d,\n", gimp_image.width, gimp_image.height, - gimp_image.width / 96, gimp_image.height); - printf(" .rundata = {\n"); - - run_val = (*x ? 0 : 255); - run_count = 1; - n--; - x+=3; - - while(n-- > 0) { - unsigned val = (*x ? 0 : 255); - x+=3; - if((val == run_val) && (run_count < 127)) { - run_count++; - } else { -eject: - printf("0x%02x,",run_count | (run_val ? 0x80 : 0x00)); - run_val = val; - run_count = 1; - m += 5; - if(m >= 75) { - printf("\n"); - m = 0; - } - } - } - printf("0x%02x,",run_count | (run_val ? 0x80 : 0x00)); - printf("\n0x00,"); - printf("\n"); - printf(" }\n};\n"); - return 0; -} -- cgit v1.2.3