mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Fix #2039855 [Exception when opening LRF file - QFont.setPixelSize gets float instead of int](https://bugs.launchpad.net/calibre/+bug/2039855)
This commit is contained in:
parent
743a9690bb
commit
fd6742faa7
@ -401,7 +401,7 @@ class Line(QGraphicsItem):
|
|||||||
matches = self.__class__.whitespace.finditer(phrase)
|
matches = self.__class__.whitespace.finditer(phrase)
|
||||||
font = QFont(ts.font)
|
font = QFont(ts.font)
|
||||||
if self.valign is not None:
|
if self.valign is not None:
|
||||||
font.setPixelSize(font.pixelSize()/1.5)
|
font.setPixelSize(int(font.pixelSize()/1.5))
|
||||||
fm = QFontMetrics(font)
|
fm = QFontMetrics(font)
|
||||||
single_space_width = fm.horizontalAdvance(' ')
|
single_space_width = fm.horizontalAdvance(' ')
|
||||||
height, descent = fm.height(), fm.descent()
|
height, descent = fm.height(), fm.descent()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user