From 9ffc46b8ff5546998fc9b74cb54dec8618ed0ac7 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 31 Mar 2021 11:26:18 -0600 Subject: [PATCH] Add VarIdx --- src/hb-open-type.hh | 6 ++++++ src/hb-static.cc | 1 + 2 files changed, 7 insertions(+) diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh index 79e13a692..11194c31e 100644 --- a/src/hb-open-type.hh +++ b/src/hb-open-type.hh @@ -196,6 +196,12 @@ DECLARE_NULL_NAMESPACE_BYTES (OT, Index); typedef Index NameID; +struct VarIdx : HBUINT32 { + static constexpr unsigned NO_VARIATION = 0xFFFFFFFFu; + VarIdx& operator = (uint32_t i) { HBUINT32::operator= (i); return *this; } +}; +DECLARE_NULL_NAMESPACE_BYTES (OT, VarIdx); + /* Offset, Null offset = 0 */ template struct Offset : Type diff --git a/src/hb-static.cc b/src/hb-static.cc index f5b7fa50a..ec4b24147 100644 --- a/src/hb-static.cc +++ b/src/hb-static.cc @@ -43,6 +43,7 @@ uint64_t const _hb_NullPool[(HB_NULL_POOL_SIZE + sizeof (uint64_t) - 1) / sizeof /*thread_local*/ uint64_t _hb_CrapPool[(HB_NULL_POOL_SIZE + sizeof (uint64_t) - 1) / sizeof (uint64_t)] = {}; DEFINE_NULL_NAMESPACE_BYTES (OT, Index) = {0xFF,0xFF}; +DEFINE_NULL_NAMESPACE_BYTES (OT, VarIdx) = {0xFF,0xFF,0xFF,0xFF}; DEFINE_NULL_NAMESPACE_BYTES (OT, LangSys) = {0x00,0x00, 0xFF,0xFF, 0x00,0x00}; DEFINE_NULL_NAMESPACE_BYTES (OT, RangeRecord) = {0x00,0x01, 0x00,0x00, 0x00, 0x00}; DEFINE_NULL_NAMESPACE_BYTES (OT, CmapSubtableLongGroup) = {0x00,0x00,0x00,0x01, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00};