only return kern if we parsed it
This commit is contained in:
parent
7ae3d5c418
commit
512e49e6e7
|
@ -525,12 +525,14 @@ proc parseKernTable(buf: string, offset: int): KernTable =
|
||||||
|
|
||||||
buf.eofCheck(i + 2)
|
buf.eofCheck(i + 2)
|
||||||
|
|
||||||
result = KernTable()
|
let version = buf.readUint16(i + 0).swap()
|
||||||
result.version = buf.readUint16(i + 0).swap()
|
|
||||||
i += 2
|
i += 2
|
||||||
|
|
||||||
if result.version == 0:
|
if version == 0:
|
||||||
buf.eofCheck(i + 2)
|
buf.eofCheck(i + 2)
|
||||||
|
|
||||||
|
result = KernTable()
|
||||||
|
result.version = version
|
||||||
result.nTables = buf.readUint16(i + 0).swap()
|
result.nTables = buf.readUint16(i + 0).swap()
|
||||||
i += 2
|
i += 2
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue