Insertion of an adendum to the intro to font embedding

by Michael S. Kaplan, published on 2006/08/02 11:31 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2006/08/02/686538.aspx


I was talking about Font embedding -- the intro a little while back. And several people have taken me up on my offer for the header file. So I thought an update on the situation might be in order....

As I pointed out in a comment here just yesterday:

The header file and also the .LIB file are actually both available in the Windows SDK, at this point.

Now this is actually two header files (t2embapi.h and fontsub.h) and two .LIB files (t2embapi.lib and fontsub.lib). The first of each is involved in the creation of the embedded font files, and the second of each is involved in the usage of that data; both pieces are obviously important....

Now while the set of error constants for the first set related to embedding (described here) is available in the Windows SDK, the set of error constants for the second set related to packaging (described here) is not.

Now this issue will be addressed in the SDK in the future, but for now I'll give the constant values here, because the header file they are in at the moment is really not meant for publishing so they'll have to do a little moving stuff around to get it into a header like fontsub.h eventually....

Note that most of these errors are more of an indication of an error in the process of embedding/packaging tht an error that something could be done with -- so don't feel like you have to turn them into your own header file right away -- just use them as information for now, and they will be defined soon enough. :-)

Return value Value Description
NO_ERROR 0 No error.
ERR_FORMAT 1006 Input data format error.
ERR_GENERIC 1000  
ERR_MEM 1005 Error allocating memory.
ERR_NO_GLYPHS 1009  
ERR_INVALID_BASE 1085  
ERR_INVALID_CMAP 1030  
ERR_INVALID_DELTA_FORMAT 1013 Trying to subset a format 1 or 2 font.
ERR_INVALID_EBLC 1086  
ERR_INVALID_GLYF 1061  
ERR_INVALID_GDEF 1083  
ERR_INVALID_GPOS 1082  
ERR_INVALID_GSUB 1081  
ERR_INVALID_HDMX 1089  
ERR_INVALID_HEAD 1062  
ERR_INVALID_HHEA 1063  
ERR_INVALID_HHEA_OR_VHEA 1072  
ERR_INVALID_HMTX 1064  
ERR_INVALID_HMTX_OR_VMTX 1073  
ERR_INVALID_JSTF 1084  
ERR_INVALID_LTSH 1087  
ERR_INVALID_TTO 1080  
ERR_INVALID_VDMX 1088  
ERR_INVALID_LOCA 1065  
ERR_INVALID_MAXP 1066  
ERR_INVALID_MERGE_CHECKSUMS 1011 Trying to merge two fonts from different mother font.
ERR_INVALID_MERGE_FORMATS 1010 Trying to merge fonts with the wrong dttf formats.
ERR_INVALID_MERGE_NUMGLYPHS 1012 Trying to merge 2 fonts from different mother font.
ERR_INVALID_NAME 1067  
ERR_INVALID_POST 1068  
ERR_INVALID_OS2 1069  
ERR_INVALID_VHEA 1070  
ERR_INVALID_VMTX 1071  
ERR_INVALID_TTC_INDEX 1015  
ERR_MEM 1005 Error allocating memory.
ERR_MISSING_CMAP 1030  
ERR_MISSING_EBDT 1044  
ERR_MISSING_GLYF 1031  
ERR_MISSING_HEAD 1032  
ERR_MISSING_HHEA 1033  
ERR_MISSING_HMTX 1034  
ERR_MISSING_LOCA 1035  
ERR_MISSING_MAXP 1036  
ERR_MISSING_NAME 1037  
ERR_MISSING_POST 1038  
ERR_MISSING_OS2 1039  
ERR_MISSING_VHEA 1040  
ERR_MISSING_VMTX 1041  
ERR_MISSING_HHEA_OR_VHEA 1042  
ERR_MISSING_HMTX_OR_VMTX 1043  
ERR_NOT_TTC 1014  
ERR_PARAMETER0 1100 Calling function argument 0 is invalid.
ERR_PARAMETER1 1101 Calling function argument 1 is invalid.
ERR_PARAMETER2 1102 Calling function argument 2 is invalid.
ERR_PARAMETER3 1103 Calling function argument 3 is invalid.
ERR_PARAMETER4 1104 Calling function argument 4 is invalid.
ERR_PARAMETER5 1105 Calling function argument 5 is invalid.
ERR_PARAMETER6 1106 Calling function argument 6 is invalid.
ERR_PARAMETER7 1107 Calling function argument 7 is invalid.
ERR_PARAMETER8 1108 Calling function argument 8 is invalid.
ERR_PARAMETER9 1109 Calling function argument 9 is invalid.
ERR_PARAMETER10 1110 Calling function argument 10 is invalid.
ERR_PARAMETER11 1111 Calling function argument 11 is invalid.
ERR_PARAMETER12 1112 Calling function argument 12 is invalid.
ERR_PARAMETER13 1113 Calling function argument 13 is invalid.
ERR_PARAMETER14 1114 Calling function argument 14 is invalid.
ERR_PARAMETER15 1115 Calling function argument 15 is invalid.
ERR_PARAMETER16 1116 Calling function argument 16 is invalid.
ERR_READCONTROL 1003 Read control structure does not match data.
ERR_READOUTOFBOUNDS 1001 Trying to read from memory not allowed - data error?
ERR_VERSION 1008 Major dttf.version of the input data is greater than the version this program can read.
ERR_WOULD_GROW 1007 Action would cause data to grow. use original data.
ERR_WRITECONTROL 1004 Write control structure does not match data.
ERR_WRITEOUTOFBOUNDS 1002 Trying to write to memory not allowed - data error?

So, enjoy the little addendum to the intro. :-)

 

This post brought to you by (U+0a05, a.k.a. GURMUKHI LETTER A)


J. Shin on 15 Dec 2008 9:19 PM:

In what version of PSDK is t2embapi.h included? I downloaded what I believed to be the latest PSDK from the page you pointed to ( http://windowssdk.msdn.microsoft.com/en-us/library/ms717328.aspx ), but it still does not have t2embapi.h

It's installed, by default, in C:\Program Files\Microsoft SDKs\Windows\v6.0.  And Include folder has fontsub.h but NOT t2embapi.h

According to 'Add or Remove programs', it's 6000.0.0.

I also tried what's available at the following page:

http://www.microsoft.com/downloads/details.aspx?FamilyID=4377f86d-c913-4b5c-b87e-ef72e5b4e065&displaylang=en

It's 6000.16384.10, but neither does it have t2embapi.h/t2embed.lib

I can use t2embapi.h you posted elsewhere, but I still need the LIB file. Should/Could I make it following the instruction at

http://support.microsoft.com/kb/131313 ?

It'd be really nice if you could point me where to download PSDK with those two files.  Thank you !


Please consider a donation to keep this archive running, maintained and free of advertising.
Donate €20 or more to receive an offline copy of the whole archive including all images.

go to newer or older post, or back to index or month or day