mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
e806e2f2df
commit
fb41c8c881
@ -1164,6 +1164,10 @@ class FontRecord(object): # {{{
|
|||||||
hdr = self.payload[:4]
|
hdr = self.payload[:4]
|
||||||
if hdr in {b'\0\1\0\0', b'true', b'ttcf'}:
|
if hdr in {b'\0\1\0\0', b'true', b'ttcf'}:
|
||||||
self.ext = 'ttf'
|
self.ext = 'ttf'
|
||||||
|
if self.uncompressed_size != len(self.payload):
|
||||||
|
raise ValueError('Font record uncompressed size mismatch',
|
||||||
|
' expected: %d actual: %d'%(self.uncompressed_size,
|
||||||
|
len(self.payload)))
|
||||||
else:
|
else:
|
||||||
print ('Unknown font record with fields: %s' %
|
print ('Unknown font record with fields: %s' %
|
||||||
[self.uncompressed_size, self.unknown1, self.unknown2])
|
[self.uncompressed_size, self.unknown1, self.unknown2])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user