mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 00:24:13 +08:00
ala
This commit is contained in:
parent
9296699635
commit
b86f69da74
@ -40,7 +40,8 @@ if __name__ == "__main__":
|
||||
)
|
||||
font = QFont()
|
||||
font.setStyleStrategy(QFont.StyleStrategy.PreferAntialias)
|
||||
font.setHintingPreference(QFont.HintingPreference.PreferNoHinting)
|
||||
font.setHintingPreference(QFont.HintingPreference.PreferFullHinting)
|
||||
# 必须PreferFullHinting,不能PreferNoHinting,否则阿拉伯语显示不出来
|
||||
QApplication.setFont(font)
|
||||
|
||||
app = QApplication(sys.argv)
|
||||
|
@ -58,10 +58,10 @@ class base(QLabel):
|
||||
def move(self, point: QPoint):
|
||||
self.movedx = 0
|
||||
self.movedy = 0
|
||||
text = self.text()
|
||||
isarabic = any((ord(char) >= 0x0600 and ord(char) <= 0x06E0) for char in text)
|
||||
if isarabic:
|
||||
self.movedx -= self.width()
|
||||
# text = self.text()
|
||||
# isarabic = any((ord(char) >= 0x0600 and ord(char) <= 0x06E0) for char in text)
|
||||
# if isarabic:
|
||||
# self.movedx -= self.width()
|
||||
x, y = self.moveoffset()
|
||||
self.movedx -= x
|
||||
self.movedy -= y
|
||||
|
Loading…
x
Reference in New Issue
Block a user