This commit is contained in:
Kovid Goyal 2007-09-24 22:11:48 +00:00
parent 4815ecf0ae
commit 5cebd90e8e
3 changed files with 12 additions and 6 deletions

View File

@ -985,7 +985,7 @@ class Font(LRFStream):
(self.id, self.fontfilename, self.fontfacename, self.file)
return s
class ObjectInfo(LRFObject):
class ObjectInfo(LRFStream):
pass

View File

@ -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:

View File

@ -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