Re: [PATCH 2/2] kernel-shark: Allow FreeSans otf in addition to ttf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Solomon,

I am taking this one.

Thanks!
Yordan

On 20.04.22 г. 18:38 ч., Solomon Tan wrote:
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)



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux