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