From d67fae5b1f56c26c86d3debe2c813fdcb93772c1 Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Sun, 15 Sep 2024 08:38:37 -0400 Subject: [PATCH] bold fonts on linux were so wrong lol --- simpledisplay.d | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/simpledisplay.d b/simpledisplay.d index b74e533..1fdc6c3 100644 --- a/simpledisplay.d +++ b/simpledisplay.d @@ -8716,12 +8716,19 @@ class OperatingSystemFont : MeasurableFont { add(":size="); add(toInternal!string(size)); } - if(weight != FontWeight.dontcare) { + if(weight != FontWeight.dontcare && weight != 400) { + if(weight < 400) + add(":style=Light"); + else + add(":style=Bold"); add(":weight="); add(weightToString(weight)); } - if(italic) + if(italic) { + if(weight == FontWeight.dontcare) + add(":style=Italic"); add(":slant=100"); + } nameBuffer[nbp] = 0;