bold font

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@107 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-10-01 16:33:18 +00:00
parent cb46c5ba34
commit aa92f0c31e
7 changed files with 149 additions and 6 deletions

View File

@@ -127,7 +127,7 @@ void MwDrawFrameEx(MwWidget handle, MwRect* rect, MwLLColor color, int invert, i
rect->height -= border * 2;
}
void MwDrawText(MwWidget handle, MwPoint* point, const char* text, MwLLColor color) {
void MwDrawText(MwWidget handle, MwPoint* point, const char* text, int bold, MwLLColor color) {
int i, x, y, sx, sy;
MwRect r;
@@ -142,7 +142,7 @@ void MwDrawText(MwWidget handle, MwPoint* point, const char* text, MwLLColor col
r.width = FontScale;
r.height = FontScale;
if(MwFontData[(unsigned char)text[i]].data[y] & (1 << ((FontWidth - 1) - x))) {
if((bold ? MwBoldFontData : MwFontData)[(unsigned char)text[i]].data[y] & (1 << ((FontWidth - 1) - x))) {
MwDrawRect(handle, &r, color);
}
}