Skip to content

Commit 9efdf4d

Browse files
authored
Merge pull request #976 from acuteaangle/gh-974-b
feat: allow setting `dvplay`/`dvsampler` font via envvar
2 parents 3e8a150 + 0ba400d commit 9efdf4d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

tools/dvplay

+3-1
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,9 @@ _get_iso8601(){
430430
}
431431

432432
# font selection
433-
if [[ -f "/Library/Fonts/Andale Mono.ttf" ]] ; then
433+
if [[ -n "${DVRESCUE_FONT}" ]] ; then
434+
DEFAULTFONT="${DVRESCUE_FONT}"
435+
elif [[ -f "/Library/Fonts/Andale Mono.ttf" ]] ; then
434436
DEFAULTFONT="/Library/Fonts/Andale Mono.ttf"
435437
elif [[ -f "/System/Library/Fonts/Supplemental/Andale Mono.ttf" ]] ; then
436438
DEFAULTFONT="/System/Library/Fonts/Supplemental/Andale Mono.ttf"

tools/dvsampler

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ _report(){
2828

2929
outputdir="samples"
3030

31-
if [[ -f "/Library/Fonts/Andale Mono.ttf" ]] ; then
31+
if [[ -n "${DVRESCUE_FONT}" ]] ; then
32+
DEFAULTFONT="${DVRESCUE_FONT}"
33+
elif [[ -f "/Library/Fonts/Andale Mono.ttf" ]] ; then
3234
DEFAULTFONT="/Library/Fonts/Andale Mono.ttf"
3335
elif [[ -f "/System/Library/Fonts/Supplemental/Andale Mono.ttf" ]] ; then
3436
DEFAULTFONT="/System/Library/Fonts/Supplemental/Andale Mono.ttf"

0 commit comments

Comments
 (0)