Hello,
I'm trying to use a Type1 font from a .pfm file. When I get to PDEFontCreate, it returns a bad parameter error. Is it possible to know which of the parameters it doesn't like?
Here is how I use the PDEFontCreate:
memset( &m_pdeFontAttrs, 0, sizeof( m_pdeFontAttrs ) );
m_pdeFontAttrs.name = ASAtomFromString( "Combat" ); /* font name */ //as read from /FontName
m_pdeFontAttrs.type = ASAtomFromString( "Type1" ); /* font type */
m_pdeFonts = ( PDEFont * ) realloc( m_pdeFonts, sizeof( PDEFont ) * ( m_nPdeFonts + 1 ) );
char pathSpec[] = "D:\\Downloads\\Combat.pfb";
ASPathName pathName = ASFileSysCreatePathName (NULL, ASAtomFromString("Cstring"), pathSpec, NULL);
ASFile fontFile;
int result = ASFileSysOpenFile (NULL, pathName, ASFILE_READ, &fontFile);
int sizeOfFontFile = ASFileGetEOF (fontFile);
ASStm fontStm = ASFileStmRdOpen (fontFile, 0);
m_pdeFonts[ m_nPdeFonts ] = PDEFontCreate (&m_pdeFontAttrs, sizeof (m_pdeFontAttrs),