popup: use system fonts exclusively
This commit is contained in:
@@ -10,15 +10,6 @@ enum
|
||||
};
|
||||
|
||||
static u32int guardcolor = 0x5a5a5a5a;
|
||||
static char *testfonts[] = {
|
||||
"/usr/share/fonts/noto/NotoColorEmoji.ttf",
|
||||
"/usr/share/fonts/TTF/DejaVuSans.ttf",
|
||||
"/usr/share/fonts/TTF/Jigmo.ttf",
|
||||
"/usr/share/fonts/TTF/Jigmo2.ttf",
|
||||
};
|
||||
static char *missingfonts[] = {
|
||||
"/strans-test-no-such-font",
|
||||
};
|
||||
|
||||
static void
|
||||
fillpixels(u32int *p, int n, u32int color)
|
||||
@@ -195,14 +186,7 @@ font_render(struct ct *t)
|
||||
buf = mem + Guard;
|
||||
fillpixels(buf, Testn, Colbg);
|
||||
a = mkstr("A");
|
||||
CT_CHECK(t, !textinit(missingfonts, nelem(missingfonts)));
|
||||
CT_EQ_INT(t, 0, textwidth(&a));
|
||||
textdraw(buf, Testw, Testh, 0, 0, &a);
|
||||
for(i = 0; i < Testn; i++)
|
||||
CT_EQ_UINT(t, Colbg, buf[i]);
|
||||
checkguards(t, mem);
|
||||
|
||||
if(!CT_CHECK(t, textinit(testfonts, nelem(testfonts)))){
|
||||
if(!CT_CHECK(t, textinit())){
|
||||
free(mem);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user