diff mbox series

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

Message ID 20220420153827.637413-2-wjsota@gmail.com (mailing list archive)
State Accepted
Commit 6266446922f76c561131b2053dfd82ac0dd62e31
Headers show
Series [1/2] kernel-shark: Make FreeSans a compulsory component | expand

Commit Message

Solomon Tan April 20, 2022, 3:38 p.m. UTC
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@gmail.com>
---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Yordan Karadzhov April 21, 2022, 12:16 p.m. UTC | #1
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@gmail.com>
> ---
>   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)
>
diff mbox series

Patch

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)