From e0c989586eaf96ef6448d575d793354adc27f400 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Wed, 17 Jul 2024 22:24:47 +0800 Subject: [PATCH] [saco] Implement/match `GetFontWeight()` --- saco/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/saco/main.cpp b/saco/main.cpp index f821d75..e9e93aa 100644 --- a/saco/main.cpp +++ b/saco/main.cpp @@ -543,3 +543,11 @@ int GetUIFontSize() return 2 * pConfig->GetIntVariable("fontsize") + 20; } +int GetFontWeight() +{ + int fontweight = pConfig->GetIntVariable("fontweight"); + if(fontweight == 0) return FW_BOLD; + + return fontweight != 1 ? FW_BOLD : FW_NORMAL; +} +