Make font sizes relative to the image size

This commit is contained in:
Gergely Polonkai 2022-05-18 10:52:29 +02:00
parent 5513510ad1
commit 585e68cc58
No known key found for this signature in database
GPG Key ID: 2D2885533B869ED4
1 changed files with 2 additions and 2 deletions

View File

@ -129,8 +129,8 @@ fn gen_svg() -> Document {
.time()
.num_seconds_from_midnight() as i32;
let local_hour_font_size = 16.5;
let hour_name_font_size = 13.37699;
let local_hour_font_size = image_width as f32 * 0.02357;
let hour_name_font_size = image_width as f32 * 0.019109;
let utc_hour_font_size = image_width as f32 * 0.021462;
let outer_r = (image_width as f32) / 2.0 - 3.0 * hour_name_font_size;
let ring_width = hour_name_font_size * 3.0;