Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, font, tables):
self._font = font
self._tables = tables
upem = font.unitsPerEm
face = hb.Face.create_for_tables(_get_layout_table, tables)
face.upem = upem
font = hb.Font.create(face)
font.scale = (upem, upem)
funcs = hb.FontFuncs.create()
funcs.set_nominal_glyph_func(_get_nominal_glyph, self)
funcs.set_glyph_h_advance_func(_get_glyph_h_advance, self)
# TODO: vertical advance
funcs.set_glyph_name_func(_get_glyph_name_func, self)
font.funcs = funcs
self._hbFont = font