From: Michael Tremer Date: Thu, 8 Sep 2016 12:49:09 +0000 (+0200) Subject: Make fonts properly bold without changing the colour of the normal font X-Git-Tag: 009~294 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ded49a6b36d3a9c84d41e05bca97fef65150dac4;p=network.git Make fonts properly bold without changing the colour of the normal font Signed-off-by: Michael Tremer --- diff --git a/src/functions/functions.cli b/src/functions/functions.cli index 25d0b2a0..b5b164d7 100644 --- a/src/functions/functions.cli +++ b/src/functions/functions.cli @@ -250,7 +250,7 @@ cli_headline() { local ident=$(cli_ident ${level}) local out - printf -v out "${ident}${CLR_WHITE_B}${format}${CLR_RESET}\n" "$@" + printf -v out "${ident}${FONT_BOLD}${format}${FONT_RESET}\n" "$@" printf "${out}" } diff --git a/src/functions/functions.colors b/src/functions/functions.colors index 7f7e8211..8d7193c3 100644 --- a/src/functions/functions.colors +++ b/src/functions/functions.colors @@ -49,8 +49,15 @@ CLR_PURPLE_BG='\e[45m' CLR_CYAN_BG='\e[46m' CLR_WHITE_BG='\e[47m' -# Reset everything. -CLR_RESET="\e[0m" +# Font decoration +FONT_RESET="\e[0m" +FONT_BOLD="\e[1m" +FONT_UNDERLINED="\e[4m" +FONT_BLINKING="\e[5m" +FONT_INVERTED="\e[7m" + +# Reset everything +CLR_RESET="${FONT_RESET}" # Predefined messages MSG_HOOK_UP="${CLR_GREEN_BG}${CLR_WHITE_B} UP ${CLR_RESET}"