Font-Embedding Function Error Messages

The following LONG values are returned by the font-embedding functions when errors are encountered. When functions are successful, the value E_NONE is returned.

Return valueDescription
E_NONENo error.
E_ADDFONTFAILEDAn error occurred when the load functions tried to add the new font using AddFontResource.
E_CHARCODECOUNTINVALIDThe count of subsetted characters specified in TTEmbedFont is invalid.
E_CHARCODESETINVALIDThe character set specified in TTEmbedFont is invalid.
E_COULDNTCREATETEMPFILEThe load functions could not create a temporary file needed in to install a new font or resource file.
E_DEVICETRUETYPEFONTThe specified TrueType® font is not a system font. The font may exist as a device font in a printer.
E_ERRORACCESSINGEXCLUDELISTAn error occurred while attempting to access the Typeface Exclusion List.
E_ERRORACCESSINGFACENAMEA non-DC-related error was encountered while trying to allocate an OUTLINETEXTMETRIC structure.
E_ERRORACCESSINGFONTDATAAn error was encountered while attempting to use GetFontData.
E_ERRORCOMPRESSINGFONTDATAAn error occurred while TTEmbedFont attempted to compress the font data.
E_ERRORCONVERTINGCHARSAn error prevented the conversion of a string of single-byte characters to Unicode characters. This can occur in TTCharToUnicode if either pucCharCodes or pusShortCodes are non-null values, or if the conversion fails while using MultiByteToWideChar.
E_ERRORCREATINGFONTFILEAn error occurred while attempting to create the font file.
E_ERRORDECOMPRESSINGFONTDATAAn error occurred while trying to decompress data in a font file.
E_ERROREXPANDINGFONTDATAAn error occurred while the load functions attempted to expand embedded, compressed font data.
E_ERRORGETTINGDCAn error occurred while trying to allocate a DC, halting processing.
E_ERRORREADINGFONTDATAAn error occurred while attempting to read font data.
E_ERRORUNICODECONVERSIONAn error occurred while allocating memory to convert a name string to Unicode.
E_ERRORUSINGTEMPFILEAn error occurred while the load functions were using a temporary file to install a new font file or resource file.
E_EXCEPTIONAn exception was thrown by an unknown cause.
E_FACENAMEINVALIDA null szFaceName parameter was passed to the function.
E_FLAGSINVALIDThe ulFlags parameter in the current function is invalid.
E_FONTALREADYEXISTSThe embedded font has the same name and checksum as a font already installed on the system.
E_FONTDATAINVALIDFont data read from disk is not a valid embedded-font structure.
E_FONTFILECREATEFAILEDThe load functions could not create the font file (.ttf)
E_FONTFILENOTFOUNDThe font file of the specified file name does not exist.
E_FONTINSTALLFAILEDAn attempt to install the embedded font in the system failed.
E_FONTNAMEALREADYEXISTSThe embedded font has the same name but a different checksum as a font already installed.
E_FONTNOTEMBEDDABLEThe specified font cannot be embedded due to restrictions from the font manufacturer. Embedding this font in a document violates copyright laws.
E_FONTREFERENCEINVALIDA null phFontReference was passed to the function.
E_HDCINVALIDThe device context specified for the TTEmbedFont function is invalid.
E_NAMECHANGEFAILED TTLoadEmbeddedFont was unable to change the name of the font being loaded.
E_NOFREEMEMORYAn internal operation failed while attempting to allocate memory.
E_NOOS2An OS/2 table was not found in the font.
E_NOTATRUETYPEFONTThe specified font is not a TrueType font.
E_PBENABLEDINVALIDA null pbEnabled parameter was passed to the function.
E_PERMISSIONSINVALIDA null pulPermissions parameter was passed to the function.
E_PRIVSINVALIDThe ulPrivs parameter specified in the load functions is invalid.
E_PRIVSTATUSINVALIDA null pulPrivStatus parameter was passed to the function.
E_READFROMSTREAMFAILEDAn error occurred while attempting to read the embedded font structure from the stream.
E_RESOURCEFILECREATEFAILEDThe load functions could not create the font resource file (.fot).
E_SAVETOSTREAMFAILEDAn error occurred while attempting to save the embedded-font structure to a stream.
E_STATUSINVALIDA null pulStatus parameter was passed to the function.
E_STREAMINVALIDThe stream specified in TTEmbedFont or the load functions is invalid.
E_SUBSETTINGFAILED TTEmbedFont failed while attempting to create a subset of a font.
E_T2NOFREEMEMORYAn error occurred while attempting to free memory. The memory in question failed during the free operation.
E_WINDOWSAPIAn internal error occurred when one of the functions called a Windows API, such as GetTextMetrics or GetOutlineTextMetrics.
E_API_NOTIMPLThis API function is not implemented in the version of Windows on which it is running.

 

 

 

Show: