[>64k:layout:MarkBasePos/MarkMarkPos/MarkLigPos] Implement format 2
Implements https://github.com/be-fonts/boring-expansion-spec/issues/40 Subset does NOT lower format.
This commit is contained in:
parent
4b43070e2f
commit
cc83b0b8fd
src/OT/Layout/GPOS
|
@ -13,6 +13,9 @@ struct MarkBasePos
|
||||||
union {
|
union {
|
||||||
HBUINT16 format; /* Format identifier */
|
HBUINT16 format; /* Format identifier */
|
||||||
MarkBasePosFormat1_2<SmallTypes> format1;
|
MarkBasePosFormat1_2<SmallTypes> format1;
|
||||||
|
#ifndef HB_NO_BORING_EXPANSION
|
||||||
|
MarkBasePosFormat1_2<MediumTypes> format2;
|
||||||
|
#endif
|
||||||
} u;
|
} u;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -23,6 +26,9 @@ struct MarkBasePos
|
||||||
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
||||||
switch (u.format) {
|
switch (u.format) {
|
||||||
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
|
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
|
||||||
|
#ifndef HB_NO_BORING_EXPANSION
|
||||||
|
case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...));
|
||||||
|
#endif
|
||||||
default:return_trace (c->default_return_value ());
|
default:return_trace (c->default_return_value ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,9 @@ struct MarkLigPos
|
||||||
union {
|
union {
|
||||||
HBUINT16 format; /* Format identifier */
|
HBUINT16 format; /* Format identifier */
|
||||||
MarkLigPosFormat1_2<SmallTypes> format1;
|
MarkLigPosFormat1_2<SmallTypes> format1;
|
||||||
|
#ifndef HB_NO_BORING_EXPANSION
|
||||||
|
MarkLigPosFormat1_2<MediumTypes> format2;
|
||||||
|
#endif
|
||||||
} u;
|
} u;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -23,6 +26,9 @@ struct MarkLigPos
|
||||||
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
||||||
switch (u.format) {
|
switch (u.format) {
|
||||||
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
|
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
|
||||||
|
#ifndef HB_NO_BORING_EXPANSION
|
||||||
|
case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...));
|
||||||
|
#endif
|
||||||
default:return_trace (c->default_return_value ());
|
default:return_trace (c->default_return_value ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,9 @@ struct MarkMarkPos
|
||||||
union {
|
union {
|
||||||
HBUINT16 format; /* Format identifier */
|
HBUINT16 format; /* Format identifier */
|
||||||
MarkMarkPosFormat1_2<SmallTypes> format1;
|
MarkMarkPosFormat1_2<SmallTypes> format1;
|
||||||
|
#ifndef HB_NO_BORING_EXPANSION
|
||||||
|
MarkMarkPosFormat1_2<MediumTypes> format2;
|
||||||
|
#endif
|
||||||
} u;
|
} u;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -23,6 +26,9 @@ struct MarkMarkPos
|
||||||
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
if (unlikely (!c->may_dispatch (this, &u.format))) return_trace (c->no_dispatch_return_value ());
|
||||||
switch (u.format) {
|
switch (u.format) {
|
||||||
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
|
case 1: return_trace (c->dispatch (u.format1, std::forward<Ts> (ds)...));
|
||||||
|
#ifndef HB_NO_BORING_EXPANSION
|
||||||
|
case 2: return_trace (c->dispatch (u.format2, std::forward<Ts> (ds)...));
|
||||||
|
#endif
|
||||||
default:return_trace (c->default_return_value ());
|
default:return_trace (c->default_return_value ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue