From 14a2df7bc237e7e59ff62c710751c7069733a469 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 19 Sep 2021 23:06:09 -0400 Subject: [PATCH] Add stub HBUINT15 --- src/hb-open-type.hh | 9 +++++++++ src/hb-ot-layout-common.hh | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh index f0999b633..5199d1c48 100644 --- a/src/hb-open-type.hh +++ b/src/hb-open-type.hh @@ -122,6 +122,15 @@ typedef IntType HBINT32; /* 32-bit signed integer. */ * Works for unsigned, but not signed, since we rely on compiler for sign-extension. */ typedef IntType HBUINT24; /* 24-bit unsigned integer. */ +/* 15-bit unsigned number; top bit used for extension. */ +struct HBUINT15 : HBUINT16 +{ + /* TODO Flesh out; actually mask top bit. */ + HBUINT15& operator = (uint16_t i ) { HBUINT16::operator= (i); return *this; } + public: + DEFINE_SIZE_STATIC (2); +}; + /* 16-bit signed integer (HBINT16) that describes a quantity in FUnits. */ typedef HBINT16 FWORD; diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index 71e43f041..1a00c53cc 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -2543,7 +2543,7 @@ struct VarRegionList public: HBUINT16 axisCount; - HBUINT16 regionCount; + HBUINT15 regionCount; protected: UnsizedArrayOf axesZ;