hb-subset-table-var.cc (1625B)
1 #include "hb-subset-table.hh" 2 3 #include "hb-ot-var-hvar-table.hh" 4 #include "hb-ot-var-gvar-table.hh" 5 #include "hb-ot-var-fvar-table.hh" 6 #include "hb-ot-var-avar-table.hh" 7 #include "hb-ot-var-cvar-table.hh" 8 #include "hb-ot-var-mvar-table.hh" 9 10 bool _hb_subset_table_var (hb_subset_plan_t *plan, hb_vector_t<char> &buf, hb_tag_t tag, bool *success) 11 { 12 #ifndef HB_NO_VAR 13 switch (tag) 14 { 15 case HB_TAG('H','V','A','R'): *success = _hb_subset_table<const OT::HVAR> (plan, buf); return true; 16 case HB_TAG('V','V','A','R'): *success = _hb_subset_table<const OT::VVAR> (plan, buf); return true; 17 case HB_TAG('g','v','a','r'): *success = _hb_subset_table<const OT::gvar> (plan, buf); return true; 18 case HB_TAG('f','v','a','r'): 19 if (plan->user_axes_location.is_empty ()) 20 *success = _hb_subset_table_passthrough (plan, tag); 21 else 22 *success = _hb_subset_table<const OT::fvar> (plan, buf); 23 return true; 24 case HB_TAG('a','v','a','r'): 25 if (plan->user_axes_location.is_empty ()) 26 *success = _hb_subset_table_passthrough (plan, tag); 27 else 28 *success = _hb_subset_table<const OT::avar> (plan, buf); 29 return true; 30 case HB_TAG('c','v','a','r'): 31 if (plan->user_axes_location.is_empty ()) 32 *success = _hb_subset_table_passthrough (plan, tag); 33 else 34 *success = _hb_subset_table<const OT::cvar> (plan, buf); 35 return true; 36 case HB_TAG('M','V','A','R'): 37 if (plan->user_axes_location.is_empty ()) 38 *success = _hb_subset_table_passthrough (plan, tag); 39 else 40 *success = _hb_subset_table<const OT::MVAR> (plan, buf); 41 return true; 42 } 43 #endif 44 return false; 45 }