From 165f25c3eb9f15af8587663de509ec89053ac307 Mon Sep 17 00:00:00 2001 From: Jonatan6 Date: Wed, 10 Feb 2021 17:47:30 +0100 Subject: [PATCH 1/2] make it possible to change the font for text slides I set free-sans to be the default, because it seems that that is what imagemagick is uses, when you don't specify a font. --- .local/bin/slider | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.local/bin/slider b/.local/bin/slider index d8d87b1..cb9a881 100755 --- a/.local/bin/slider +++ b/.local/bin/slider @@ -12,6 +12,7 @@ cache="${XDG_CACHE_HOME:-$HOME/.cache}/slider" while getopts "hvrpi:c:a:o:d:f:t:e:x:" o; do case "${o}" in c) bgc="$OPTARG" ;; t) fgc="$OPTARG" ;; + f) font="$OPTARG" ;; i) file="$OPTARG" ;; a) audio="$OPTARG" ;; o) outfile="$OPTARG" ;; @@ -34,6 +35,7 @@ while getopts "hvrpi:c:a:o:d:f:t:e:x:" o; do case "${o}" in -c color of background (use html names, black is default) -t text color for text slides (white is default) -s text font size for text slides (150 is default) + -f text font for text slides (FreeSans is default) -o output video file -e if no audio given, the time in seconds that the last slide will be shown (5 is default) -x resolution (1920x1080 is default) @@ -96,7 +98,7 @@ do convert -size "${res:-1920x1080}" canvas:"${bgc:-black}" -gravity center "$content" -resize 1920x1080 -composite "$prepdir/$base" else { [ ! -f "$prepdir/$base" ] || [ -n "${redo+x}" ] ;} && - convert -size "${res:-1920x1080}" -background "${bgc:-black}" -fill "${fgc:-white}" -pointsize "${ppt:-150}" -gravity center label:"$content" "$prepdir/$base" + convert -size "${res:-1920x1080}" -background "${bgc:-black}" -fill "${fgc:-white}" -font "${font:-FreeSans}" -pointsize "${ppt:-150}" -gravity center label:"$content" "$prepdir/$base" fi # If the first line, do not write yet. From 2c7a3344693503a97195d3b637acb9b8e912d562 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Mon, 29 Mar 2021 21:36:47 -0400 Subject: [PATCH 2/2] neurtral default font --- .local/bin/slider | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.local/bin/slider b/.local/bin/slider index cb9a881..674781a 100755 --- a/.local/bin/slider +++ b/.local/bin/slider @@ -35,7 +35,7 @@ while getopts "hvrpi:c:a:o:d:f:t:e:x:" o; do case "${o}" in -c color of background (use html names, black is default) -t text color for text slides (white is default) -s text font size for text slides (150 is default) - -f text font for text slides (FreeSans is default) + -f text font for text slides (sans serif is default) -o output video file -e if no audio given, the time in seconds that the last slide will be shown (5 is default) -x resolution (1920x1080 is default) @@ -98,7 +98,7 @@ do convert -size "${res:-1920x1080}" canvas:"${bgc:-black}" -gravity center "$content" -resize 1920x1080 -composite "$prepdir/$base" else { [ ! -f "$prepdir/$base" ] || [ -n "${redo+x}" ] ;} && - convert -size "${res:-1920x1080}" -background "${bgc:-black}" -fill "${fgc:-white}" -font "${font:-FreeSans}" -pointsize "${ppt:-150}" -gravity center label:"$content" "$prepdir/$base" + convert -size "${res:-1920x1080}" -background "${bgc:-black}" -fill "${fgc:-white}" -font "${font:-Sans}" -pointsize "${ppt:-150}" -gravity center label:"$content" "$prepdir/$base" fi # If the first line, do not write yet.