mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 11:14:02 +02:00
pyqt6: More enum goodness, this time in the font chooser widget
This commit is contained in:
parent
c3cf64bbdd
commit
a1b7ec4637
1 changed files with 5 additions and 5 deletions
|
|
@ -70,17 +70,17 @@ def writing_system_for_font(font):
|
|||
if not systems:
|
||||
return system, has_latin
|
||||
|
||||
if (len(systems) == 1 and systems[0] > QFontDatabase.WritingSystem.Cyrillic):
|
||||
if (len(systems) == 1 and systems[0].value > QFontDatabase.WritingSystem.Cyrillic.value):
|
||||
return systems[0], has_latin
|
||||
|
||||
if (len(systems) <= 2 and
|
||||
systems[-1] > QFontDatabase.WritingSystem.Armenian and
|
||||
systems[-1] < QFontDatabase.WritingSystem.Vietnamese):
|
||||
systems[-1].value > QFontDatabase.WritingSystem.Armenian.value and
|
||||
systems[-1].value < QFontDatabase.WritingSystem.Vietnamese.value):
|
||||
return systems[-1], has_latin
|
||||
|
||||
if (len(systems) <= 5 and
|
||||
systems[-1] >= QFontDatabase.WritingSystem.SimplifiedChinese and
|
||||
systems[-1] <= QFontDatabase.WritingSystem.Korean):
|
||||
systems[-1].value >= QFontDatabase.WritingSystem.SimplifiedChinese.value and
|
||||
systems[-1].value <= QFontDatabase.WritingSystem.Korean.value):
|
||||
system = systems[-1]
|
||||
|
||||
return system, has_latin
|
||||
|
|
|
|||
Loading…
Reference in a new issue