Scale font size to DPI

This commit is contained in:
litter 2020-02-12 14:52:24 -05:00
parent dea582ff6e
commit 94489b1992
2 changed files with 3 additions and 2 deletions

View File

@ -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 COLUMNS = floor(PAGE_W_PIXELS / (16 * DPMM));
int ROWS = floor(PAGE_H_PIXELS / SPACING); int ROWS = floor(PAGE_H_PIXELS / SPACING);
int FRAME_LINE = round((SPACING - FRAME_H) / 2); int FRAME_LINE = round((SPACING - FRAME_H) / 2);
int FONT_SIZE = ceil(DPI / 24);
PGraphics page; PGraphics page;
@ -73,7 +74,7 @@ void setup () {
page.background(255); page.background(255);
page.stroke(0); page.stroke(0);
page.fill(0); page.fill(0);
page.textSize(60); page.textSize(FONT_SIZE);
float leftX = 20 * DPMM * MAGIC_W_CORRECTION; float leftX = 20 * DPMM * MAGIC_W_CORRECTION;
float topY = 20 * DPMM * MAGIC_H_CORRECTION; float topY = 20 * DPMM * MAGIC_H_CORRECTION;

View File

@ -9,7 +9,7 @@ AUDIO_RATE=10296
#Either use the script by passing in a path, ie: #Either use the script by passing in a path, ie:
#sh export.sh /path/to/my/video.mov #sh export.sh /path/to/my/video.mov
#or hardcode it by changing VIDEO=${1} to VIDEO=/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 # change these to directory where you will store your frames and audio
FRAMES_DIR=~/Desktop/frames/ FRAMES_DIR=~/Desktop/frames/