From b92ba7bafcd9545a401fb871eb342e6284032c47 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 2 Dec 2016 15:21:43 -0800 Subject: [PATCH] [CBDT] Use CHAR instead of int8_t --- src/hb-open-type-private.hh | 1 + src/hb-ot-cbdt-table.hh | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index df683ca4b..6b643784e 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -650,6 +650,7 @@ struct IntType DEFINE_SIZE_STATIC (Size); }; +typedef IntType CHAR; /* 8-bit signed integer. */ typedef IntType BYTE; /* 8-bit unsigned integer. */ typedef IntType USHORT; /* 16-bit unsigned integer. */ typedef IntType SHORT; /* 16-bit signed integer. */ diff --git a/src/hb-ot-cbdt-table.hh b/src/hb-ot-cbdt-table.hh index 17f15dc4f..7615138f5 100644 --- a/src/hb-ot-cbdt-table.hh +++ b/src/hb-ot-cbdt-table.hh @@ -35,26 +35,26 @@ struct SmallGlyphMetrics { BYTE height; BYTE width; - int8_t bearingX; - int8_t bearingY; + CHAR bearingX; + CHAR bearingY; BYTE advance; DEFINE_SIZE_STATIC(5); }; struct SBitLineMetrics { - int8_t ascender; - int8_t decender; + CHAR ascender; + CHAR decender; BYTE widthMax; - int8_t caretSlopeNumerator; - int8_t caretSlopeDenominator; - int8_t caretOffset; - int8_t minOriginSB; - int8_t minAdvanceSB; - int8_t maxBeforeBL; - int8_t minAfterBL; - int8_t padding1; - int8_t padding2; + CHAR caretSlopeNumerator; + CHAR caretSlopeDenominator; + CHAR caretOffset; + CHAR minOriginSB; + CHAR minAdvanceSB; + CHAR maxBeforeBL; + CHAR minAfterBL; + CHAR padding1; + CHAR padding2; DEFINE_SIZE_STATIC(12); }; @@ -72,7 +72,7 @@ struct BitmapSizeTable BYTE ppemX; BYTE ppemY; BYTE bitDepth; - int8_t flags; + CHAR flags; DEFINE_SIZE_STATIC(48); };