From fb1b1bb71f131f3bf5a8be6bf549f8e8016e95ac Mon Sep 17 00:00:00 2001 From: jlw4049 Date: Tue, 30 Jan 2024 13:36:23 -0500 Subject: [PATCH] chore: remove font_scaler as it's no longer needed --- frame_forge/font_scaler.py | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 frame_forge/font_scaler.py diff --git a/frame_forge/font_scaler.py b/frame_forge/font_scaler.py deleted file mode 100644 index 24b832b..0000000 --- a/frame_forge/font_scaler.py +++ /dev/null @@ -1,25 +0,0 @@ -import math - - -class FontScaler: - def __init__(self, original_font_size=100, original_scale=3.5): - self.original_font_size = original_font_size - self.original_scale = original_scale - - def calculate_scale_factor(self, desired_font_size): - """Calculate the scale factor based on the desired font size.""" - return math.log(desired_font_size) / math.log(self.original_font_size) - - def adjust_scale_factor(self, scale_factor, multiplier): - """Adjust the scale factor with a multiplier.""" - return scale_factor * multiplier - - def scale_font(self, scale_factor): - """Scale the font size based on the original scale and scale factor.""" - return self.original_scale * scale_factor - - def get_adjusted_scale(self, desired_font_size, multiplier=1.0): - """Get the adjusted font scale based on the desired font size and multiplier.""" - scale_factor = self.calculate_scale_factor(desired_font_size) - adjusted_scale_factor = self.adjust_scale_factor(scale_factor, multiplier) - return self.scale_font(adjusted_scale_factor)