From 338374e170212e940311ad8ae684b378480a510b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 7 Jun 2017 15:22:46 +0200 Subject: [PATCH] [morx] Minor --- Lib/fontTools/ttLib/tables/otBase.py | 3 +++ Lib/fontTools/ttLib/tables/otConverters.py | 1 + 2 files changed, 4 insertions(+) diff --git a/Lib/fontTools/ttLib/tables/otBase.py b/Lib/fontTools/ttLib/tables/otBase.py index 5b5294a56..283ca4cb4 100644 --- a/Lib/fontTools/ttLib/tables/otBase.py +++ b/Lib/fontTools/ttLib/tables/otBase.py @@ -233,6 +233,9 @@ class OTTableWriter(object): def __getitem__(self, name): return self.localState[name] + def __delitem__(self, name): + del self.localState[name] + # assembler interface def getDataLength(self): diff --git a/Lib/fontTools/ttLib/tables/otConverters.py b/Lib/fontTools/ttLib/tables/otConverters.py index 28a5b04bf..65bc7b00f 100644 --- a/Lib/fontTools/ttLib/tables/otConverters.py +++ b/Lib/fontTools/ttLib/tables/otConverters.py @@ -434,6 +434,7 @@ class StructWithLength(Struct): def write(self, writer, font, tableDict, value, repeatIndex=None): value.compile(writer, font) writer['StructLength'].setValue(writer.getDataLength()) + del writer['StructLength'] class Table(Struct):