Detect TrueType Collections by checking the font data header instead
of checking for "face->num_faces >1".
{
HB_Stream stream = font->stream;
- HB_UInt offset = 0;
+ HB_UInt offset = 0, sig;
HB_UInt count, nn;
HB_Error error;
* FreeType's built-in data structures
*/
- if ( font->num_faces > 1 )
+ if ( FILE_Seek( 0 ) || ACCESS_Frame( 4 ) )
+ goto Exit;
+
+ sig = GET_Tag4();
+
+ FORGET_Frame();
+
+ if ( sig == HB_MAKE_TAG( 't', 't', 'c', 'f' ) )
{
/* deal with TrueType collections */
LOG(( ">> This is a TrueType Collection\n" ));