From 327b4161bc535e9816dfd0815493c7b6a0530da0 Mon Sep 17 00:00:00 2001 From: themancalledjakob Date: Thu, 8 Aug 2024 11:24:15 +0200 Subject: [PATCH] use face_name theoretically enables loading faces of the same font from different files. needs to be tested --- butils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/butils.py b/butils.py index dd21f2b..6dc5418 100644 --- a/butils.py +++ b/butils.py @@ -424,13 +424,14 @@ def load_font_from_filepath(filepath): found = False for f in font3d_data.available_fonts.values(): - if f.font_name == font_name: + if f.font_name == font_name and f.face_name == face_name: found = True break if not found: f = font3d_data.available_fonts.add() f.font_name = font_name - print(f"{__name__} added {font_name}") + f.face_name = face_name + print(f"{__name__} added {font_name} {face_name}") else: remove_list.append(o) for o in remove_list: