mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 15:01:01 +01:00
[gsub] Widen format 2 subtable arrays
Use the layout Types array and offset forms for GSUB subtables that gain 24-bit coverage-indexed arrays in the beyond-64k formats. This widens SingleSubst substitute arrays, MultipleSubst sequence offsets, AlternateSubst alternate-set offsets, LigatureSubst ligature-set offsets, and the LigatureSet offsets to Ligature tables while preserving the nested 16-bit counts required by the spec. Testing: meson test -C build Assisted-by: OpenAI Codex
This commit is contained in:
1 parent
373ff59709
commit
dc5d58a9d7
5 files changed
+8
-8
No files matched your search
@@ -16,7 +16,7 @@ struct AlternateSubstFormat1_2
|
||||
typename Types::template OffsetTo<Coverage>
|
||||
coverage; /* Offset to Coverage table--from
|
||||
* beginning of Substitution table */
|
||||
Array16Of<typename Types::template OffsetTo<AlternateSet<Types>>>
|
||||
typename Types::template ArrayOf<typename Types::template OffsetTo<AlternateSet<Types>>>
|
||||
alternateSet; /* Array of AlternateSet tables
|
||||
* ordered by Coverage Index */
|
||||
public:
|
||||
|
||||
@@ -12,7 +12,7 @@ template <typename Types>
|
||||
struct LigatureSet
|
||||
{
|
||||
public:
|
||||
Array16OfOffset16To<Ligature<Types>>
|
||||
Array16Of<typename Types::template OffsetTo<Ligature<Types>>>
|
||||
ligature; /* Array LigatureSet tables
|
||||
* ordered by preference */
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@ struct LigatureSubstFormat1_2
|
||||
typename Types::template OffsetTo<Coverage>
|
||||
coverage; /* Offset to Coverage table--from
|
||||
* beginning of Substitution table */
|
||||
Array16Of<typename Types::template OffsetTo<LigatureSet<Types>>>
|
||||
typename Types::template ArrayOf<typename Types::template OffsetTo<LigatureSet<Types>>>
|
||||
ligatureSet; /* Array LigatureSet tables
|
||||
* ordered by Coverage Index */
|
||||
public:
|
||||
DEFINE_SIZE_ARRAY (4 + Types::size, ligatureSet);
|
||||
DEFINE_SIZE_ARRAY (2 + 2 * Types::size, ligatureSet);
|
||||
|
||||
bool sanitize (hb_sanitize_context_t *c) const
|
||||
{
|
||||
|
||||
@@ -16,11 +16,11 @@ struct MultipleSubstFormat1_2
|
||||
typename Types::template OffsetTo<Coverage>
|
||||
coverage; /* Offset to Coverage table--from
|
||||
* beginning of Substitution table */
|
||||
Array16Of<typename Types::template OffsetTo<Sequence<Types>>>
|
||||
typename Types::template ArrayOf<typename Types::template OffsetTo<Sequence<Types>>>
|
||||
sequence; /* Array of Sequence tables
|
||||
* ordered by Coverage Index */
|
||||
public:
|
||||
DEFINE_SIZE_ARRAY (4 + Types::size, sequence);
|
||||
DEFINE_SIZE_ARRAY (2 + 2 * Types::size, sequence);
|
||||
|
||||
bool sanitize (hb_sanitize_context_t *c) const
|
||||
{
|
||||
|
||||
@@ -15,12 +15,12 @@ struct SingleSubstFormat2_4
|
||||
typename Types::template OffsetTo<Coverage>
|
||||
coverage; /* Offset to Coverage table--from
|
||||
* beginning of Substitution table */
|
||||
Array16Of<typename Types::HBGlyphID>
|
||||
typename Types::template ArrayOf<typename Types::HBGlyphID>
|
||||
substitute; /* Array of substitute
|
||||
* GlyphIDs--ordered by Coverage Index */
|
||||
|
||||
public:
|
||||
DEFINE_SIZE_ARRAY (4 + Types::size, substitute);
|
||||
DEFINE_SIZE_ARRAY (2 + 2 * Types::size, substitute);
|
||||
|
||||
bool sanitize (hb_sanitize_context_t *c) const
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user