From 4df7a50f95e6aa853fd4900a011da0c17d9a552b Mon Sep 17 00:00:00 2001 From: "l.gabrysiak" Date: Sun, 2 Mar 2025 14:14:18 +0100 Subject: [PATCH] mod letter --- backend/open_webui/models/users.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/open_webui/models/users.py b/backend/open_webui/models/users.py index 295562a..8b100c7 100644 --- a/backend/open_webui/models/users.py +++ b/backend/open_webui/models/users.py @@ -371,12 +371,14 @@ class UsersTable: try: font_path = "arial.ttf" font_size = get_font_size(size, letter, font_path) + print(f"1) {font_size}") font = ImageFont.truetype(font_path, font_size) except IOError: # Jeśli Arial nie jest dostępny, użyj czcionki domyślnej font = ImageFont.load_default() # Dla czcionki domyślnej możemy potrzebować innej metody określania rozmiaru - font_size = 20 #min(size) // 2 # To jest przybliżenie, może wymagać dostosowania + font_size = min(size) // 2 # To jest przybliżenie, może wymagać dostosowania + print(f"2) {font_size}") # Obliczanie pozycji tekstu bbox = font.getbbox(letter)