mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #219
This commit is contained in:
parent
4815ecf0ae
commit
5cebd90e8e
@ -985,7 +985,7 @@ class Font(LRFStream):
|
||||
(self.id, self.fontfilename, self.fontfacename, self.file)
|
||||
return s
|
||||
|
||||
class ObjectInfo(LRFObject):
|
||||
class ObjectInfo(LRFStream):
|
||||
pass
|
||||
|
||||
|
||||
|
@ -128,7 +128,10 @@ class _Canvas(QGraphicsRectItem):
|
||||
else:
|
||||
y += line.height
|
||||
if not block.has_content:
|
||||
y += block.bs.footskip
|
||||
try:
|
||||
y += block.bs.footskip
|
||||
except AttributeError: # makelrf generates BlockStyles without footskip
|
||||
pass
|
||||
block_consumed = True
|
||||
break
|
||||
else:
|
||||
|
@ -75,10 +75,13 @@ class FontLoader(object):
|
||||
|
||||
def font(self, text_style):
|
||||
device_font = text_style.fontfacename in FONT_MAP
|
||||
if device_font:
|
||||
face = self.font_map[text_style.fontfacename]
|
||||
else:
|
||||
face = self.face_map[text_style.fontfacename]
|
||||
try:
|
||||
if device_font:
|
||||
face = self.font_map[text_style.fontfacename]
|
||||
else:
|
||||
face = self.face_map[text_style.fontfacename]
|
||||
except KeyError: # Bad fontfacename field in LRF
|
||||
face = self.font_map['Dutch801 Rm BT Roman']
|
||||
|
||||
sz = text_style.fontsize
|
||||
wt = text_style.fontweight
|
||||
|
Loading…
x
Reference in New Issue
Block a user