function reduceGPOS(gpos, gidset) {
  const result = {
    languages: { DFLT_DFLT: { features: gpos.languages.DFLT_DFLT.features } },
    features: {},
    lookups: {}
  };
  
  for (let feature in gpos.features) {
    if (result.languages.DFLT_DFLT.features.includes(feature)) {
      const lookups = gpos.features[feature];
      result.features[feature] = lookups;
      lookups.forEach(lookup => {
        let resultLookup = result.lookups[lookup] = gpos.lookups[lookup];
        // Simplify kern subtable
        if (gidset && feature.startsWith('kern')) {
          resultLookup.subtables = resultLookup.subtables.map(
            t => simplifyKernSubtable(t, gidset));
        }
      });
    }
  }
  return result;
}
@param {*} gpos @param { Set<string> } gidset