Implement bold and dim attributes

This commit is contained in:
Ray Chason
2026-08-10 09:28:03 +03:00
committed by Pasi Kallinen
parent 5dd1673678
commit 647fd71a2d
+13
View File
@@ -1283,6 +1283,19 @@ tty_render_text(Widget w, int x, int y, const char *text, int color, int attr,
fgpixel = pixel;
}
/* Implement bold font */
if (attr & HL_BOLD) {
struct xwindow *wp = find_widget(w);
load_boldfont(wp, w);
font = wp->boldfs;
}
/* Implement dim text */
if (attr & HL_DIM) {
fgpixel = (fgpixel & 0xFEFEFE) >> 1;
bgpixel = (bgpixel & 0xFEFEFE) >> 1;
}
/* Get a graphics context */
if (attr & HL_INVERSE) {
values.foreground = bgpixel;