Error.cs 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. #region MIT License
  2. /*Copyright (c) 2012 Robert Rouhani <robert.rouhani@gmail.com>
  3. SharpFont based on Tao.FreeType, Copyright (c) 2003-2007 Tao Framework Team
  4. Permission is hereby granted, free of charge, to any person obtaining a copy of
  5. this software and associated documentation files (the "Software"), to deal in
  6. the Software without restriction, including without limitation the rights to
  7. use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
  8. of the Software, and to permit persons to whom the Software is furnished to do
  9. so, subject to the following conditions:
  10. The above copyright notice and this permission notice shall be included in all
  11. copies or substantial portions of the Software.
  12. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  13. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  14. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  15. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  16. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  17. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  18. SOFTWARE.*/
  19. #endregion
  20. using System;
  21. namespace SharpFont
  22. {
  23. /// <summary>
  24. /// FreeType error codes.
  25. /// </summary>
  26. public enum Error
  27. {
  28. /// <summary>No error.</summary>
  29. Ok = 0x00,
  30. /// <summary>Cannot open resource.</summary>
  31. CannotOpenResource = 0x01,
  32. /// <summary>Unknown file format.</summary>
  33. UnknownFileFormat = 0x02,
  34. /// <summary>Broken file.</summary>
  35. InvalidFileFormat = 0x03,
  36. /// <summary>Invalid FreeType version.</summary>
  37. InvalidVersion = 0x04,
  38. /// <summary>Module version is too low.</summary>
  39. LowerModuleVersion = 0x05,
  40. /// <summary>Invalid argument.</summary>
  41. InvalidArgument = 0x06,
  42. /// <summary>Unimplemented feature.</summary>
  43. UnimplementedFeature = 0x07,
  44. /// <summary>Broken table.</summary>
  45. InvalidTable = 0x08,
  46. /// <summary>Broken offset within table.</summary>
  47. InvalidOffset = 0x09,
  48. /// <summary>Array allocation size too large.</summary>
  49. ArrayTooLarge = 0x0A,
  50. /// <summary>Invalid glyph index.</summary>
  51. InvalidGlyphIndex = 0x10,
  52. /// <summary>Invalid character code.</summary>
  53. InvalidCharacterCode = 0x11,
  54. /// <summary>Unsupported glyph image format.</summary>
  55. InvalidGlyphFormat = 0x12,
  56. /// <summary>Cannot render this glyph format.</summary>
  57. CannotRenderGlyph = 0x13,
  58. /// <summary>Invalid outline.</summary>
  59. InvalidOutline = 0x14,
  60. /// <summary>Invalid composite glyph.</summary>
  61. InvalidComposite = 0x15,
  62. /// <summary>Too many hints.</summary>
  63. TooManyHints = 0x16,
  64. /// <summary>Invalid pixel size.</summary>
  65. InvalidPixelSize = 0x17,
  66. /// <summary>Invalid object handle.</summary>
  67. InvalidHandle = 0x20,
  68. /// <summary>Invalid library handle.</summary>
  69. InvalidLibraryHandle = 0x21,
  70. /// <summary>Invalid module handle.</summary>
  71. InvalidDriverHandle = 0x22,
  72. /// <summary>Invalid face handle.</summary>
  73. InvalidFaceHandle = 0x23,
  74. /// <summary>Invalid size handle.</summary>
  75. InvalidSizeHandle = 0x24,
  76. /// <summary>Invalid glyph slot handle.</summary>
  77. InvalidSlotHandle = 0x25,
  78. /// <summary>Invalid charmap handle.</summary>
  79. InvalidCharMapHandle = 0x26,
  80. /// <summary>Invalid cache manager handle.</summary>
  81. InvalidCacheHandle = 0x27,
  82. /// <summary>Invalid stream handle.</summary>
  83. InvalidStreamHandle = 0x28,
  84. /// <summary>Too many modules.</summary>
  85. TooManyDrivers = 0x30,
  86. /// <summary>Too many extensions.</summary>
  87. TooManyExtensions = 0x31,
  88. /// <summary>Out of memory.</summary>
  89. OutOfMemory = 0x40,
  90. /// <summary>Unlisted object.</summary>
  91. UnlistedObject = 0x41,
  92. /// <summary>Cannot open stream.</summary>
  93. CannotOpenStream = 0x51,
  94. /// <summary>Invalid stream seek.</summary>
  95. InvalidStreamSeek = 0x52,
  96. /// <summary>Invalid stream skip.</summary>
  97. InvalidStreamSkip = 0x53,
  98. /// <summary>Invalid stream read.</summary>
  99. InvalidStreamRead = 0x54,
  100. /// <summary>Invalid stream operation.</summary>
  101. InvalidStreamOperation = 0x55,
  102. /// <summary>Invalid frame operation.</summary>
  103. InvalidFrameOperation = 0x56,
  104. /// <summary>Nested frame access.</summary>
  105. NestedFrameAccess = 0x57,
  106. /// <summary>Invalid frame read.</summary>
  107. InvalidFrameRead = 0x58,
  108. /// <summary>Raster uninitialized.</summary>
  109. RasterUninitialized = 0x60,
  110. /// <summary>Raster corrupted.</summary>
  111. RasterCorrupted = 0x61,
  112. /// <summary>Raster overflow.</summary>
  113. RasterOverflow = 0x62,
  114. /// <summary>Negative height while rastering.</summary>
  115. RasterNegativeHeight = 0x63,
  116. /// <summary>Too many registered caches.</summary>
  117. TooManyCaches = 0x70,
  118. /// <summary>Invalid opcode.</summary>
  119. InvalidOpCode = 0x80,
  120. /// <summary>Too few arguments.</summary>
  121. TooFewArguments = 0x81,
  122. /// <summary>Stack overflow.</summary>
  123. StackOverflow = 0x82,
  124. /// <summary>Code overflow.</summary>
  125. CodeOverflow = 0x83,
  126. /// <summary>Bad argument.</summary>
  127. BadArgument = 0x84,
  128. /// <summary>Division by zero.</summary>
  129. DivideByZero = 0x85,
  130. /// <summary>Invalid reference.</summary>
  131. InvalidReference = 0x86,
  132. /// <summary>Found debug opcode.</summary>
  133. DebugOpCode = 0x87,
  134. /// <summary>Found ENDF opcode in execution stream.</summary>
  135. EndfInExecStream = 0x88,
  136. /// <summary>Nested DEFS.</summary>
  137. NestedDefs = 0x89,
  138. /// <summary>Invalid code range.</summary>
  139. InvalidCodeRange = 0x8A,
  140. /// <summary>Execution context too long.</summary>
  141. ExecutionTooLong = 0x8B,
  142. /// <summary>Too many function definitions.</summary>
  143. TooManyFunctionDefs = 0x8C,
  144. /// <summary>Too many instruction definitions.</summary>
  145. TooManyInstructionDefs = 0x8D,
  146. /// <summary>SFNT font table missing.</summary>
  147. TableMissing = 0x8E,
  148. /// <summary>Horizontal header (hhea) table missing.</summary>
  149. HorizHeaderMissing = 0x8F,
  150. /// <summary>Locations (loca) table missing.</summary>
  151. LocationsMissing = 0x90,
  152. /// <summary>Name table missing.</summary>
  153. NameTableMissing = 0x91,
  154. /// <summary>Character map (cmap) table missing.</summary>
  155. CMapTableMissing = 0x92,
  156. /// <summary>Horizontal metrics (hmtx) table missing.</summary>
  157. HmtxTableMissing = 0x93,
  158. /// <summary>PostScript (post) table missing.</summary>
  159. PostTableMissing = 0x94,
  160. /// <summary>Invalid horizontal metrics.</summary>
  161. InvalidHorizMetrics = 0x95,
  162. /// <summary>Invalid character map (cmap) format.</summary>
  163. InvalidCharMapFormat = 0x96,
  164. /// <summary>Invalid ppem value.</summary>
  165. InvalidPPem = 0x97,
  166. /// <summary>Invalid vertical metrics.</summary>
  167. InvalidVertMetrics = 0x98,
  168. /// <summary>Could not find context.</summary>
  169. CouldNotFindContext = 0x99,
  170. /// <summary>Invalid PostScript (post) table format.</summary>
  171. InvalidPostTableFormat = 0x9A,
  172. /// <summary>Invalid PostScript (post) table.</summary>
  173. InvalidPostTable = 0x9B,
  174. /// <summary>Opcode syntax error.</summary>
  175. SyntaxError = 0xA0,
  176. /// <summary>Argument stack underflow.</summary>
  177. StackUnderflow = 0xA1,
  178. /// <summary>Ignore this error.</summary>
  179. Ignore = 0xA2,
  180. /// <summary>No Unicode glyph name found.</summary>
  181. NoUnicodeGlyphName = 0xA3,
  182. /// <summary>`STARTFONT' field missing.</summary>
  183. MissingStartfontField = 0xB0,
  184. /// <summary>`FONT' field missing.</summary>
  185. MissingFontField = 0xB1,
  186. /// <summary>`SIZE' field missing.</summary>
  187. MissingSizeField = 0xB2,
  188. /// <summary>`FONTBOUNDINGBOX' field missing.</summary>
  189. MissingFontboudingboxField = 0xB3,
  190. /// <summary>`CHARS' field missing.</summary>
  191. MissingCharsField = 0xB4,
  192. /// <summary>`STARTCHAR' field missing.</summary>
  193. MissingStartcharField = 0xB5,
  194. /// <summary>`ENCODING' field missing.</summary>
  195. MissingEncodingField = 0xB6,
  196. /// <summary>`BBX' field missing.</summary>
  197. MissingBbxField = 0xB7,
  198. /// <summary>`BBX' too big.</summary>
  199. BbxTooBig = 0xB8,
  200. /// <summary>Font header corrupted or missing fields.</summary>
  201. CorruptedFontHeader = 0xB9,
  202. /// <summary>Font glyphs corrupted or missing fields.</summary>
  203. CorruptedFontGlyphs = 0xBA
  204. }
  205. }