def step_merge_glyphs_from_ufo(path: Path, instance: ufoLib2.Font, *args) -> None: textfile = "" for ar in args: textfile = ar ufo = ufoLib2.Font.open(path) if textfile: glyphSet = Path(textfile).read_text().split(" ") for glyph in glyphSet: instance.addGlyph(ufo[glyph]) else: for glyph in ufo: if glyph.name not in instance: instance.addGlyph(ufo[glyph.name])
def step_merge_glyphs_from_ufo(path: Path, instance: ufoLib2.Font) -> None: ufo = ufoLib2.Font.open(path) for glyph in ufo.glyphOrder: if glyph not in instance.glyphOrder: instance.addGlyph(ufo[glyph])
def step_merge_glyphs_from_ufo(path: Path, instance: ufoLib2.Font) -> None: ufo = ufoLib2.Font.open(path) for glyph in ufo: if glyph.name not in instance: instance.addGlyph(ufo[glyph.name])