/src/harfbuzz/src/OT/Layout/Common/CoverageFormat1.hh
Line | Count | Source |
1 | | /* |
2 | | * Copyright © 2007,2008,2009 Red Hat, Inc. |
3 | | * Copyright © 2010,2012 Google, Inc. |
4 | | * |
5 | | * This is part of HarfBuzz, a text shaping library. |
6 | | * |
7 | | * Permission is hereby granted, without written agreement and without |
8 | | * license or royalty fees, to use, copy, modify, and distribute this |
9 | | * software and its documentation for any purpose, provided that the |
10 | | * above copyright notice and the following two paragraphs appear in |
11 | | * all copies of this software. |
12 | | * |
13 | | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR |
14 | | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES |
15 | | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN |
16 | | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH |
17 | | * DAMAGE. |
18 | | * |
19 | | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, |
20 | | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND |
21 | | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS |
22 | | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO |
23 | | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
24 | | * |
25 | | * Red Hat Author(s): Behdad Esfahbod |
26 | | * Google Author(s): Behdad Esfahbod, Garret Rieger |
27 | | */ |
28 | | |
29 | | |
30 | | #ifndef OT_LAYOUT_COMMON_COVERAGEFORMAT1_HH |
31 | | #define OT_LAYOUT_COMMON_COVERAGEFORMAT1_HH |
32 | | |
33 | | namespace OT { |
34 | | namespace Layout { |
35 | | namespace Common { |
36 | | |
37 | 0 | #define NOT_COVERED ((unsigned int) -1) |
38 | | |
39 | | template <typename Types> |
40 | | struct CoverageFormat1_3 |
41 | | { |
42 | | friend struct Coverage; |
43 | | |
44 | | protected: |
45 | | HBUINT16 coverageFormat; /* Format identifier--format = 1 */ |
46 | | SortedArray16Of<typename Types::HBGlyphID> |
47 | | glyphArray; /* Array of GlyphIDs--in numerical order */ |
48 | | public: |
49 | | DEFINE_SIZE_ARRAY (4, glyphArray); |
50 | | |
51 | | private: |
52 | | bool sanitize (hb_sanitize_context_t *c) const |
53 | 2.14k | { |
54 | 2.14k | TRACE_SANITIZE (this); |
55 | 2.14k | return_trace (glyphArray.sanitize (c)); |
56 | 2.14k | } |
57 | | |
58 | | unsigned int get_coverage (hb_codepoint_t glyph_id) const |
59 | 0 | { |
60 | 0 | unsigned int i; |
61 | 0 | glyphArray.bfind (glyph_id, &i, HB_NOT_FOUND_STORE, NOT_COVERED); |
62 | 0 | return i; |
63 | 0 | } |
64 | | |
65 | | unsigned get_population () const |
66 | 28 | { |
67 | 28 | return glyphArray.len; |
68 | 28 | } |
69 | | |
70 | | template <typename Iterator, |
71 | | hb_requires (hb_is_sorted_source_of (Iterator, hb_codepoint_t))> |
72 | | bool serialize (hb_serialize_context_t *c, Iterator glyphs) |
73 | 0 | { |
74 | 0 | TRACE_SERIALIZE (this); |
75 | 0 | return_trace (glyphArray.serialize (c, glyphs)); |
76 | 0 | } Unexecuted instantiation: _ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI17hb_sorted_array_tIKjETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSA_18is_sorted_iteratorEvE4typeELPv0EEEbP22hb_serialize_context_tSA_ Unexecuted instantiation: hb-ot-face.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tI13hb_zip_iter_tIS6_IN23hb_bit_set_invertible_t6iter_tERK8hb_map_tL24hb_function_sortedness_t1ELPv0EE16hb_repeat_iter_tI10hb_array_tIKNS_7NumTypeILb1EtLj2EEEEEERK3$_6LSD_1ELSE_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrST_18is_sorted_iteratorEvE4typeELSE_0EEEbP22hb_serialize_context_tST_ Unexecuted instantiation: hb-ot-face.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tI13hb_zip_iter_tINS1_8Coverage6iter_tE15hb_range_iter_tIjjEERK8hb_set_tRK3$_6LPv0EEZNKS0_9GPOS_impl16SinglePosFormat26subsetEP19hb_subset_context_tEUlRK9hb_pair_tIjjEE_L24hb_function_sortedness_t1ELSK_0EESJ_LSV_1ELSK_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSZ_18is_sorted_iteratorEvE4typeELSK_0EEEbP22hb_serialize_context_tSZ_ Unexecuted instantiation: hb-ot-face.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tI13hb_zip_iter_tINS1_8Coverage6iter_tE10hb_array_tIKNS0_9GPOS_impl15EntryExitRecordEEERK8hb_set_tRK3$_6LPv0EEZNKSC_17CursivePosFormat16subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSE_EE_L24hb_function_sortedness_t1ELSN_0EESM_LSW_1ELSN_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrS10_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tS10_ Unexecuted instantiation: hb-ot-face.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tI13hb_zip_iter_tINS1_8Coverage6iter_tE10hb_array_tIKNS0_9GPOS_impl10MarkRecordEEERK8hb_set_tRK3$_6LPv0EESM_L24hb_function_sortedness_t1ELSN_0EERK8hb_map_tLSP_1ELSN_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSW_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tSW_ Unexecuted instantiation: _ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI17hb_sorted_array_tIKNS_11HBGlyphID16EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSB_18is_sorted_iteratorEvE4typeELPv0EEEbP22hb_serialize_context_tSB_ Unexecuted instantiation: hb-ot-face.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tIS7_I13hb_zip_iter_tINS1_8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID16EEERK8hb_set_tRK3$_6LPv0EESI_RK3$_7LSM_0EEZNKS0_9GSUB_impl30ReverseChainSingleSubstFormat16subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSD_EE_L24hb_function_sortedness_t1ELSM_0EESL_LS10_1ELSM_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrS14_18is_sorted_iteratorEvE4typeELSM_0EEEbP22hb_serialize_context_tS14_ Unexecuted instantiation: hb-ot-face.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tIS6_IN23hb_bit_set_invertible_t6iter_tEZNKS0_9GSUB_impl20SingleSubstFormat1_3IS3_E6subsetEP19hb_subset_context_tEUljE_L24hb_function_sortedness_t1ELPv0EERK8hb_set_tRK3$_7LSH_0EEZNKSC_6subsetESE_EUl9hb_pair_tIjjEE_LSG_1ELSH_0EERK3$_6LSG_1ELSH_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSZ_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSZ_ Unexecuted instantiation: hb-ot-face.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tIS7_I13hb_zip_iter_tINS1_8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID16EEERK8hb_set_tRK3$_6LPv0EESI_RK3$_7LSM_0EEZNKS0_9GSUB_impl20SingleSubstFormat2_4IS3_E6subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSD_EE_L24hb_function_sortedness_t1ELSM_0EESL_LS11_1ELSM_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrS15_18is_sorted_iteratorEvE4typeELSM_0EEEbP22hb_serialize_context_tS15_ Unexecuted instantiation: _ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIN23hb_bit_set_invertible_t6iter_tERK8hb_map_tL24hb_function_sortedness_t1ELPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSG_18is_sorted_iteratorEvE4typeELSD_0EEEbP22hb_serialize_context_tSG_ Unexecuted instantiation: hb-aat-layout.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tI13hb_zip_iter_tIS6_IN23hb_bit_set_invertible_t6iter_tERK8hb_map_tL24hb_function_sortedness_t1ELPv0EE16hb_repeat_iter_tI10hb_array_tIKNS_7NumTypeILb1EtLj2EEEEEERK3$_6LSD_1ELSE_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrST_18is_sorted_iteratorEvE4typeELSE_0EEEbP22hb_serialize_context_tST_ Unexecuted instantiation: hb-aat-layout.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tI13hb_zip_iter_tINS1_8Coverage6iter_tE15hb_range_iter_tIjjEERK8hb_set_tRK3$_6LPv0EEZNKS0_9GPOS_impl16SinglePosFormat26subsetEP19hb_subset_context_tEUlRK9hb_pair_tIjjEE_L24hb_function_sortedness_t1ELSK_0EESJ_LSV_1ELSK_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSZ_18is_sorted_iteratorEvE4typeELSK_0EEEbP22hb_serialize_context_tSZ_ Unexecuted instantiation: hb-aat-layout.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tI13hb_zip_iter_tINS1_8Coverage6iter_tE10hb_array_tIKNS0_9GPOS_impl15EntryExitRecordEEERK8hb_set_tRK3$_6LPv0EEZNKSC_17CursivePosFormat16subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSE_EE_L24hb_function_sortedness_t1ELSN_0EESM_LSW_1ELSN_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrS10_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tS10_ Unexecuted instantiation: hb-aat-layout.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tI13hb_zip_iter_tINS1_8Coverage6iter_tE10hb_array_tIKNS0_9GPOS_impl10MarkRecordEEERK8hb_set_tRK3$_6LPv0EESM_L24hb_function_sortedness_t1ELSN_0EERK8hb_map_tLSP_1ELSN_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSW_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tSW_ Unexecuted instantiation: hb-aat-layout.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tIS7_I13hb_zip_iter_tINS1_8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID16EEERK8hb_set_tRK3$_6LPv0EESI_RK3$_7LSM_0EEZNKS0_9GSUB_impl30ReverseChainSingleSubstFormat16subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSD_EE_L24hb_function_sortedness_t1ELSM_0EESL_LS10_1ELSM_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrS14_18is_sorted_iteratorEvE4typeELSM_0EEEbP22hb_serialize_context_tS14_ Unexecuted instantiation: hb-aat-layout.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tIS6_IN23hb_bit_set_invertible_t6iter_tEZNKS0_9GSUB_impl20SingleSubstFormat1_3IS3_E6subsetEP19hb_subset_context_tEUljE_L24hb_function_sortedness_t1ELPv0EERK8hb_set_tRK3$_7LSH_0EEZNKSC_6subsetESE_EUl9hb_pair_tIjjEE_LSG_1ELSH_0EERK3$_6LSG_1ELSH_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSZ_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSZ_ Unexecuted instantiation: hb-aat-layout.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tIS7_I13hb_zip_iter_tINS1_8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID16EEERK8hb_set_tRK3$_6LPv0EESI_RK3$_7LSM_0EEZNKS0_9GSUB_impl20SingleSubstFormat2_4IS3_E6subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSD_EE_L24hb_function_sortedness_t1ELSM_0EESL_LS11_1ELSM_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrS15_18is_sorted_iteratorEvE4typeELSM_0EEEbP22hb_serialize_context_tS15_ Unexecuted instantiation: hb-ot-layout.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tI13hb_zip_iter_tIS6_IN23hb_bit_set_invertible_t6iter_tERK8hb_map_tL24hb_function_sortedness_t1ELPv0EE16hb_repeat_iter_tI10hb_array_tIKNS_7NumTypeILb1EtLj2EEEEEERK3$_6LSD_1ELSE_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrST_18is_sorted_iteratorEvE4typeELSE_0EEEbP22hb_serialize_context_tST_ Unexecuted instantiation: hb-ot-layout.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tI13hb_zip_iter_tINS1_8Coverage6iter_tE15hb_range_iter_tIjjEERK8hb_set_tRK3$_6LPv0EEZNKS0_9GPOS_impl16SinglePosFormat26subsetEP19hb_subset_context_tEUlRK9hb_pair_tIjjEE_L24hb_function_sortedness_t1ELSK_0EESJ_LSV_1ELSK_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSZ_18is_sorted_iteratorEvE4typeELSK_0EEEbP22hb_serialize_context_tSZ_ Unexecuted instantiation: hb-ot-layout.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tI13hb_zip_iter_tINS1_8Coverage6iter_tE10hb_array_tIKNS0_9GPOS_impl15EntryExitRecordEEERK8hb_set_tRK3$_6LPv0EEZNKSC_17CursivePosFormat16subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSE_EE_L24hb_function_sortedness_t1ELSN_0EESM_LSW_1ELSN_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrS10_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tS10_ Unexecuted instantiation: hb-ot-layout.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tI13hb_zip_iter_tINS1_8Coverage6iter_tE10hb_array_tIKNS0_9GPOS_impl10MarkRecordEEERK8hb_set_tRK3$_6LPv0EESM_L24hb_function_sortedness_t1ELSN_0EERK8hb_map_tLSP_1ELSN_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSW_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tSW_ Unexecuted instantiation: hb-ot-layout.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tIS7_I13hb_zip_iter_tINS1_8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID16EEERK8hb_set_tRK3$_6LPv0EESI_RK3$_7LSM_0EEZNKS0_9GSUB_impl30ReverseChainSingleSubstFormat16subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSD_EE_L24hb_function_sortedness_t1ELSM_0EESL_LS10_1ELSM_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrS14_18is_sorted_iteratorEvE4typeELSM_0EEEbP22hb_serialize_context_tS14_ Unexecuted instantiation: hb-ot-layout.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tIS6_IN23hb_bit_set_invertible_t6iter_tEZNKS0_9GSUB_impl20SingleSubstFormat1_3IS3_E6subsetEP19hb_subset_context_tEUljE_L24hb_function_sortedness_t1ELPv0EERK8hb_set_tRK3$_7LSH_0EEZNKSC_6subsetESE_EUl9hb_pair_tIjjEE_LSG_1ELSH_0EERK3$_6LSG_1ELSH_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSZ_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSZ_ Unexecuted instantiation: hb-ot-layout.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tIS7_I13hb_zip_iter_tINS1_8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID16EEERK8hb_set_tRK3$_6LPv0EESI_RK3$_7LSM_0EEZNKS0_9GSUB_impl20SingleSubstFormat2_4IS3_E6subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSD_EE_L24hb_function_sortedness_t1ELSM_0EESL_LS11_1ELSM_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrS15_18is_sorted_iteratorEvE4typeELSM_0EEEbP22hb_serialize_context_tS15_ Unexecuted instantiation: hb-ot-shaper-arabic.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tI13hb_zip_iter_tI17hb_sorted_array_tINS_11HBGlyphID16EE10hb_array_tIS9_EERK3$_6L24hb_function_sortedness_t1ELPv0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSL_18is_sorted_iteratorEvE4typeELSI_0EEEbP22hb_serialize_context_tSL_ Unexecuted instantiation: hb-ot-shaper-arabic.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tIS7_I13hb_zip_iter_tINS1_8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID16EEERK8hb_set_tRK3$_6LPv0EESI_RK3$_7LSM_0EEZNKS0_9GSUB_impl30ReverseChainSingleSubstFormat16subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSD_EE_L24hb_function_sortedness_t1ELSM_0EESL_LS10_1ELSM_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrS14_18is_sorted_iteratorEvE4typeELSM_0EEEbP22hb_serialize_context_tS14_ Unexecuted instantiation: hb-ot-shaper-arabic.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tIS6_IN23hb_bit_set_invertible_t6iter_tEZNKS0_9GSUB_impl20SingleSubstFormat1_3IS3_E6subsetEP19hb_subset_context_tEUljE_L24hb_function_sortedness_t1ELPv0EERK8hb_set_tRK3$_7LSH_0EEZNKSC_6subsetESE_EUl9hb_pair_tIjjEE_LSG_1ELSH_0EERK3$_6LSG_1ELSH_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSZ_18is_sorted_iteratorEvE4typeELSH_0EEEbP22hb_serialize_context_tSZ_ Unexecuted instantiation: hb-ot-shaper-arabic.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tIS7_I13hb_zip_iter_tINS1_8Coverage6iter_tE10hb_array_tIKNS_11HBGlyphID16EEERK8hb_set_tRK3$_6LPv0EESI_RK3$_7LSM_0EEZNKS0_9GSUB_impl20SingleSubstFormat2_4IS3_E6subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSD_EE_L24hb_function_sortedness_t1ELSM_0EESL_LS11_1ELSM_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrS15_18is_sorted_iteratorEvE4typeELSM_0EEEbP22hb_serialize_context_tS15_ Unexecuted instantiation: hb-ot-shape-fallback.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tI13hb_zip_iter_tIS6_IN23hb_bit_set_invertible_t6iter_tERK8hb_map_tL24hb_function_sortedness_t1ELPv0EE16hb_repeat_iter_tI10hb_array_tIKNS_7NumTypeILb1EtLj2EEEEEERK3$_6LSD_1ELSE_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrST_18is_sorted_iteratorEvE4typeELSE_0EEEbP22hb_serialize_context_tST_ Unexecuted instantiation: hb-ot-shape-fallback.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tI13hb_zip_iter_tINS1_8Coverage6iter_tE15hb_range_iter_tIjjEERK8hb_set_tRK3$_6LPv0EEZNKS0_9GPOS_impl16SinglePosFormat26subsetEP19hb_subset_context_tEUlRK9hb_pair_tIjjEE_L24hb_function_sortedness_t1ELSK_0EESJ_LSV_1ELSK_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSZ_18is_sorted_iteratorEvE4typeELSK_0EEEbP22hb_serialize_context_tSZ_ Unexecuted instantiation: hb-ot-shape-fallback.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tI13hb_zip_iter_tINS1_8Coverage6iter_tE10hb_array_tIKNS0_9GPOS_impl15EntryExitRecordEEERK8hb_set_tRK3$_6LPv0EEZNKSC_17CursivePosFormat16subsetEP19hb_subset_context_tEUl9hb_pair_tIjRSE_EE_L24hb_function_sortedness_t1ELSN_0EESM_LSW_1ELSN_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrS10_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tS10_ Unexecuted instantiation: hb-ot-shape-fallback.cc:_ZN2OT6Layout6Common17CoverageFormat1_3INS0_10SmallTypesEE9serializeI13hb_map_iter_tIS6_I16hb_filter_iter_tI13hb_zip_iter_tINS1_8Coverage6iter_tE10hb_array_tIKNS0_9GPOS_impl10MarkRecordEEERK8hb_set_tRK3$_6LPv0EESM_L24hb_function_sortedness_t1ELSN_0EERK8hb_map_tLSP_1ELSN_0EETnPN12hb_enable_ifIXaasr15hb_is_source_ofIT_jEE5valuesrSW_18is_sorted_iteratorEvE4typeELSN_0EEEbP22hb_serialize_context_tSW_ |
77 | | |
78 | | bool intersects (const hb_set_t *glyphs) const |
79 | 0 | { |
80 | 0 | if (glyphArray.len > glyphs->get_population () * hb_bit_storage ((unsigned) glyphArray.len)) |
81 | 0 | { |
82 | 0 | for (auto g : *glyphs) |
83 | 0 | if (get_coverage (g) != NOT_COVERED) |
84 | 0 | return true; |
85 | 0 | return false; |
86 | 0 | } |
87 | | |
88 | 0 | for (const auto& g : glyphArray.as_array ()) |
89 | 0 | if (glyphs->has (g)) |
90 | 0 | return true; |
91 | 0 | return false; |
92 | 0 | } |
93 | | bool intersects_coverage (const hb_set_t *glyphs, unsigned int index) const |
94 | 0 | { return glyphs->has (glyphArray[index]); } |
95 | | |
96 | | template <typename IterableOut, |
97 | | hb_requires (hb_is_sink_of (IterableOut, hb_codepoint_t))> |
98 | | void intersect_set (const hb_set_t &glyphs, IterableOut&& intersect_glyphs) const |
99 | 0 | { |
100 | 0 | unsigned count = glyphArray.len; |
101 | 0 | for (unsigned i = 0; i < count; i++) |
102 | 0 | if (glyphs.has (glyphArray[i])) |
103 | 0 | intersect_glyphs << glyphArray[i]; |
104 | 0 | } |
105 | | |
106 | 0 | unsigned cost () const { return hb_bit_storage ((unsigned) glyphArray.len); /* bsearch cost */ } |
107 | | |
108 | | template <typename set_t> |
109 | | bool collect_coverage (set_t *glyphs) const |
110 | 42 | { return glyphs->add_sorted_array (glyphArray.as_array ()); } Unexecuted instantiation: bool OT::Layout::Common::CoverageFormat1_3<OT::Layout::SmallTypes>::collect_coverage<hb_bit_set_t>(hb_bit_set_t*) const Unexecuted instantiation: bool OT::Layout::Common::CoverageFormat1_3<OT::Layout::SmallTypes>::collect_coverage<hb_set_t>(hb_set_t*) const bool OT::Layout::Common::CoverageFormat1_3<OT::Layout::SmallTypes>::collect_coverage<hb_set_digest_t>(hb_set_digest_t*) const Line | Count | Source | 110 | 42 | { return glyphs->add_sorted_array (glyphArray.as_array ()); } |
|
111 | | |
112 | | public: |
113 | | /* Older compilers need this to be public. */ |
114 | | struct iter_t |
115 | | { |
116 | 0 | void init (const struct CoverageFormat1_3 &c_) { c = &c_; i = 0; } |
117 | 0 | bool __more__ () const { return i < c->glyphArray.len; } |
118 | 0 | void __next__ () { i++; } |
119 | 0 | hb_codepoint_t get_glyph () const { return c->glyphArray[i]; } |
120 | | bool operator != (const iter_t& o) const |
121 | 0 | { return i != o.i; } |
122 | 0 | iter_t __end__ () const { iter_t it; it.init (*c); it.i = c->glyphArray.len; return it; } |
123 | | |
124 | | private: |
125 | | const struct CoverageFormat1_3 *c; |
126 | | unsigned int i; |
127 | | }; |
128 | | private: |
129 | | }; |
130 | | |
131 | | } |
132 | | } |
133 | | } |
134 | | |
135 | | #endif // #ifndef OT_LAYOUT_COMMON_COVERAGEFORMAT1_HH |