About function CreateFontPackage on TTC data

  • Thread starter Thread starter 12131415
  • Start date Start date
1

12131415

Guest
unsigned short usFlag = TTFCFP_FLAGS_SUBSET | TTFCFP_FLAGS_TTC;
unsigned short usTTCIndex = 0;
unsigned short usSubsetFormat = TTFCFP_SUBSET;
unsigned short usSubsetLanguage = 0;
unsigned short usSubsetPlatform = TTFCFP_MS_PLATFORMID;
unsigned short usSubsetEncoding = TTFCFP_DONT_CARE;

long ret = CreateFontPackage(&fontData[0], // input ttf or ttc buffer
srcBufferSize, // input buffer size
&pOutBuffer, // output package buffer
&outBufferSize, // output package buffer size
&outBufferWritten, /* output package buffer data length */
usFlag, /* subset, compress, or both, TTF or TTC, Chars or Glyphs */
usTTCIndex, /* TTC Index, only used if TTC bit set */
usSubsetFormat, /* Old Subset, Subset or Delta */
usSubsetLanguage, /* Language in Name table to keep */
usSubsetPlatform, /* if ListType is Character, Platform of cmap to use for glyph list */
usSubsetEncoding, /* if ListType is Character, Encoding of cmap to use for glyph list */
&text[0], /* List of Characters or Glyphs to keep */
4, /* number of elements in list */
malloc, realloc, free, /* call back functions about memory operations */
NULL);

always got the ret with 1106, means the Calling function parameter 6 was invalid, what the meaning of usTTCIndex, how to set it value?

Continue reading...
 
Back
Top