/src/harfbuzz/src/hb-subset-table-var.cc
Line | Count | Source |
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 | 329k | { |
12 | 329k | #ifndef HB_NO_VAR |
13 | 329k | switch (tag) |
14 | 329k | { |
15 | 786 | case HB_TAG('H','V','A','R'): *success = _hb_subset_table<const OT::HVAR> (plan, buf); return true; |
16 | 194 | case HB_TAG('V','V','A','R'): *success = _hb_subset_table<const OT::VVAR> (plan, buf); return true; |
17 | 587 | case HB_TAG('g','v','a','r'): *success = _hb_subset_table<const OT::gvar> (plan, buf); return true; |
18 | 1.17k | case HB_TAG('f','v','a','r'): |
19 | 1.17k | if (plan->user_axes_location.is_empty ()) |
20 | 753 | *success = _hb_subset_table_passthrough (plan, tag); |
21 | 418 | else |
22 | 418 | *success = _hb_subset_table<const OT::fvar> (plan, buf); |
23 | 1.17k | return true; |
24 | 162 | case HB_TAG('a','v','a','r'): |
25 | 162 | if (plan->user_axes_location.is_empty ()) |
26 | 135 | *success = _hb_subset_table_passthrough (plan, tag); |
27 | 27 | else |
28 | 27 | *success = _hb_subset_table<const OT::avar> (plan, buf); |
29 | 162 | return true; |
30 | 10 | case HB_TAG('c','v','a','r'): |
31 | 10 | if (plan->user_axes_location.is_empty ()) |
32 | 10 | *success = _hb_subset_table_passthrough (plan, tag); |
33 | 0 | else |
34 | 0 | *success = _hb_subset_table<const OT::cvar> (plan, buf); |
35 | 10 | return true; |
36 | 185 | case HB_TAG('M','V','A','R'): |
37 | 185 | if (plan->user_axes_location.is_empty ()) |
38 | 185 | *success = _hb_subset_table_passthrough (plan, tag); |
39 | 0 | else |
40 | 0 | *success = _hb_subset_table<const OT::MVAR> (plan, buf); |
41 | 185 | return true; |
42 | 329k | } |
43 | 326k | #endif |
44 | 326k | return false; |
45 | 329k | } |