font
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
IoIxD 2026-03-28 15:04:07 -07:00
commit 8694e61316
8 changed files with 63502 additions and 6046 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -53,7 +53,7 @@ static int ft2_MwDrawText(MwWidget handle, MwPoint* point, const char* text, int
}
}
x += ttf->face->glyph->metrics.horiAdvance / 64;
x += ttf->face->glyph->metrics.horiAdvance >> 6;
}
p = MwLoadRaw(handle, px, tw, th);
@ -92,7 +92,7 @@ static int ft2_MwTextWidth(MwWidget handle, const char* text) {
FT_Load_Char(ttf->face, c, FT_LOAD_RENDER);
tw += ttf->face->glyph->metrics.horiAdvance / 64;
tw += ttf->face->glyph->metrics.horiAdvance >> 6;
if(tw > mtw) mtw = tw;
}

View file

@ -51,7 +51,7 @@ static void draw(MwWidget handle) {
p.x = (r.width - (r.width / w * w)) / 2 + (MwGetInteger(handle, MwNisRounded) ? MwGetInteger(handle, MwNroundness) : 0);
p.y = r.height / 2;
len = (r.width - p.x * 2) / w;
len = (r.width - p.x * 2) / (w / 1.5);
if(len >= 0) {
show = malloc(len * 4 + 1);
@ -67,10 +67,6 @@ static void draw(MwWidget handle) {
MwDrawText(handle, &p, show, 0, MwALIGNMENT_BEGINNING, text);
textlen = (t->cursor - 1) % len + 1;
for(i = 0; i < textlen; i++) show[i] = 'M';
show[i] = 0;
currc.x = p.x + MwTextWidth(handle, show);
currc.y = (r.height - h) / 2;
currc.width = 1;