1 //========================================================================
5 // Copyright 2009 Glyph & Cog, LLC
7 //========================================================================
9 #ifndef FOFIIDENTIFIER_H
10 #define FOFIIDENTIFIER_H
12 #ifdef USE_GCC_PRAGMAS
16 //------------------------------------------------------------------------
18 //------------------------------------------------------------------------
20 enum FoFiIdentifierType
{
21 fofiIdType1PFA
, // Type 1 font in PFA format
22 fofiIdType1PFB
, // Type 1 font in PFB format
23 fofiIdCFF8Bit
, // 8-bit CFF font
24 fofiIdCFFCID
, // CID CFF font
25 fofiIdTrueType
, // TrueType font
26 fofiIdTrueTypeCollection
, // TrueType collection
27 fofiIdOpenTypeCFF8Bit
, // OpenType wrapper with 8-bit CFF font
28 fofiIdOpenTypeCFFCID
, // OpenType wrapper with CID CFF font
29 fofiIdUnknown
, // unknown type
30 fofiIdError
// error in reading the file
33 class FoFiIdentifier
{
36 static FoFiIdentifierType
identifyMem(char *file
, int len
);
37 static FoFiIdentifierType
identifyFile(char *fileName
);
38 static FoFiIdentifierType
identifyStream(int (*getChar
)(void *data
),