CreateFontPackage and MergeFontPackage return value.(CreateFontPackage 和 MergeFontPackage函数的错误返回值含义)

 
Insertion of an adendum to the intro to font embedding
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. :-)
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值