remove more unused code
This commit is contained in:
parent
031fc859ce
commit
3376799768
|
@ -131,7 +131,7 @@ static char* file_load(const char* path, size_t* siz)
|
||||||
{
|
{
|
||||||
char *buf;
|
char *buf;
|
||||||
FILE *fd = fopen(path, "rb");
|
FILE *fd = fopen(path, "rb");
|
||||||
if (!fd) die("Failed to open file: %s\n", path);
|
|
||||||
fseek(fd, 0, SEEK_END);
|
fseek(fd, 0, SEEK_END);
|
||||||
*siz = (size_t)ftell(fd);
|
*siz = (size_t)ftell(fd);
|
||||||
fseek(fd, 0, SEEK_SET);
|
fseek(fd, 0, SEEK_SET);
|
||||||
|
@ -261,9 +261,6 @@ static struct zr_user_font font_bake_and_upload(struct device *dev, struct zr_fo
|
||||||
const char *custom_data = "....";
|
const char *custom_data = "....";
|
||||||
struct zr_font_config config;
|
struct zr_font_config config;
|
||||||
char *ttf_blob = file_load(path, &ttf_size);
|
char *ttf_blob = file_load(path, &ttf_size);
|
||||||
if (!ttf_blob)
|
|
||||||
die("[Font]: %s is not a file or cannot be found!\n", path);
|
|
||||||
|
|
||||||
/* setup font configuration */
|
/* setup font configuration */
|
||||||
memset(&config, 0, sizeof(config));
|
memset(&config, 0, sizeof(config));
|
||||||
config.ttf_blob = ttf_blob;
|
config.ttf_blob = ttf_blob;
|
||||||
|
@ -284,8 +281,7 @@ static struct zr_user_font font_bake_and_upload(struct device *dev, struct zr_fo
|
||||||
|
|
||||||
/* pack all glyphes and return needed image width, height and memory size*/
|
/* pack all glyphes and return needed image width, height and memory size*/
|
||||||
custom.w = 2; custom.h = 2;
|
custom.w = 2; custom.h = 2;
|
||||||
if (!zr_font_bake_pack(&img_size, &img_width,&img_height,&custom,tmp,tmp_size,&config, 1))
|
zr_font_bake_pack(&img_size, &img_width,&img_height,&custom,tmp,tmp_size,&config, 1);
|
||||||
die("[Font]: failed to load font!\n");
|
|
||||||
|
|
||||||
/* bake all glyphes and custom white pixel into image */
|
/* bake all glyphes and custom white pixel into image */
|
||||||
img = calloc(1, img_size);
|
img = calloc(1, img_size);
|
||||||
|
|
Loading…
Reference in New Issue