From cc83b0b8fde5a6ac5e1800663238c4c9354da1ec Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 8 Jul 2022 12:25:15 -0600 Subject: [PATCH] [>64k:layout:MarkBasePos/MarkMarkPos/MarkLigPos] Implement format 2 Implements https://github.com/be-fonts/boring-expansion-spec/issues/40 Subset does NOT lower format. --- src/OT/Layout/GPOS/MarkBasePos.hh | 6 ++++++ src/OT/Layout/GPOS/MarkLigPos.hh | 6 ++++++ src/OT/Layout/GPOS/MarkMarkPos.hh | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/src/OT/Layout/GPOS/MarkBasePos.hh b/src/OT/Layout/GPOS/MarkBasePos.hh index 14b486029..c99b6b2e4 100644 --- a/src/OT/Layout/GPOS/MarkBasePos.hh +++ b/src/OT/Layout/GPOS/MarkBasePos.hh @@ -13,6 +13,9 @@ struct MarkBasePos union { HBUINT16 format; /* Format identifier */ MarkBasePosFormat1_2 format1; +#ifndef HB_NO_BORING_EXPANSION + MarkBasePosFormat1_2 format2; +#endif } u; public: @@ -23,6 +26,9 @@ struct MarkBasePos if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); switch (u.format) { case 1: return_trace (c->dispatch (u.format1, std::forward (ds)...)); +#ifndef HB_NO_BORING_EXPANSION + case 2: return_trace (c->dispatch (u.format2, std::forward (ds)...)); +#endif default:return_trace (c->default_return_value ()); } } diff --git a/src/OT/Layout/GPOS/MarkLigPos.hh b/src/OT/Layout/GPOS/MarkLigPos.hh index cab67c13d..8a4de9ffa 100644 --- a/src/OT/Layout/GPOS/MarkLigPos.hh +++ b/src/OT/Layout/GPOS/MarkLigPos.hh @@ -13,6 +13,9 @@ struct MarkLigPos union { HBUINT16 format; /* Format identifier */ MarkLigPosFormat1_2 format1; +#ifndef HB_NO_BORING_EXPANSION + MarkLigPosFormat1_2 format2; +#endif } u; public: @@ -23,6 +26,9 @@ struct MarkLigPos if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); switch (u.format) { case 1: return_trace (c->dispatch (u.format1, std::forward (ds)...)); +#ifndef HB_NO_BORING_EXPANSION + case 2: return_trace (c->dispatch (u.format2, std::forward (ds)...)); +#endif default:return_trace (c->default_return_value ()); } } diff --git a/src/OT/Layout/GPOS/MarkMarkPos.hh b/src/OT/Layout/GPOS/MarkMarkPos.hh index 180e2fd1e..74b5105c4 100644 --- a/src/OT/Layout/GPOS/MarkMarkPos.hh +++ b/src/OT/Layout/GPOS/MarkMarkPos.hh @@ -13,6 +13,9 @@ struct MarkMarkPos union { HBUINT16 format; /* Format identifier */ MarkMarkPosFormat1_2 format1; +#ifndef HB_NO_BORING_EXPANSION + MarkMarkPosFormat1_2 format2; +#endif } u; public: @@ -23,6 +26,9 @@ struct MarkMarkPos if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ()); switch (u.format) { case 1: return_trace (c->dispatch (u.format1, std::forward (ds)...)); +#ifndef HB_NO_BORING_EXPANSION + case 2: return_trace (c->dispatch (u.format2, std::forward (ds)...)); +#endif default:return_trace (c->default_return_value ()); } }