From d5c509272f2fbd1b4c56e3b530da7e42e7f03901 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 11 Sep 2018 17:18:21 +0200 Subject: [PATCH] [dfont] Fix test expecatation and minor touch up I have no way to authoritatively know, but looks like test font only has one face. So, adjust test expectation instead. --- src/hb-open-file.hh | 18 ++++++------------ .../data/in-house/tests/collections.tests | 2 +- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/hb-open-file.hh b/src/hb-open-file.hh index 608de0a9a..39c6aeb89 100644 --- a/src/hb-open-file.hh +++ b/src/hb-open-file.hh @@ -300,7 +300,7 @@ struct ResourceRefItem HBINT16 id; /* Resource ID, is really should be signed? */ HBINT16 nameOffset; /* Offset from beginning of resource name list - * to resource name, minus means there is no */ + * to resource name, minus means there is none. */ HBUINT8 attr; /* Resource attributes */ HBUINT24 dataOffset; /* Offset from beginning of resource data to * data for this resource */ @@ -318,15 +318,9 @@ struct ResourceTypeItem return_trace (likely (c->check_struct (this))); } - inline unsigned int get_resource_count () const - { - return numRes + 1; - } + inline unsigned int get_resource_count () const { return numRes + 1; } - inline bool is_sfnt () const - { - return type == HB_TAG ('s','f','n','t'); - } + inline bool is_sfnt () const { return type == HB_TAG ('s','f','n','t'); } inline const ResourceRefItem& get_ref_item (const void *base, unsigned int i) const @@ -335,11 +329,11 @@ struct ResourceTypeItem } protected: - Tag type; /* Resource type */ - HBUINT16 numRes; /* Number of resource this type in map minus 1 */ + Tag type; /* Resource type. */ + HBUINT16 numRes; /* Number of resources minus 1. */ OffsetTo > refList; /* Offset from beginning of resource type list - * to reference list for this type */ + * to reference item list for this type. */ public: DEFINE_SIZE_STATIC (8); }; diff --git a/test/shaping/data/in-house/tests/collections.tests b/test/shaping/data/in-house/tests/collections.tests index d9ecdabb9..85653c543 100644 --- a/test/shaping/data/in-house/tests/collections.tests +++ b/test/shaping/data/in-house/tests/collections.tests @@ -1,5 +1,5 @@ ../fonts/TestDFONT.dfont:--face-index=0 --font-funcs=ot:U+2026,U+0020,U+002E:[ellipsis=0+723|space=1+250|period=2+241] -../fonts/TestDFONT.dfont:--face-index=1 --font-funcs=ot:U+2026,U+0020,U+002E:[ellipsis=0+723|space=1+250|period=2+241] +../fonts/TestDFONT.dfont:--face-index=1 --font-funcs=ot:U+2026,U+0020,U+002E:[gid0=0+1000|gid0=1+1000|gid0=2+1000] ../fonts/TestDFONT.dfont:--face-index=2 --font-funcs=ot:U+2026,U+0020,U+002E:[gid0=0+1000|gid0=1+1000|gid0=2+1000] ../fonts/TestTTC.ttc:--face-index=0 --font-funcs=ot:U+2026,U+0020,U+002E:[ellipsis=0+723|space=1+250|period=2+241] ../fonts/TestTTC.ttc:--face-index=1 --font-funcs=ot:U+2026,U+0020,U+002E:[ellipsis=0+723|space=1+250|period=2+241]