From 94489b199247c4a70c8d88e45f6606ae9d8acf74 Mon Sep 17 00:00:00 2001 From: litter Date: Wed, 12 Feb 2020 14:52:24 -0500 Subject: [PATCH] Scale font size to DPI --- filmless_calibration/filmless_calibration.pde | 3 ++- scripts/export.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/filmless_calibration/filmless_calibration.pde b/filmless_calibration/filmless_calibration.pde index b2e1506..77e2ea1 100644 --- a/filmless_calibration/filmless_calibration.pde +++ b/filmless_calibration/filmless_calibration.pde @@ -50,6 +50,7 @@ int LEFT_PAD = round(((16 - STD16_W) / 2) * DPMM * MAGIC_W_CORRECTION); //space int COLUMNS = floor(PAGE_W_PIXELS / (16 * DPMM)); int ROWS = floor(PAGE_H_PIXELS / SPACING); int FRAME_LINE = round((SPACING - FRAME_H) / 2); +int FONT_SIZE = ceil(DPI / 24); PGraphics page; @@ -73,7 +74,7 @@ void setup () { page.background(255); page.stroke(0); page.fill(0); - page.textSize(60); + page.textSize(FONT_SIZE); float leftX = 20 * DPMM * MAGIC_W_CORRECTION; float topY = 20 * DPMM * MAGIC_H_CORRECTION; diff --git a/scripts/export.sh b/scripts/export.sh index abd4395..347760d 100755 --- a/scripts/export.sh +++ b/scripts/export.sh @@ -9,7 +9,7 @@ AUDIO_RATE=10296 #Either use the script by passing in a path, ie: #sh export.sh /path/to/my/video.mov #or hardcode it by changing VIDEO=${1} to VIDEO=/path/to/my/video.mov -VIDEO=${1} +VIDEO="${1}" # change these to directory where you will store your frames and audio FRAMES_DIR=~/Desktop/frames/