mirror of
https://github.com/iperov/DeepFaceLive
synced 2025-07-05 12:36:43 -07:00
fix
This commit is contained in:
parent
5298a68581
commit
cd00e0ea31
1 changed files with 8 additions and 8 deletions
|
@ -27,17 +27,17 @@ class QXFontDB():
|
|||
|
||||
families_loaded = []
|
||||
|
||||
for filepath in filepaths:
|
||||
id = QFontDatabase.addApplicationFont(str(filepath))
|
||||
for filepath in filepaths:
|
||||
id = QFontDatabase.addApplicationFont(str(filepath))
|
||||
families_loaded += QFontDatabase.applicationFontFamilies(id)
|
||||
|
||||
families_loaded = list(set(families_loaded))
|
||||
# families_loaded = list(set(families_loaded))
|
||||
|
||||
# if len(families_loaded) > 1:
|
||||
# raise Exception(f'More than one font family loaded from {dir}:\n{families_loaded}\nRemove unnecessary files.')
|
||||
|
||||
if len(families_loaded) > 1:
|
||||
raise Exception(f'More than one font family loaded from {dir}:\n{families_loaded}\nRemove unnecessary files.')
|
||||
|
||||
if name != families_loaded[0]:
|
||||
raise Exception(f'Loaded font family is different from requested: {name} != {families_loaded[0]}')
|
||||
# if name != families_loaded[0]:
|
||||
# raise Exception(f'Loaded font family is different from requested: {name} != {families_loaded[0]}')
|
||||
|
||||
@staticmethod
|
||||
def _get(name : str, size : int, weight=None, italic=False, bold=False):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue