[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.
This commit is contained in:
Behdad Esfahbod 2018-09-11 17:18:21 +02:00
parent 2b2ed1e536
commit d5c509272f
2 changed files with 7 additions and 13 deletions

View File

@ -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<UnsizedArrayOf<ResourceRefItem> >
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);
};

View File

@ -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]