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)
|
(self.id, self.fontfilename, self.fontfacename, self.file)
|
||||||
return s
|
return s
|
||||||
|
|
||||||
class ObjectInfo(LRFObject):
|
class ObjectInfo(LRFStream):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@ -128,7 +128,10 @@ class _Canvas(QGraphicsRectItem):
|
|||||||
else:
|
else:
|
||||||
y += line.height
|
y += line.height
|
||||||
if not block.has_content:
|
if not block.has_content:
|
||||||
|
try:
|
||||||
y += block.bs.footskip
|
y += block.bs.footskip
|
||||||
|
except AttributeError: # makelrf generates BlockStyles without footskip
|
||||||
|
pass
|
||||||
block_consumed = True
|
block_consumed = True
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
@ -75,10 +75,13 @@ class FontLoader(object):
|
|||||||
|
|
||||||
def font(self, text_style):
|
def font(self, text_style):
|
||||||
device_font = text_style.fontfacename in FONT_MAP
|
device_font = text_style.fontfacename in FONT_MAP
|
||||||
|
try:
|
||||||
if device_font:
|
if device_font:
|
||||||
face = self.font_map[text_style.fontfacename]
|
face = self.font_map[text_style.fontfacename]
|
||||||
else:
|
else:
|
||||||
face = self.face_map[text_style.fontfacename]
|
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
|
sz = text_style.fontsize
|
||||||
wt = text_style.fontweight
|
wt = text_style.fontweight
|
||||||
|
Loading…
x
Reference in New Issue
Block a user