FreeSans comes as otf rather than ttf in some cases. An example is the gnu-free-fonts on Arch. With this patch, both FreeSans.otf and FreeSans.ttf will be accepted to make kernelshark. Signed-off-by: Solomon Tan <wjsota@xxxxxxxxx> --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5473bfa..3a48b0e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,7 +59,7 @@ find_package(GLUT) set(KS_FONT FreeSans) if (NOT TT_FONT_FILE) - execute_process(COMMAND bash "-c" "fc-list '${KS_FONT}' |grep ${KS_FONT}.ttf | cut -d':' -f 1 -z" + execute_process(COMMAND bash "-c" "fc-list '${KS_FONT}' |grep -E ${KS_FONT}'(\.otf|\.ttf)' | cut -d':' -f 1 -z" OUTPUT_VARIABLE TT_FONT_FILE) endif (NOT TT_FONT_FILE) -- 2.36.0