Use the same font all the way for a specific language

This commit is contained in:
Raphael Coeffic
2021-05-08 08:40:02 +02:00
parent 3f64afaa5c
commit aeb297c800
4 changed files with 30 additions and 24 deletions
+18 -11
View File
@@ -1,16 +1,23 @@
set(FONT "Roboto/Roboto-Regular")
set(FONT_BOLD "Roboto/Roboto-Bold")
set(CJK_FONT "Noto/NotoSansCJKsc-Regular")
set(CJK_FONT_BOLD "Noto/NotoSansCJKsc-Bold")
#set(FONT "Kanit/Kanit-Regular")
#set(FONT_BOLD "Kanit/Kanit-Bold")
#set(FONT "Ubuntu/Ubuntu-Regular")
#set(FONT_BOLD "Ubuntu/Ubuntu-Bold")
string(TOLOWER ${TRANSLATIONS} subset)
if( (${subset} STREQUAL "cn") OR (${subset} STREQUAL "tw"))
# Use this font for CJK languages
set(FONT "Noto/NotoSansCJKsc-Regular")
set(FONT_BOLD "Noto/NotoSansCJKsc-Bold")
set(FONT_OFFSET -3)
else()
# Use this font for non-CJK languages
set(FONT "Roboto/Roboto-Regular")
set(FONT_BOLD "Roboto/Roboto-Bold")
set(FONT_OFFSET 0)
#set(FONT "Kanit/Kanit-Regular")
#set(FONT_BOLD "Kanit/Kanit-Bold")
#set(FONT "Ubuntu/Ubuntu-Regular")
#set(FONT_BOLD "Ubuntu/Ubuntu-Bold")
endif()
if(PCB STREQUAL X10)
set(FONT_ARGS ${FONT_ARGS} --reverse)
endif()