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) (self.id, self.fontfilename, self.fontfacename, self.file)
return s return s
class ObjectInfo(LRFObject): class ObjectInfo(LRFStream):
pass pass

View File

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

View File

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