docs: def subset_otf_from_ufo(self, otf_path, ufo):
          """Subset a font using export flags set by glyphsLib.
  
          There are two more settings that can change export behavior:
          "Export Glyphs" and "Remove Glyphs", which are currently not supported
          for complexity reasons. See
          https://github.com/googlei18n/glyphsLib/issues/295.
          """
          from fontTools import subset
  
          # ufo2ft always inserts a ".notdef" glyph as the first glyph
          ufo_order = makeOfficialGlyphOrder(ufo)
          if ".notdef" not in ufo_order:
              ufo_order.insert(0, ".notdef")
          ot_order = TTFont(otf_path).getGlyphOrder()
          assert ot_order[0] == ".notdef"
          assert len(ufo_order) == len(ot_order)
  
          for key in (KEEP_GLYPHS_NEW_KEY, KEEP_GLYPHS_OLD_KEY):
              keep_glyphs_list = ufo.lib.get(key)
              if keep_glyphs_list is not None:
                  keep_glyphs = set(keep_glyphs_list)
                  break
          else:
              keep_glyphs = None
  
          include = []
          for source_name, binary_name in zip(ufo_order, ot_order):
              if keep_glyphs and source_name not in keep_glyphs:
                  continue
  
              if source_name in ufo:
                  exported = ufo[source_name].lib.get(GLYPH_EXPORT_KEY, True)
                  if not exported:
                      continue
  
              include.append(binary_name)
  
          # copied from nototools.subset
          opt = subset.Options()
          opt.name_IDs = ["*"]
          opt.name_legacy = True
          opt.name_languages = ["*"]
          opt.layout_features = ["*"]
          opt.notdef_outline = True
          opt.recalc_bounds = True
          opt.recalc_timestamp = True
          opt.canonical_order = True
  
          opt.glyph_names = True
  
          font = subset.load_font(otf_path, opt, lazy=False)
          subsetter = subset.Subsetter(options=opt)
          subsetter.populate(glyphs=include)
          subsetter.subset(font)
          subset.save_font(font, otf_path, opt)