[instancer] make varstore items sorting method match fonttool's

Also update expected tests
pull/4410/head
Qunxin Liu 1 year ago
parent b5f7ca1ab4
commit ef4ff1d6a4
  1. 9
      src/hb-ot-var-common.hh
  2. BIN
      test/subset/data/expected/glyf_partial_instancing/Roboto-Variable.ABC.no-tables-with-item-variations.retain-all-codepoint.wght=200-300-500,wdth=80-90.ttf
  3. BIN
      test/subset/data/expected/glyf_partial_instancing/Roboto-Variable.ABC.no-tables-with-item-variations.retain-all-codepoint.wght=300-600,wdth=85.ttf
  4. BIN
      test/subset/data/expected/glyf_partial_instancing/Roboto-Variable.composite.no-tables-with-item-variations.retain-all-codepoint.wght=200-300-500,wdth=80-90.ttf
  5. BIN
      test/subset/data/expected/glyf_partial_instancing/Roboto-Variable.composite.no-tables-with-item-variations.retain-all-codepoint.wght=300-600,wdth=85.ttf
  6. BIN
      test/subset/data/expected/mvar_partial_instance/NotoSans-VF.abc.no-tables-with-item-variations.retain-all-codepoint.wght=200-600,wdth=80-90,CTGR=20-60.ttf
  7. BIN
      test/subset/data/expected/mvar_partial_instance/NotoSans-VF.abc.no-tables-with-item-variations.retain-all-codepoint.wght=300-600.ttf
  8. BIN
      test/subset/data/expected/update_def_wght/SourceSerifVariable-Roman.no-tables-with-item-variations.retain-all-codepoint.wght=300-600.ttf
  9. BIN
      test/subset/data/expected/update_def_wght/SourceSerifVariable-Roman.no-tables-with-item-variations.retain-all-codepoint.wght=500-800.ttf

@ -2174,7 +2174,14 @@ struct item_variations_t
const hb_vector_t<int>** a = (const hb_vector_t<int>**) pa;
const hb_vector_t<int>** b = (const hb_vector_t<int>**) pb;
return ((*b)->as_array ()).cmp ((*a)->as_array ());
for (unsigned i = 0; i < (*b)->length; i++)
{
int va = (*a)->arrayZ[i];
int vb = (*b)->arrayZ[i];
if (va != vb)
return va < vb ? -1 : 1;
}
return 0;
}
};

Loading…
Cancel
Save