Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/harfbuzz/src/OT/Layout/GPOS/LigatureArray.hh @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1d09e1dec1d9 | 2:b50eed0cc0ef |
|---|---|
| 1 #ifndef OT_LAYOUT_GPOS_LIGATUREARRAY_HH | |
| 2 #define OT_LAYOUT_GPOS_LIGATUREARRAY_HH | |
| 3 | |
| 4 namespace OT { | |
| 5 namespace Layout { | |
| 6 namespace GPOS_impl { | |
| 7 | |
| 8 | |
| 9 typedef AnchorMatrix LigatureAttach; /* component-major-- | |
| 10 * in order of writing direction--, | |
| 11 * mark-minor-- | |
| 12 * ordered by class--zero-based. */ | |
| 13 | |
| 14 /* Array of LigatureAttach tables ordered by LigatureCoverage Index */ | |
| 15 struct LigatureArray : List16OfOffset16To<LigatureAttach> | |
| 16 { | |
| 17 template <typename Iterator, | |
| 18 hb_requires (hb_is_iterator (Iterator))> | |
| 19 bool subset (hb_subset_context_t *c, | |
| 20 Iterator coverage, | |
| 21 unsigned class_count, | |
| 22 const hb_map_t *klass_mapping) const | |
| 23 { | |
| 24 TRACE_SUBSET (this); | |
| 25 const hb_set_t &glyphset = *c->plan->glyphset_gsub (); | |
| 26 | |
| 27 auto *out = c->serializer->start_embed (this); | |
| 28 if (unlikely (!c->serializer->extend_min (out))) return_trace (false); | |
| 29 | |
| 30 for (const auto _ : + hb_zip (coverage, *this) | |
| 31 | hb_filter (glyphset, hb_first)) | |
| 32 { | |
| 33 auto *matrix = out->serialize_append (c->serializer); | |
| 34 if (unlikely (!matrix)) return_trace (false); | |
| 35 | |
| 36 const LigatureAttach& src = (this + _.second); | |
| 37 auto indexes = | |
| 38 + hb_range (src.rows * class_count) | |
| 39 | hb_filter ([=] (unsigned index) { return klass_mapping->has (index % class_count); }) | |
| 40 ; | |
| 41 matrix->serialize_subset (c, | |
| 42 _.second, | |
| 43 this, | |
| 44 src.rows, | |
| 45 indexes); | |
| 46 } | |
| 47 return_trace (this->len); | |
| 48 } | |
| 49 }; | |
| 50 | |
| 51 | |
| 52 } | |
| 53 } | |
| 54 } | |
| 55 | |
| 56 #endif /* OT_LAYOUT_GPOS_LIGATUREARRAY_HH */ |
