[varLib.featureVars] Add TODO for moving things to fontTools.misc

This commit is contained in:
Behdad Esfahbod 2018-11-10 15:09:35 -05:00
parent e85a9755ef
commit 0adc304c7b

View File

@ -11,6 +11,8 @@ from fontTools.otlLib.builder import buildLookup, buildSingleSubstSubtable
from collections import OrderedDict
# TODO Move to fontTools.misc?
# https://stackoverflow.com/questions/1151658/python-hashable-dicts
class hashdict(dict):
"""
@ -72,6 +74,8 @@ class hashdict(dict):
dict.update(result, right)
return result
# TODO Move to fontTools.misc?
def popCount(v):
if v > 0xFFFFFFFF:
return popCount(v >> 32) + popCount(v & 0xFFFFFFFF)