popup: use system fonts exclusively

This commit is contained in:
2026-08-14 15:17:00 +09:00
parent 54355b8190
commit 08369e718e
14 changed files with 34 additions and 116 deletions

View File

@@ -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;
}