[subset/merge] Fix namespace clash
Fixes https://github.com/fonttools/fonttools/issues/1955
This commit is contained in:
parent
7a723b7344
commit
26ac716a8d
@ -742,12 +742,12 @@ def __merge_classify_context(self):
|
|||||||
|
|
||||||
if self.Format not in [1, 2, 3]:
|
if self.Format not in [1, 2, 3]:
|
||||||
return None # Don't shoot the messenger; let it go
|
return None # Don't shoot the messenger; let it go
|
||||||
if not hasattr(self.__class__, "__ContextHelpers"):
|
if not hasattr(self.__class__, "_merge__ContextHelpers"):
|
||||||
self.__class__.__ContextHelpers = {}
|
self.__class__._merge__ContextHelpers = {}
|
||||||
if self.Format not in self.__class__.__ContextHelpers:
|
if self.Format not in self.__class__._merge__ContextHelpers:
|
||||||
helper = ContextHelper(self.__class__, self.Format)
|
helper = ContextHelper(self.__class__, self.Format)
|
||||||
self.__class__.__ContextHelpers[self.Format] = helper
|
self.__class__._merge__ContextHelpers[self.Format] = helper
|
||||||
return self.__class__.__ContextHelpers[self.Format]
|
return self.__class__._merge__ContextHelpers[self.Format]
|
||||||
|
|
||||||
|
|
||||||
@_add_method(otTables.ContextSubst,
|
@_add_method(otTables.ContextSubst,
|
||||||
|
@ -899,12 +899,12 @@ def __subset_classify_context(self):
|
|||||||
|
|
||||||
if self.Format not in [1, 2, 3]:
|
if self.Format not in [1, 2, 3]:
|
||||||
return None # Don't shoot the messenger; let it go
|
return None # Don't shoot the messenger; let it go
|
||||||
if not hasattr(self.__class__, "__ContextHelpers"):
|
if not hasattr(self.__class__, "_subset__ContextHelpers"):
|
||||||
self.__class__.__ContextHelpers = {}
|
self.__class__._subset__ContextHelpers = {}
|
||||||
if self.Format not in self.__class__.__ContextHelpers:
|
if self.Format not in self.__class__._subset__ContextHelpers:
|
||||||
helper = ContextHelper(self.__class__, self.Format)
|
helper = ContextHelper(self.__class__, self.Format)
|
||||||
self.__class__.__ContextHelpers[self.Format] = helper
|
self.__class__._subset__ContextHelpers[self.Format] = helper
|
||||||
return self.__class__.__ContextHelpers[self.Format]
|
return self.__class__._subset__ContextHelpers[self.Format]
|
||||||
|
|
||||||
@_add_method(otTables.ContextSubst,
|
@_add_method(otTables.ContextSubst,
|
||||||
otTables.ChainContextSubst)
|
otTables.ChainContextSubst)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user