[VARC] Fix copilot mistake in decompile

Ouch!
This commit is contained in:
Behdad Esfahbod 2023-12-19 18:13:29 -07:00
parent f73d6f2a6f
commit 8ea97657de

View File

@ -244,14 +244,13 @@ class VarComponent:
if flags & VarComponentFlags.GID_IS_24BIT:
glyphID = struct.unpack(">L", b"\0" + data[i : i + 3])[0]
i += 3
flags ^= VarComponentFlags.GID_IS_24BIT
else:
glyphID = struct.unpack(">H", data[i : i + 2])[0]
i += 2
self.glyphName = font.glyphOrder[glyphID]
self.AxisIndicesIndex = self.AxisValuesIndex = self.TransformIndex = None
if flags & VarComponentFlags.INDICES_ARE_LONG == 0x0004:
if flags & VarComponentFlags.INDICES_ARE_LONG:
if flags & VarComponentFlags.HAVE_LOCATION:
self.AxisIndicesIndex, self.AxisValuesIndex = struct.unpack(
">LL", data[i : i + 8]